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
b60446c7
Commit
b60446c7
authored
Aug 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1a398e12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+10
-4
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+1
-1
No files found.
Edu.Module.Exam/PaperModule.cs
View file @
b60446c7
...
@@ -11,6 +11,7 @@ using Edu.Module.Question;
...
@@ -11,6 +11,7 @@ using Edu.Module.Question;
using
Edu.Repository.Question
;
using
Edu.Repository.Question
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Question
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
Edu.Model.CacheModel
;
namespace
Edu.Module.Exam
namespace
Edu.Module.Exam
{
{
...
@@ -488,7 +489,6 @@ namespace Edu.Module.Exam
...
@@ -488,7 +489,6 @@ namespace Edu.Module.Exam
{
{
// 定义正则表达式用来匹配 img 标签
// 定义正则表达式用来匹配 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]*>"
;
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]*>"
;
var
extModel
=
examination_PaperRepository
.
GetEntity
<
RB_Examination_Paper_ViewModel
>(
PaperId
);
var
extModel
=
examination_PaperRepository
.
GetEntity
<
RB_Examination_Paper_ViewModel
>(
PaperId
);
if
(
extModel
!=
null
&&
extModel
.
PaperId
>
0
)
if
(
extModel
!=
null
&&
extModel
.
PaperId
>
0
)
{
{
...
@@ -496,7 +496,7 @@ namespace Edu.Module.Exam
...
@@ -496,7 +496,7 @@ namespace Edu.Module.Exam
extModel
.
GroupList
=
GetExaminationGroupListModule
(
new
RB_Examination_Group_ViewModel
()
extModel
.
GroupList
=
GetExaminationGroupListModule
(
new
RB_Examination_Group_ViewModel
()
{
{
PaperId
=
extModel
.
PaperId
PaperId
=
extModel
.
PaperId
})
;
})
?.
OrderBy
(
qitem
=>
qitem
.
GSortNum
)?.
ToList
();
var
detailsList
=
GetExaminationDetailsListModule
(
new
RB_Examination_Details_ViewModel
()
var
detailsList
=
GetExaminationDetailsListModule
(
new
RB_Examination_Details_ViewModel
()
{
{
PaperId
=
extModel
.
PaperId
PaperId
=
extModel
.
PaperId
...
@@ -505,7 +505,7 @@ namespace Edu.Module.Exam
...
@@ -505,7 +505,7 @@ namespace Edu.Module.Exam
{
{
foreach
(
var
gItem
in
extModel
.
GroupList
)
foreach
(
var
gItem
in
extModel
.
GroupList
)
{
{
gItem
.
DetailsList
=
detailsList
?.
Where
(
qitem
=>
qitem
.
QuestionTypeId
==
gItem
.
QuestionTypeId
)?.
ToList
()
??
new
List
<
RB_Examination_Details_ViewModel
>();
gItem
.
DetailsList
=
detailsList
?.
Where
(
qitem
=>
qitem
.
QuestionTypeId
==
gItem
.
QuestionTypeId
)?.
OrderBy
(
qitem
=>
qitem
.
SortNum
)?.
ToList
()
??
new
List
<
RB_Examination_Details_ViewModel
>();
if
(
gItem
.
DetailsList
!=
null
&&
gItem
.
DetailsList
.
Count
>
0
)
if
(
gItem
.
DetailsList
!=
null
&&
gItem
.
DetailsList
.
Count
>
0
)
{
{
gItem
.
GScore
=
gItem
?.
DetailsList
?.
Sum
(
qitem
=>
qitem
.
Score
)
??
0
;
gItem
.
GScore
=
gItem
?.
DetailsList
?.
Sum
(
qitem
=>
qitem
.
Score
)
??
0
;
...
@@ -586,6 +586,7 @@ namespace Edu.Module.Exam
...
@@ -586,6 +586,7 @@ namespace Edu.Module.Exam
{
{
flag
=
examination_DetailsRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Examination_Details_ViewModel
.
PaperId
),
PaperId
));
flag
=
examination_DetailsRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Examination_Details_ViewModel
.
PaperId
),
PaperId
));
}
}
//删除所有的自己点信息
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
{
{
foreach
(
var
item
in
childList
)
foreach
(
var
item
in
childList
)
...
@@ -602,9 +603,10 @@ namespace Edu.Module.Exam
...
@@ -602,9 +603,10 @@ namespace Edu.Module.Exam
/// 根据试卷编号复制试卷
/// 根据试卷编号复制试卷
/// </summary>
/// </summary>
/// <param name="PaperId"></param>
/// <param name="PaperId"></param>
/// <param name="UserInfo">用户信息</param>
/// <returns></returns>
/// <returns></returns>
[
TransactionCallHandler
]
[
TransactionCallHandler
]
public
bool
CopyExamnationPaperModule
(
int
PaperId
)
public
bool
CopyExamnationPaperModule
(
int
PaperId
,
UserInfo
UserInfo
)
{
{
var
flag
=
true
;
var
flag
=
true
;
var
model
=
GetExaminationPaperModule
(
PaperId
);
var
model
=
GetExaminationPaperModule
(
PaperId
);
...
@@ -614,6 +616,10 @@ namespace Edu.Module.Exam
...
@@ -614,6 +616,10 @@ namespace Edu.Module.Exam
return
flag
;
return
flag
;
}
}
model
.
PaperId
=
0
;
model
.
PaperId
=
0
;
model
.
CreateBy
=
UserInfo
.
Id
;
model
.
Group_Id
=
UserInfo
.
Group_Id
;
model
.
School_Id
=
UserInfo
.
School_Id
;
model
.
CreateTime
=
DateTime
.
Now
;
if
(
model
.
GroupList
!=
null
&&
model
.
GroupList
.
Count
>
0
)
if
(
model
.
GroupList
!=
null
&&
model
.
GroupList
.
Count
>
0
)
{
{
foreach
(
var
gItem
in
model
.
GroupList
)
foreach
(
var
gItem
in
model
.
GroupList
)
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
b60446c7
...
@@ -339,7 +339,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -339,7 +339,7 @@ namespace Edu.WebApi.Controllers.Exam
public
ApiResult
CopyPaper
()
public
ApiResult
CopyPaper
()
{
{
var
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
);
var
PaperId
=
base
.
ParmJObj
.
GetInt
(
"PaperId"
);
var
flag
=
paperModule
.
CopyExamnationPaperModule
(
PaperId
);
var
flag
=
paperModule
.
CopyExamnationPaperModule
(
PaperId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
...
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