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
e8f58330
Commit
e8f58330
authored
Aug 19, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
知识点修改
parent
2b1af9b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
RB_Examination_Details_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Details_ViewModel.cs
+6
-0
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+20
-0
No files found.
Edu.Model/ViewModel/Exam/RB_Examination_Details_ViewModel.cs
View file @
e8f58330
using
Edu.Model.Entity.Exam
;
using
Edu.Model.ViewModel.Question
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
...
...
@@ -29,5 +30,10 @@ namespace Edu.Model.ViewModel.Exam
/// 问题数量
/// </summary>
public
int
QuestionCount
{
get
;
set
;
}
/// <summary>
/// 知识点
/// </summary>
public
List
<
RB_Question_Point_ViewModel
>
QuestionPointList
{
get
;
set
;
}
}
}
Edu.Module.Exam/PaperModule.cs
View file @
e8f58330
...
...
@@ -69,6 +69,11 @@ namespace Edu.Module.Exam
/// </summary>
private
readonly
Repository
.
EduTask
.
RB_Education_ReceiptRepository
education_ReceiptRepository
=
new
Repository
.
EduTask
.
RB_Education_ReceiptRepository
();
/// <summary>
/// 知识点仓储层对象
/// </summary>
private
readonly
RB_Question_PointRepository
question_PointRepository
=
new
RB_Question_PointRepository
();
/// <summary>
/// 获取试卷分页列表
/// </summary>
...
...
@@ -539,6 +544,20 @@ namespace Edu.Module.Exam
});
if
(
extModel
.
GroupList
!=
null
&&
extModel
.
GroupList
.
Count
>
0
&&
detailsList
!=
null
&&
detailsList
.
Count
>
0
)
{
List
<
int
>
pointsList
=
new
List
<
int
>();
var
tempPoints
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
detailsList
?.
Where
(
qitem
=>
!
string
.
IsNullOrEmpty
(
qitem
.
Knowledge
))?.
Select
(
qitem
=>
qitem
.
Knowledge
)));
if
(
tempPoints
!=
null
&&
tempPoints
.
Count
>
0
)
{
pointsList
.
AddRange
(
tempPoints
);
}
List
<
RB_Question_Point_ViewModel
>
pointList
=
new
List
<
RB_Question_Point_ViewModel
>();
if
(
pointsList
!=
null
&&
pointsList
.
Count
>
0
)
{
pointList
=
question_PointRepository
.
GetPointListRepository
(
new
RB_Question_Point_ViewModel
()
{
QPointIds
=
string
.
Join
(
","
,
pointsList
)
});
}
foreach
(
var
gItem
in
extModel
.
GroupList
)
{
gItem
.
DetailsList
=
detailsList
?.
Where
(
qitem
=>
qitem
.
QuestionTypeId
==
gItem
.
QuestionTypeId
)?.
OrderBy
(
qitem
=>
qitem
.
SortNum
)?.
ToList
()
??
new
List
<
RB_Examination_Details_ViewModel
>();
...
...
@@ -547,6 +566,7 @@ namespace Edu.Module.Exam
gItem
.
GScore
=
gItem
?.
DetailsList
?.
Sum
(
qitem
=>
qitem
.
Score
)
??
0
;
foreach
(
var
sItem
in
gItem
.
DetailsList
)
{
sItem
.
QuestionPointList
=
pointList
?.
Where
(
qitem
=>
sItem
.
Knowledge
.
Contains
(
qitem
.
PointId
.
ToString
()))?.
ToList
()
??
new
List
<
RB_Question_Point_ViewModel
>();
sItem
.
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
sItem
.
QuestionTypeKey
,
sItem
.
QuestionContent
);
string
newTitle
=
sItem
.
Title
;
try
...
...
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