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
c5a133f9
Commit
c5a133f9
authored
3 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1921f49b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+15
-0
No files found.
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
c5a133f9
...
...
@@ -354,6 +354,20 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
message
:
message
);
}
}
//判断题
else
if
(
extModel
.
QuestionTypeKey
==
"judge"
)
{
var
optionItems
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
extModel
.
QuestionContent
);
string
message
=
CheckChoose
(
optionItems
);
if
(!
string
.
IsNullOrEmpty
(
message
))
{
return
ApiResult
.
Failed
(
message
:
message
);
}
if
(
string
.
IsNullOrEmpty
(
extModel
.
Answer
))
{
extModel
.
Answer
=
optionItems
.
Where
(
qitem
=>
qitem
.
IsAnswer
==
true
)?.
FirstOrDefault
()?.
Name
;
}
}
//填空题
else
if
(
extModel
.
QuestionTypeKey
==
"fill-in"
)
{
...
...
@@ -364,6 +378,7 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
message
:
fillMessage
);
}
}
//简答题
else
if
(
extModel
.
QuestionTypeKey
==
"short-answer"
)
{
...
...
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