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
5e75b49c
Commit
5e75b49c
authored
Jan 06, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
c7c417dc
7d189fa4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
9 deletions
+49
-9
RB_Question.cs
Edu.Model/Entity/Question/RB_Question.cs
+2
-3
RB_Question_Type_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
+12
-1
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+1
-1
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+29
-1
QuestionModule.cs
Edu.Module.Question/QuestionModule.cs
+1
-1
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+4
-2
No files found.
Edu.Model/Entity/Question/RB_Question.cs
View file @
5e75b49c
...
...
@@ -93,9 +93,8 @@ namespace Edu.Model.Entity.Question
public
string
Answer
{
get
;
set
;
}
/// <summary>
///
问题分数
///
填空题(答案顺序打乱也判正确)
/// </summary>
public
decimal
Score
{
get
;
set
;
}
public
int
IsMutex
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Question/RB_Question_Type_ViewModel.cs
View file @
5e75b49c
...
...
@@ -27,7 +27,7 @@ namespace Edu.Model.ViewModel.Question
}
/// <summary>
/// 选择题选项列表
/// 选择题选项列表
【单选、多选、判断题】
/// </summary>
public
class
optionItem
{
...
...
@@ -47,4 +47,15 @@ namespace Edu.Model.ViewModel.Question
public
bool
IsAnswer
{
get
;
set
;
}
}
/// <summary>
/// 填空题、简答题
/// </summary>
public
class
fillInItem
{
/// <summary>
/// 选项内容
/// </summary>
public
string
Content
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/StudentBillModule.cs
View file @
5e75b49c
...
...
@@ -870,7 +870,7 @@ namespace Edu.Module.Course
{
new
{
CostTypeId
=
fcmodel
.
CostTypeId
,
fcmodel
.
CostTypeId
,
Number
=
1
,
OriginalMoney
=
backModel
.
RealityBackMoney
,
UnitPrice
=
backModel
.
RealityBackMoney
,
...
...
Edu.Module.Question/AnalysisQuestionTypeModule.cs
View file @
5e75b49c
...
...
@@ -20,7 +20,7 @@ namespace Edu.Module.Question
{
var
obj
=
new
object
();
switch
(
key
)
{
{
//单选题
case
"single"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
...
...
@@ -29,6 +29,34 @@ namespace Edu.Module.Question
case
"multiple"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
break
;
//填空题
case
"fill-in"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
data
);
break
;
//判断题
case
"judge"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
break
;
//简答题
case
"short-answer"
:
obj
=
data
;
break
;
//名词解释
case
"noun-explanation"
:
obj
=
data
;
break
;
//论述题
case
"essay-question"
:
obj
=
data
;
break
;
//计算题
case
"calculation"
:
obj
=
data
;
break
;
//分录题
case
"entry-problem"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
fillInItem
>>(
data
);
break
;
}
return
obj
;
}
...
...
Edu.Module.Question/QuestionModule.cs
View file @
5e75b49c
...
...
@@ -89,7 +89,7 @@ namespace Edu.Module.Question
{
nameof
(
RB_Question_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Question_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Question_ViewModel
.
Answer
),
model
.
Answer
},
{
nameof
(
RB_Question_ViewModel
.
Score
),
model
.
Score
},
{
nameof
(
RB_Question_ViewModel
.
IsMutex
),
model
.
IsMutex
},
};
flag
=
questionRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Question_ViewModel
.
QuestionId
),
model
.
QuestionId
));
}
...
...
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
5e75b49c
using
Edu.Model.ViewModel.Question
;
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.Question
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -55,6 +56,7 @@ WHERE 1=1
SELECT A.*,IFNULL(B.`Name` ,'') AS QuestionTypeName
FROM RB_Question AS A LEFT JOIN RB_Question_Type B ON A.QuestionTypeId=B.QId
WHERE 1=1 "
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Question_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Question_ViewModel
>();
...
...
@@ -70,7 +72,7 @@ WHERE 1=1 ");
builder
.
AppendFormat
(
" AND A.{0} LIKE @Title "
,
nameof
(
RB_Question_ViewModel
.
Title
));
parameters
.
Add
(
"Title"
,
"%"
+
query
.
Title
.
Trim
()
+
"%"
);
}
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
...
...
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