Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
8f4aefd9
Commit
8f4aefd9
authored
Jan 07, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
e29f27bc
49200c9f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
9 deletions
+116
-9
RB_Question_Type.cs
Edu.Model/Entity/Question/RB_Question_Type.cs
+0
-5
RB_Question_Type_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
+35
-4
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+80
-0
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+1
-0
No files found.
Edu.Model/Entity/Question/RB_Question_Type.cs
View file @
8f4aefd9
...
@@ -35,10 +35,5 @@ namespace Edu.Model.Entity.Question
...
@@ -35,10 +35,5 @@ namespace Edu.Model.Entity.Question
/// 删除状态
/// 删除状态
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// JSON配置
/// </summary>
public
string
JsonConfig
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
View file @
8f4aefd9
...
@@ -30,15 +30,15 @@ namespace Edu.Model.ViewModel.Question
...
@@ -30,15 +30,15 @@ namespace Edu.Model.ViewModel.Question
/// 选择题选项列表【单选、多选、判断题】
/// 选择题选项列表【单选、多选、判断题】
/// </summary>
/// </summary>
public
class
optionItem
public
class
optionItem
{
{
/// <summary>
/// <summary>
/// 选项编号【例如:A,B,C,D】
/// 选项编号【例如:A,B,C,D】
/// </summary>
/// </summary>
public
string
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 选项内容
/// 选项内容
/// </summary>
/// </summary>
public
string
Content
{
get
;
set
;
}
public
string
Content
{
get
;
set
;
}
/// <summary>
/// <summary>
...
@@ -73,4 +73,35 @@ namespace Edu.Model.ViewModel.Question
...
@@ -73,4 +73,35 @@ namespace Edu.Model.ViewModel.Question
/// </summary>
/// </summary>
public
string
Content
{
get
;
set
;
}
public
string
Content
{
get
;
set
;
}
}
}
/// <summary>
/// 阅读理解
/// </summary>
public
class
readingComprehensioItem
{
/// <summary>
/// 问题类型(5-种基本题型)
/// </summary>
public
int
QuestionType
{
get
;
set
;
}
/// <summary>
/// 问题类型Key
/// </summary>
public
string
QuestionKey
{
get
;
set
;
}
/// <summary>
/// 问题类型名称
/// </summary>
public
string
QuestionName
{
get
;
set
;
}
/// <summary>
/// 题目名称
/// </summary>
public
string
SubTitle
{
get
;
set
;
}
/// <summary>
/// 题目答案内容
/// </summary>
public
object
SubAnwser
{
get
;
set
;
}
}
}
}
\ No newline at end of file
Edu.Module.Question/AnalysisQuestionTypeModule.cs
View file @
8f4aefd9
...
@@ -73,6 +73,86 @@ namespace Edu.Module.Question
...
@@ -73,6 +73,86 @@ namespace Edu.Module.Question
case
"cloze"
:
case
"cloze"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
List
<
optionItem
>>>(
data
);
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
List
<
optionItem
>>>(
data
);
break
;
break
;
//阅读理解
case
"reading-comprehensio"
:
var
readingList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
readingComprehensioItem
>>(
data
);
if
(
readingList
!=
null
&&
readingList
.
Count
>
0
)
{
foreach
(
var
item
in
readingList
)
{
switch
(
item
.
QuestionKey
)
{
//单选题
case
"single"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//多选题
case
"multiple"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//填空题
case
"fill-in"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//判断题
case
"judge"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//简答题
case
"short-answer"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
}
}
}
obj
=
readingList
;
break
;
//口语题
case
"spoken"
:
obj
=
data
;
break
;
//听力题
case
"listening"
:
var
listenList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
readingComprehensioItem
>>(
data
);
if
(
listenList
!=
null
&&
listenList
.
Count
>
0
)
{
foreach
(
var
item
in
listenList
)
{
switch
(
item
.
QuestionKey
)
{
//单选题
case
"single"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//多选题
case
"multiple"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//填空题
case
"fill-in"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//判断题
case
"judge"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
//简答题
case
"short-answer"
:
item
.
SubAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
item
.
SubAnwser
.
ToString
());
break
;
}
}
}
obj
=
listenList
;
break
;
//共用选择题
case
"sharing-choose"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
List
<
matchingItem
>>>(
data
);
break
;
//其它题
case
"other"
:
obj
=
data
;
break
;
}
}
return
obj
;
return
obj
;
}
}
...
...
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
8f4aefd9
...
@@ -72,6 +72,7 @@ WHERE 1=1 ");
...
@@ -72,6 +72,7 @@ WHERE 1=1 ");
builder
.
AppendFormat
(
" AND A.{0} LIKE @Title "
,
nameof
(
RB_Question_ViewModel
.
Title
));
builder
.
AppendFormat
(
" AND A.{0} LIKE @Title "
,
nameof
(
RB_Question_ViewModel
.
Title
));
parameters
.
Add
(
"Title"
,
"%"
+
query
.
Title
.
Trim
()
+
"%"
);
parameters
.
Add
(
"Title"
,
"%"
+
query
.
Title
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Question_ViewModel
.
QuestionId
));
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment