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
99f9ec08
Commit
99f9ec08
authored
Jan 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b5e9eae8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
21 deletions
+52
-21
RB_Examination_Student_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Student_ViewModel.cs
+2
-2
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+19
-3
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+22
-9
RB_Examination_StudentRepository.cs
Edu.Repository/Exam/RB_Examination_StudentRepository.cs
+1
-1
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+1
-1
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+7
-5
No files found.
Edu.Model/ViewModel/Exam/RB_Examination_Student_ViewModel.cs
View file @
99f9ec08
...
@@ -40,11 +40,11 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -40,11 +40,11 @@ namespace Edu.Model.ViewModel.Exam
/// <summary>
/// <summary>
/// 考试开始时间
/// 考试开始时间
/// </summary>
/// </summary>
public
DateTime
Exam
StartTime
{
get
;
set
;
}
public
DateTime
Paper
StartTime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 考试结束时间
/// 考试结束时间
/// </summary>
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
public
DateTime
Paper
EndTime
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Module.Exam/CourseExamModule.cs
View file @
99f9ec08
...
@@ -33,6 +33,7 @@ namespace Edu.Module.Exam
...
@@ -33,6 +33,7 @@ namespace Edu.Module.Exam
CourseId
=
CourseId
,
CourseId
=
CourseId
,
QChapterIds
=
ChapterId
+
","
+
NextChapterId
QChapterIds
=
ChapterId
+
","
+
NextChapterId
});
});
List
<
object
>
GroupList
=
new
List
<
object
>();
var
reviewList
=
list
?.
Where
(
qitem
=>
qitem
.
ChapterId
==
ChapterId
)?.
OrderBy
(
qitem
=>
Guid
.
NewGuid
())?.
ToList
();
var
reviewList
=
list
?.
Where
(
qitem
=>
qitem
.
ChapterId
==
ChapterId
)?.
OrderBy
(
qitem
=>
Guid
.
NewGuid
())?.
ToList
();
var
prepList
=
list
?.
Where
(
qitem
=>
qitem
.
ChapterId
==
NextChapterId
)?.
OrderBy
(
qitem
=>
Guid
.
NewGuid
())?.
ToList
();
var
prepList
=
list
?.
Where
(
qitem
=>
qitem
.
ChapterId
==
NextChapterId
)?.
OrderBy
(
qitem
=>
Guid
.
NewGuid
())?.
ToList
();
if
(
reviewList
!=
null
&&
reviewList
.
Count
>
0
)
if
(
reviewList
!=
null
&&
reviewList
.
Count
>
0
)
...
@@ -41,10 +42,25 @@ namespace Edu.Module.Exam
...
@@ -41,10 +42,25 @@ namespace Edu.Module.Exam
{
{
//选择题
//选择题
if
(
i
%
2
==
0
)
if
(
i
%
2
==
0
)
{
{
}
GroupList
.
Add
(
new
{
GroupName
=
"单选题"
,
QuestionTypeId
=
1
,
QuestionTypeKey
=
"single"
,
});
}
//填空题
else
{
GroupList
.
Add
(
new
{
GroupName
=
"填空题"
,
QuestionTypeId
=
3
,
QuestionTypeKey
=
"fill-in"
,
});
}
}
}
}
}
...
...
Edu.Module.Exam/PaperModule.cs
View file @
99f9ec08
...
@@ -1634,17 +1634,30 @@ namespace Edu.Module.Exam
...
@@ -1634,17 +1634,30 @@ namespace Edu.Module.Exam
/// <returns></returns>
/// <returns></returns>
public
virtual
bool
SetStuExamStartTimeModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
)
public
virtual
bool
SetStuExamStartTimeModule
(
int
PublishId
,
int
GuestId
,
int
PaperId
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
bool
flag
=
false
;
var
model
=
examination_StudentRepository
.
GetExaminationStudentListRepository
(
new
RB_Examination_Student_ViewModel
()
{
{
{
nameof
(
RB_Examination_Student_ViewModel
.
ExamStartTime
),
DateTime
.
Now
},
PaperId
=
PaperId
,
};
PublishId
=
PublishId
,
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
GuestId
=
GuestId
})?.
FirstOrDefault
();
if
(
model
!=
null
)
{
{
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
PaperId
),
PaperId
),
if
(
model
.
ExamStartTime
==
null
)
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
PublishId
),
{
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
GuestId
),
GuestId
),
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
};
{
bool
flag
=
examination_StudentRepository
.
Update
(
fileds
,
wheres
);
{
nameof
(
RB_Examination_Student_ViewModel
.
ExamStartTime
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
PaperId
),
PaperId
),
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
PublishId
),
PublishId
),
new
WhereHelper
(
nameof
(
RB_Examination_Student_ViewModel
.
GuestId
),
GuestId
),
};
flag
=
examination_StudentRepository
.
Update
(
fileds
,
wheres
);
}
}
return
flag
;
return
flag
;
}
}
...
...
Edu.Repository/Exam/RB_Examination_StudentRepository.cs
View file @
99f9ec08
...
@@ -24,7 +24,7 @@ namespace Edu.Repository.Exam
...
@@ -24,7 +24,7 @@ namespace Edu.Repository.Exam
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,c.ClassName,b.Mobile,s.StuIcon,p.ExamStartTime
,p.ExamEndTime AS
EndTime
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,c.ClassName,b.Mobile,s.StuIcon,p.ExamStartTime
AS PaperStartTime,p.ExamEndTime AS Paper
EndTime
FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.GuestId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.GuestId
...
...
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
99f9ec08
...
@@ -110,7 +110,7 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -110,7 +110,7 @@ namespace Edu.WebApi.Controllers.Applet
classModel
=
new
Model
.
ViewModel
.
Grade
.
RB_Class_Time_Extend
();
classModel
=
new
Model
.
ViewModel
.
Grade
.
RB_Class_Time_Extend
();
}
}
#
region
我的试卷
#
region
我的试卷
List
<
Model
.
ViewModel
.
Exam
.
RB_Examination_Publish_ViewModel
>
examinationPublishList
=
new
List
<
Model
.
ViewModel
.
Exam
.
RB_Examination_Publish_ViewModel
>();
List
<
RB_Examination_Publish_ViewModel
>
examinationPublishList
=
new
List
<
RB_Examination_Publish_ViewModel
>();
if
(
studentModel
!=
null
&&
studentModel
.
GuestId
>
0
)
if
(
studentModel
!=
null
&&
studentModel
.
GuestId
>
0
)
{
{
examinationPublishList
=
paperModule
.
GetGuestExaminationPublishPage
(
1
,
5
,
out
long
rowsCount
,
examinationPublishList
=
paperModule
.
GetGuestExaminationPublishPage
(
1
,
5
,
out
long
rowsCount
,
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
99f9ec08
...
@@ -854,18 +854,18 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -854,18 +854,18 @@ namespace Edu.WebApi.Controllers.Exam
var
list
=
paperModule
.
GetExaminationStudentPageRepository
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
paperModule
.
GetExaminationStudentPageRepository
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
if
(
item
.
Exam
StartTime
>
System
.
DateTime
.
Now
)
if
(
item
.
Paper
StartTime
>
System
.
DateTime
.
Now
)
{
{
item
.
ExamStatus
=
ExamTestStatusEnum
.
NotStarted
;
item
.
ExamStatus
=
ExamTestStatusEnum
.
NotStarted
;
}
}
else
if
(
item
.
ExamStartTime
<
System
.
DateTime
.
Now
&&
item
.
EndTime
>
System
.
DateTime
.
Now
)
else
if
(
item
.
PaperStartTime
<
System
.
DateTime
.
Now
&&
item
.
Paper
EndTime
>
System
.
DateTime
.
Now
)
{
{
if
(
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishTest
&&
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishScoring
)
if
(
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishTest
&&
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishScoring
)
{
{
item
.
ExamStatus
=
ExamTestStatusEnum
.
FinishStarted
;
item
.
ExamStatus
=
ExamTestStatusEnum
.
FinishStarted
;
}
}
}
}
else
if
(
item
.
EndTime
<
System
.
DateTime
.
Now
)
else
if
(
item
.
Paper
EndTime
<
System
.
DateTime
.
Now
)
{
{
if
(
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishTest
&&
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishScoring
)
if
(
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishTest
&&
item
.
ExamStatus
!=
ExamTestStatusEnum
.
FinishScoring
)
{
{
...
@@ -888,8 +888,10 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -888,8 +888,10 @@ namespace Edu.WebApi.Controllers.Exam
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
ExamStatus
,
item
.
ExamStatus
,
ExamStatusName
=
item
.
ExamStatus
.
ToName
(),
ExamStatusName
=
item
.
ExamStatus
.
ToName
(),
ExamStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamStartTime
),
ExamStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamStartTime
),
EndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
EndTime
),
ExamEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
ExamEndTime
),
PaperStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperStartTime
),
PaperEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
PaperEndTime
),
};
};
result
.
Add
(
obj
);
result
.
Add
(
obj
);
}
}
...
...
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