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
6dce3431
Commit
6dce3431
authored
Sep 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8479da0b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
RB_Question_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
+6
-0
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+19
-0
QuestionModule.cs
Edu.Module.Question/QuestionModule.cs
+17
-0
No files found.
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
View file @
6dce3431
...
...
@@ -116,5 +116,11 @@ namespace Edu.Model.ViewModel.Question
/// 问题数量
/// </summary>
public
int
QuestionCount
{
get
;
set
;
}
/// <summary>
/// 阅读理解、听力、完型,答案列表
/// </summary>
public
List
<
object
>
QuestionAnswerList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Question/AnalysisQuestionTypeModule.cs
View file @
6dce3431
...
...
@@ -681,6 +681,25 @@ namespace Edu.Module.Question
}
}
break
;
//单选题(数字)
case
"single-number"
:
var
singleNumberAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
string
singleNumberMessage
=
CheckChoose
(
singleNumberAnwser
);
resultList
.
Add
(
new
SubAnswerItem
{
SubQuestionId
=
Index
.
ToString
(),
SubQuestionKey
=
item
.
QuestionKey
,
SubAnswer
=
singleNumberAnwser
.
Where
(
qitem
=>
qitem
.
IsAnswer
==
true
)?.
FirstOrDefault
()?.
Name
??
""
,
SubScore
=
item
.
SubScore
,
});
if
(
IsRequire
)
{
if
(!
string
.
IsNullOrEmpty
(
singleNumberMessage
))
{
return
singleNumberMessage
;
}
}
break
;
//多选题
case
"multiple"
:
var
multipleAnwser
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
item
.
SubAnwser
.
ToString
());
...
...
Edu.Module.Question/QuestionModule.cs
View file @
6dce3431
...
...
@@ -306,10 +306,27 @@ namespace Edu.Module.Question
extModel
.
QuestionTypeName
=
question_TypeRepository
.
GetEntity
(
extModel
.
QuestionTypeId
)?.
Name
??
""
;
}
extModel
.
QuestionContentObj
=
ParsingQuestionModule
(
extModel
.
QuestionTypeKey
,
extModel
.
QuestionContent
);
List
<
object
>
questionAnswerList
=
new
List
<
object
>();
if
(!
string
.
IsNullOrEmpty
(
extModel
.
Knowledge
))
{
extModel
.
QuestionPointList
=
GetPointListModule
(
new
RB_Question_Point_ViewModel
()
{
QPointIds
=
extModel
.
Knowledge
});
}
if
(
extModel
.
QuestionTypeKey
==
"reading-comprehensio"
||
extModel
.
QuestionTypeKey
==
"listening"
||
extModel
.
QuestionTypeKey
==
"cloze"
)
{
analysisQuestion
.
CheckQuestion
(
extModel
.
QuestionTypeKey
,
extModel
.
QuestionContent
,
extModel
.
Answer
,
out
string
newAnswer
,
IsRequire
:
false
);
if
(!
string
.
IsNullOrEmpty
(
newAnswer
))
{
var
qAnsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
newAnswer
);
if
(
qAnsList
!=
null
&&
qAnsList
.
Count
()
>
0
)
{
foreach
(
var
tItem
in
qAnsList
)
{
questionAnswerList
.
Add
(
tItem
);
}
}
}
}
extModel
.
QuestionAnswerList
=
questionAnswerList
;
if
(
extModel
.
QuestionTypeKey
==
"cloze"
&&
!
string
.
IsNullOrEmpty
(
extModel
.
Title
)
&&
isReplaceClozeTitle
==
1
)
{
string
categoryRule1
=
@"##[1234567890]##"
;
...
...
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