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
f3c08132
Commit
f3c08132
authored
Aug 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
edba8fbe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
618 additions
and
427 deletions
+618
-427
PaperModule2.cs
Edu.Module.Exam/PaperModule2.cs
+124
-79
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+484
-0
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+10
-348
No files found.
Edu.Module.Exam/PaperModule2.cs
View file @
f3c08132
...
...
@@ -2,6 +2,7 @@
using
Edu.Repository.Exam
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Module.Exam
...
...
@@ -18,15 +19,20 @@ namespace Edu.Module.Exam
private
readonly
RB_Examination_StudentDetailsRepository
examination_StudentDetailsRepository
=
new
RB_Examination_StudentDetailsRepository
();
/// <summary>
/// 自动阅卷
处理类
/// 自动阅卷
方法
/// </summary>
/// <param name="PaperId">试卷编号</param>
/// <param name="PublishId">发布编号</param>
/// <param name="GuestId">学员编号</param>
/// <returns></returns>
public
bool
AutoReviewPaperModule
(
int
PaperId
,
int
PublishId
,
int
GuestId
)
public
bool
AutoReviewPaperModule
(
int
PaperId
,
int
PublishId
,
int
GuestId
)
{
bool
flag
=
false
;
var
paperConfig
=
examination_PublishRepository
.
GetEntity
(
PublishId
);
//多选题未选全是否给一半的分
var
IsHalfScore
=
paperConfig
?.
IsHalfScore
??
0
;
List
<
RB_Examination_StudentDetails_ViewModel
>
answerList
=
new
List
<
RB_Examination_StudentDetails_ViewModel
>();
//试卷题目
var
sourceQuestionList
=
examination_DetailsRepository
.
GetExaminationDetailsListRepository
(
new
RB_Examination_Details_ViewModel
()
{
PaperId
=
PaperId
});
//学员提交答案列表
...
...
@@ -40,84 +46,123 @@ namespace Edu.Module.Exam
{
foreach
(
var
sItem
in
sourceQuestionList
)
{
switch
(
sItem
.
QuestionTypeKey
)
var
answerModel
=
stuQuesList
?.
Where
(
qitem
=>
qitem
.
DetailsId
==
sItem
.
Id
)?.
FirstOrDefault
();
if
(
answerModel
!=
null
&&
answerModel
.
Id
>
0
)
{
//单选题
case
"single"
:
break
;
//多选题
case
"multiple"
:
break
;
//填空题
case
"fill-in"
:
break
;
//判断题
case
"judge"
:
break
;
//简答题
case
"short-answer"
:
break
;
//名词解释
case
"noun-explanation"
:
break
;
//论述题
case
"essay-question"
:
break
;
//计算题
case
"calculation"
:
break
;
//分录题
case
"entry-problem"
:
break
;
//资料题
case
"data-question"
:
break
;
//连线题
case
"matching"
:
break
;
//排序题
case
"sorting-problem"
:
break
;
//完型填空
case
"cloze"
:
break
;
//阅读理解
case
"reading-comprehensio"
:
break
;
//口语题
case
"spoken"
:
break
;
//听力题
case
"listening"
:
break
;
//公用选项题
case
"sharing-choose"
:
break
;
//其它题
case
"other"
:
break
;
//单选题-数字
case
"single-number"
:
break
;
switch
(
sItem
.
QuestionTypeKey
)
{
//单选题
case
"single"
:
if
(
sItem
.
Answer
==
answerModel
.
StundetAnswer
)
{
answerList
.
Add
(
new
RB_Examination_StudentDetails_ViewModel
()
{
Id
=
answerModel
.
Id
,
StundetScore
=
sItem
.
Score
});
}
break
;
//多选题
case
"multiple"
:
break
;
//填空题
case
"fill-in"
:
break
;
//判断题
case
"judge"
:
if
(
sItem
.
Answer
==
answerModel
.
StundetAnswer
)
{
answerList
.
Add
(
new
RB_Examination_StudentDetails_ViewModel
()
{
Id
=
answerModel
.
Id
,
StundetScore
=
sItem
.
Score
});
}
break
;
//简答题
case
"short-answer"
:
break
;
//名词解释
case
"noun-explanation"
:
break
;
//论述题
case
"essay-question"
:
break
;
//计算题
case
"calculation"
:
break
;
//分录题
case
"entry-problem"
:
break
;
//资料题
case
"data-question"
:
break
;
//连线题
case
"matching"
:
if
(
sItem
.
Answer
==
answerModel
.
StundetAnswer
)
{
answerList
.
Add
(
new
RB_Examination_StudentDetails_ViewModel
()
{
Id
=
answerModel
.
Id
,
StundetScore
=
sItem
.
Score
});
}
break
;
//排序题
case
"sorting-problem"
:
if
(
sItem
.
Answer
==
answerModel
.
StundetAnswer
)
{
answerList
.
Add
(
new
RB_Examination_StudentDetails_ViewModel
()
{
Id
=
answerModel
.
Id
,
StundetScore
=
sItem
.
Score
});
}
break
;
//完型填空
case
"cloze"
:
break
;
//阅读理解
case
"reading-comprehensio"
:
break
;
//口语题
case
"spoken"
:
break
;
//听力题
case
"listening"
:
break
;
//公用选项题
case
"sharing-choose"
:
break
;
//其它题
case
"other"
:
break
;
//单选题-数字
case
"single-number"
:
if
(
sItem
.
Answer
==
answerModel
.
StundetAnswer
)
{
answerList
.
Add
(
new
RB_Examination_StudentDetails_ViewModel
()
{
Id
=
answerModel
.
Id
,
StundetScore
=
sItem
.
Score
});
}
break
;
}
}
}
}
...
...
Edu.Module.Question/AnalysisQuestionTypeModule.cs
View file @
f3c08132
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
f3c08132
This diff is collapsed.
Click to expand it.
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