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
5434c5d8
Commit
5434c5d8
authored
Jan 05, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
6607a38b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
28 deletions
+59
-28
RB_Question_Type.cs
Edu.Model/Entity/Question/RB_Question_Type.cs
+5
-0
RB_Question_Type_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
+0
-27
RB_Question_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
+5
-0
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+36
-0
QuestionModule.cs
Edu.Module.Question/QuestionModule.cs
+13
-1
No files found.
Edu.Model/Entity/Question/RB_Question_Type.cs
View file @
5434c5d8
...
...
@@ -35,5 +35,10 @@ namespace Edu.Model.Entity.Question
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// JSON配置
/// </summary>
public
string
JsonConfig
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
View file @
5434c5d8
...
...
@@ -47,31 +47,4 @@ namespace Edu.Model.ViewModel.Question
public
bool
IsAnswer
{
get
;
set
;
}
}
/// <summary>
/// 单选题
/// </summary>
public
class
singleQuestion
{
/// <summary>
/// 题目名称
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 答案解析
/// </summary>
public
string
AnswerAnalysis
{
get
;
set
;
}
/// <summary>
/// 选项列表
/// </summary>
public
List
<
optionItem
>
AnswerOptionList
{
get
;
set
;
}
/// <summary>
/// 难易程度
/// </summary>
public
DifficultyTypeEnum
EasyType
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
View file @
5434c5d8
...
...
@@ -53,5 +53,10 @@ namespace Edu.Model.ViewModel.Question
/// </summary>
public
string
QDifficultyType
{
get
;
set
;
}
/// <summary>
/// 选项
/// </summary>
public
object
AnswerObj
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Question/AnalysisQuestionTypeModule.cs
0 → 100644
View file @
5434c5d8
using
Edu.Model.ViewModel.Question
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Module.Question
{
/// <summary>
/// 解析问题
/// </summary>
public
class
AnalysisQuestionTypeModule
{
/// <summary>
/// 问题解析
/// </summary>
/// <param name="key"></param>
/// <param name="data"></param>
/// <returns></returns>
public
object
ParsingQuestion
(
string
key
,
string
data
)
{
var
obj
=
new
object
();
switch
(
key
)
{
//单选题
case
"single"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
break
;
//多选题
case
"multiple"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
break
;
}
return
obj
;
}
}
}
Edu.Module.Question/QuestionModule.cs
View file @
5434c5d8
...
...
@@ -29,6 +29,11 @@ namespace Edu.Module.Question
/// </summary>
private
readonly
RB_Question_PointRepository
question_PointRepository
=
new
RB_Question_PointRepository
();
/// <summary>
/// 问题解析处理类
/// </summary>
private
readonly
AnalysisQuestionTypeModule
analysisQuestion
=
new
AnalysisQuestionTypeModule
();
/// <summary>
/// 获取题目类型列表
/// </summary>
...
...
@@ -143,9 +148,16 @@ namespace Edu.Module.Question
/// <returns></returns>
public
RB_Question_ViewModel
GetQuestionModule
(
object
QuestionId
)
{
return
questionRepository
.
GetEntity
<
RB_Question_ViewModel
>(
QuestionId
);
var
extModel
=
questionRepository
.
GetEntity
<
RB_Question_ViewModel
>(
QuestionId
);
if
(
extModel
!=
null
)
{
extModel
.
AnswerObj
=
analysisQuestion
.
ParsingQuestion
(
extModel
.
QuestionTypeKey
,
extModel
.
Answer
);
}
return
extModel
;
}
/// <summary>
/// 获取问题知识点列表
/// </summary>
...
...
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