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
62862732
Commit
62862732
authored
Sep 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
73ad67db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
68 deletions
+71
-68
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+71
-68
No files found.
Edu.Module.Exam/PaperModule.cs
View file @
62862732
...
...
@@ -1329,47 +1329,24 @@ namespace Edu.Module.Exam
foreach
(
var
sItem
in
stuTempList
)
{
var
questionModel
=
gItem
?.
DetailsList
.
Where
(
qitem
=>
qitem
.
Id
==
sItem
.
DetailsId
)?.
FirstOrDefault
();
ExamScore
+=
questionModel
.
Score
;
var
QuestionContentObj
=
new
object
();
if
(
isShowAnswer
)
if
(
questionModel
!=
null
)
{
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
questionModel
.
QuestionTypeKey
,
questionModel
.
QuestionContent
,
isEdit
:
true
);
}
else
{
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
questionModel
.
QuestionTypeKey
,
sItem
.
StudentContent
,
isEdit
:
true
);
}
List
<
object
>
answerList
=
new
List
<
object
>();
List
<
object
>
quesAnswerList
=
new
List
<
object
>();
//填空题、分录题、资料题
if
(
questionModel
.
QuestionTypeKey
==
"fill-in"
||
questionModel
.
QuestionTypeKey
==
"entry-problem"
||
questionModel
.
QuestionTypeKey
==
"data-question"
)
{
var
tempList
=
sItem
.
StundetAnswer
.
Split
(
'★'
);
if
(
tempList
!=
null
&&
tempList
.
Count
()
>
0
)
ExamScore
+=
questionModel
.
Score
;
var
QuestionContentObj
=
new
object
();
if
(
isShowAnswer
)
{
foreach
(
var
tItem
in
tempList
)
{
answerList
.
Add
(
tItem
);
}
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
questionModel
.
QuestionTypeKey
,
questionModel
.
QuestionContent
,
isEdit
:
true
);
}
}
//完型填空
else
if
(
questionModel
.
QuestionTypeKey
==
"cloze"
)
{
if
(!
string
.
IsNullOrEmpty
(
questionModel
.
Answer
.
ToString
()))
else
{
var
qAnsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
questionModel
.
Answer
.
ToString
());
if
(
qAnsList
!=
null
&&
qAnsList
.
Count
()
>
0
)
{
foreach
(
var
tItem
in
qAnsList
)
{
quesAnswerList
.
Add
(
tItem
);
}
}
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
questionModel
.
QuestionTypeKey
,
sItem
.
StudentContent
,
isEdit
:
true
);
}
if
(!
string
.
IsNullOrEmpty
(
sItem
.
StundetAnswer
.
ToString
()))
List
<
object
>
answerList
=
new
List
<
object
>();
List
<
object
>
quesAnswerList
=
new
List
<
object
>();
//填空题、分录题、资料题
if
(
questionModel
.
QuestionTypeKey
==
"fill-in"
||
questionModel
.
QuestionTypeKey
==
"entry-problem"
||
questionModel
.
QuestionTypeKey
==
"data-question"
)
{
var
tempList
=
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
sItem
.
StundetAnswer
.
ToString
()
);
var
tempList
=
sItem
.
StundetAnswer
.
Split
(
'★'
);
if
(
tempList
!=
null
&&
tempList
.
Count
()
>
0
)
{
foreach
(
var
tItem
in
tempList
)
...
...
@@ -1378,50 +1355,76 @@ namespace Edu.Module.Exam
}
}
}
}
else
if
(
questionModel
.
QuestionTypeKey
==
"reading-comprehensio"
||
questionModel
.
QuestionTypeKey
==
"listening"
)
{
if
(!
string
.
IsNullOrEmpty
(
questionModel
.
Answer
.
ToString
()))
//完型填空
else
if
(
questionModel
.
QuestionTypeKey
==
"cloze"
)
{
var
qAnsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
questionModel
.
Answer
.
ToString
());
if
(
qAnsList
!=
null
&&
qAnsList
.
Count
()
>
0
)
if
(!
string
.
IsNullOrEmpty
(
questionModel
.
Answer
.
ToString
()))
{
foreach
(
var
tItem
in
qAnsList
)
var
qAnsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
questionModel
.
Answer
.
ToString
());
if
(
qAnsList
!=
null
&&
qAnsList
.
Count
()
>
0
)
{
quesAnswerList
.
Add
(
tItem
);
foreach
(
var
tItem
in
qAnsList
)
{
quesAnswerList
.
Add
(
tItem
);
}
}
}
if
(!
string
.
IsNullOrEmpty
(
sItem
.
StundetAnswer
.
ToString
()))
{
var
tempList
=
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
sItem
.
StundetAnswer
.
ToString
());
if
(
tempList
!=
null
&&
tempList
.
Count
()
>
0
)
{
foreach
(
var
tItem
in
tempList
)
{
answerList
.
Add
(
tItem
);
}
}
}
}
if
(!
string
.
IsNullOrEmpty
(
sItem
.
StundetAnswer
.
ToString
())
)
else
if
(
questionModel
.
QuestionTypeKey
==
"reading-comprehensio"
||
questionModel
.
QuestionTypeKey
==
"listening"
)
{
var
qList
=
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
sItem
.
StundetAnswer
.
ToString
());
foreach
(
var
mItem
in
qList
)
if
(!
string
.
IsNullOrEmpty
(
questionModel
.
Answer
.
ToString
()))
{
answerList
.
Add
(
mItem
);
var
qAnsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
questionModel
.
Answer
.
ToString
());
if
(
qAnsList
!=
null
&&
qAnsList
.
Count
()
>
0
)
{
foreach
(
var
tItem
in
qAnsList
)
{
quesAnswerList
.
Add
(
tItem
);
}
}
}
if
(!
string
.
IsNullOrEmpty
(
sItem
.
StundetAnswer
.
ToString
()))
{
var
qList
=
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
sItem
.
StundetAnswer
.
ToString
());
foreach
(
var
mItem
in
qList
)
{
answerList
.
Add
(
mItem
);
}
}
}
var
qObj
=
new
{
PaperDetailsId
=
sItem
.
DetailsId
,
//试卷问题编号
StundetDetailsId
=
sItem
.
Id
,
//考生答题编号
sItem
.
PaperId
,
questionModel
.
Title
,
questionModel
.
ShowTitle
,
QuestionContentObj
,
questionModel
.
QuestionTypeId
,
questionModel
.
QuestionTypeKey
,
questionModel
.
DifficultyType
,
questionModel
.
Score
,
Answer
=
isShowAnswer
?
questionModel
.
Answer
:
sItem
.
StundetAnswer
,
sItem
.
StundetAnswer
,
QuestionAnswerList
=
quesAnswerList
,
AnswerList
=
isShowAnswer
?
answerList
:
new
List
<
object
>(),
questionModel
.
AnswerParse
,
sItem
.
StudentScore
,
sItem
.
IsMarking
};
questionList
.
Add
(
qObj
);
}
var
qObj
=
new
{
PaperDetailsId
=
sItem
.
DetailsId
,
//试卷问题编号
StundetDetailsId
=
sItem
.
Id
,
//考生答题编号
sItem
.
PaperId
,
questionModel
.
Title
,
questionModel
.
ShowTitle
,
QuestionContentObj
,
questionModel
.
QuestionTypeId
,
questionModel
.
QuestionTypeKey
,
questionModel
.
DifficultyType
,
questionModel
.
Score
,
Answer
=
isShowAnswer
?
questionModel
.
Answer
:
sItem
.
StundetAnswer
,
sItem
.
StundetAnswer
,
QuestionAnswerList
=
quesAnswerList
,
AnswerList
=
isShowAnswer
?
answerList
:
new
List
<
object
>(),
questionModel
.
AnswerParse
,
sItem
.
StudentScore
,
sItem
.
IsMarking
};
questionList
.
Add
(
qObj
);
}
}
else
...
...
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