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
0c4f1611
Commit
0c4f1611
authored
Jan 20, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
82579196
f6386b46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+17
-9
No files found.
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
0c4f1611
...
...
@@ -195,22 +195,30 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
message
:
"请添加选择题选项!"
);
}
}
else
if
(
extModel
.
QuestionTypeKey
==
"fill-in"
)
{
var
fillInList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
extModel
.
QuestionContent
);
if
(
fillInList
!=
null
&&
fillInList
.
Count
>
0
)
{
if
(
fillInList
.
Where
(
qitem
=>
string
.
IsNullOrEmpty
(
qitem
.
Content
)).
Count
()
>
0
)
{
return
ApiResult
.
Failed
(
message
:
"请输入答案!"
);
}
}
else
{
return
ApiResult
.
Failed
(
message
:
"请添加答案!"
);
}
}
var
obj
=
new
object
();
switch
(
extModel
.
QuestionTypeKey
)
{
//单选题
case
"single"
:
break
;
//多选题
case
"multiple"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
extModel
.
QuestionContent
);
break
;
//填空题
case
"fill-in"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
extModel
.
QuestionContent
);
break
;
//判断题
case
"judge"
:
...
...
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