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
327924bc
Commit
327924bc
authored
Aug 20, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
96575919
33ce1603
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+7
-1
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+12
-3
No files found.
Edu.Module.Exam/PaperModule.cs
View file @
327924bc
...
...
@@ -632,8 +632,9 @@ namespace Edu.Module.Exam
/// 根据试卷编号获取试卷实体
/// </summary>
/// <param name="PaperId"></param>
/// <param name="isShowAnswer">是否查询答案</param>
/// <returns></returns>
public
RB_Examination_Paper_ViewModel
GetExaminationPaperModule
(
object
PaperId
)
public
RB_Examination_Paper_ViewModel
GetExaminationPaperModule
(
object
PaperId
,
bool
isShowAnswer
=
true
)
{
// 定义正则表达式用来匹配 img 标签
string
str
=
@"<img\b[^<>]*?\bsrc[\s\t\r\n]*=[\s\t\r\n]*[""']?[\s\t\r\n]*(?<imgUrl>[^\s\t\r\n""'<>]*)[^<>]*?/?[\s\t\r\n]*>"
;
...
...
@@ -673,6 +674,11 @@ namespace Edu.Module.Exam
gItem
.
GScore
=
gItem
?.
DetailsList
?.
Sum
(
qitem
=>
qitem
.
Score
)
??
0
;
foreach
(
var
sItem
in
gItem
.
DetailsList
)
{
if
(!
isShowAnswer
)
{
sItem
.
Answer
=
""
;
sItem
.
AnswerParse
=
""
;
}
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
;
...
...
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
327924bc
...
...
@@ -536,7 +536,17 @@ namespace Edu.WebApi.Controllers.Applet
item
.
ExamStatusStr
=
"已开始"
;
}
}
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
PaperId
,
x
.
Id
,
x
.
PaperName
,
x
.
PublishPic
,
ExamStartTime
=
x
.
ExamStartTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
x
.
ExamStatus
,
x
.
ExamStatusStr
});
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
PaperId
,
x
.
Id
,
x
.
PaperName
,
x
.
PublishPic
,
ExamStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
x
.
ExamStartTime
),
ExamEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
x
.
ExamEndTime
),
x
.
ExamTimes
,
x
.
ExamStatus
,
x
.
ExamStatusStr
});
pageModel
.
Count
=
rowsCount
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
...
...
@@ -552,8 +562,7 @@ namespace Edu.WebApi.Controllers.Applet
var
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
modelPublish
=
paperModule
.
GetExaminationPublishModule
(
Id
);
var
modelPaper
=
paperModule
.
GetExaminationPaperModule
(
PaperId
);
var
modelPaper
=
paperModule
.
GetExaminationPaperModule
(
PaperId
,
isShowAnswer
:
false
);
return
ApiResult
.
Success
(
data
:
new
{
Publish
=
modelPublish
,
Paper
=
modelPaper
});
}
#
endregion
...
...
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