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
bd3aa620
Commit
bd3aa620
authored
Jan 12, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8549bc41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
RB_StuWords_ExamDetail.cs
Edu.Model/Entity/Exam/RB_StuWords_ExamDetail.cs
+7
-2
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+9
-2
AppletWordsController.cs
Edu.WebApi/Controllers/Applet/AppletWordsController.cs
+2
-1
No files found.
Edu.Model/Entity/Exam/RB_StuWords_ExamDetail.cs
View file @
bd3aa620
...
...
@@ -46,8 +46,13 @@ namespace Edu.Model.Entity.Exam
public
string
QuestionTypeKey
{
get
;
set
;
}
/// <summary>
///
题目分数
///
是否回答正确(1-是)
/// </summary>
public
decimal
Score
{
get
;
set
;
}
public
int
IsRight
{
get
;
set
;
}
/// <summary>
/// 学生答案
/// </summary>
public
string
Answer
{
get
;
set
;
}
}
}
Edu.Module.Exam/CourseExamModule.cs
View file @
bd3aa620
...
...
@@ -155,6 +155,7 @@ namespace Edu.Module.Exam
item
.
WordWrite
,
item
.
ChineseMean
,
item
.
FileUrl
,
IsTrue
=
0
,
};
return
fillinObj
;
}
...
...
@@ -282,6 +283,7 @@ namespace Edu.Module.Exam
item
.
WordWrite
,
item
.
ChineseMean
,
item
.
FileUrl
,
IsTrue
=
0
,
};
return
singleObj
;
}
...
...
@@ -511,14 +513,19 @@ namespace Edu.Module.Exam
public
bool
SubmitStuWordsExamModule
(
RB_StuWords_Exam_Extend
model
)
{
bool
flag
=
false
;
int
rightCount
=
model
?.
ExamDetailList
?.
Where
(
qitem
=>
qitem
.
IsRight
==
1
)?.
Count
()
??
0
;
int
totalCount
=
model
?.
ExamDetailList
?.
Count
??
0
;
model
.
Score
=
GetScoreModule
(
rightCount
,
totalCount
);
var
newId
=
stuWords_ExamRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
if
(
flag
&&
model
.
ExamDetailList
!=
null
&&
model
.
ExamDetailList
.
Count
>
0
)
{
foreach
(
var
item
in
model
.
ExamDetailList
)
{
{
item
.
DetailId
=
0
;
item
.
ExamId
=
newId
;
stuWords_ExamDetailRepository
.
Insert
(
item
);
}
}
return
flag
;
...
...
Edu.WebApi/Controllers/Applet/AppletWordsController.cs
View file @
bd3aa620
...
...
@@ -146,7 +146,8 @@ namespace Edu.WebApi.Controllers.Applet
QuestionContent
=
jobj
.
GetStringValue
(
"QuestionContent"
),
QuestionTypeId
=
jobj
.
GetInt
(
"QuestionTypeId"
),
QuestionTypeKey
=
jobj
.
GetStringValue
(
"QuestionTypeKey"
),
Score
=
jobj
.
GetDecimal
(
"Score"
),
IsRight
=
jobj
.
GetInt
(
"IsTrue"
),
Answer
=
jobj
.
GetStringValue
(
"Answer"
),
});
}
}
...
...
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