Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EduSpider
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
viitto
EduSpider
Commits
773d748e
Commit
773d748e
authored
Jun 01, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
900aff4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
StuHomeWorkRepository.cs
EduSpider.Repository/StuHomeWorkRepository.cs
+9
-7
CourseService.cs
EduSpider.Services/CourseService.cs
+18
-1
No files found.
EduSpider.Repository/StuHomeWorkRepository.cs
View file @
773d748e
...
...
@@ -134,9 +134,9 @@ WHERE 1=1
if
(
homeWorkList
.
Count
>=
5
)
{
var
firstList
=
homeWorkList
.
Where
(
qitem
=>
qitem
.
RowNum
<=
5
).
ToList
();
var
first
Flag
=
firstList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Any
();
//第一阶段有
未提交的作业就不生成系统评价
if
(
!
firstFlag
)
var
first
SubmitCount
=
firstList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Count
();
//第一阶段有
提交作业情况(至少一次)
if
(
firstList
.
Count
!=
firstSubmitCount
)
{
var
firstScore
=
firstList
.
Average
(
qitem
=>
qitem
.
Score_p
)
*
100
;
string
title
=
firstList
.
LastOrDefault
().
ThName
+
"老师的评语"
;
...
...
@@ -167,8 +167,9 @@ WHERE 1=1
if
(
homeWorkList
.
Count
>=
9
)
{
var
secondList
=
homeWorkList
.
Where
(
qitem
=>
qitem
.
RowNum
>
5
&&
qitem
.
RowNum
<=
9
).
ToList
();
var
secondFlag
=
secondList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Any
();
if
(!
secondFlag
)
var
secondSubmitCount
=
secondList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Count
();
//第二阶段有提交作业情况(至少一次)
if
(
secondList
.
Count
()!=
secondSubmitCount
)
{
var
secondScore
=
secondList
.
Average
(
qitem
=>
qitem
.
Score_p
)
*
100
;
info
=
GetCommentInfo
(
courseCommentModel
,
secondScore
);
...
...
@@ -197,8 +198,9 @@ WHERE 1=1
if
(
homeWorkList
.
Count
>=
13
)
{
var
thirdList
=
homeWorkList
.
Where
(
qitem
=>
qitem
.
RowNum
>
9
&&
qitem
.
RowNum
<=
13
).
ToList
();
var
thirdFlag
=
thirdList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Any
();
if
(!
thirdFlag
)
var
thirdSubmitCount
=
thirdList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Count
();
//第三阶段有提交作业情况(至少一次)
if
(
thirdList
.
Count
!=
thirdSubmitCount
)
{
var
thirdScore
=
thirdList
.
Average
(
qitem
=>
qitem
.
Score_p
)
*
100
;
info
=
GetCommentInfo
(
courseCommentModel
,
thirdScore
);
...
...
EduSpider.Services/CourseService.cs
View file @
773d748e
...
...
@@ -109,7 +109,24 @@ namespace EduSpider.Services
var
homeWorkList
=
StuHomeWorkRepository
.
GetStuHomeWorkListRepository
(
query
);
if
(
homeWorkList
!=
null
&&
homeWorkList
.
Count
>
0
)
{
dataList
.
AddRange
(
homeWorkList
);
foreach
(
var
item
in
homeWorkList
)
{
dataList
.
Add
(
new
ExamWorkResult
()
{
RowNum
=
item
.
RowNum
,
Stu_HomeWork_Id
=
item
.
Stu_HomeWork_Id
,
CreateTime
=
item
.
CreateTime
,
ResultType
=
item
.
ResultType
,
Comment
=
item
.
Comment
,
Title
=
item
.
Title
,
ScoreType
=
item
.
ScoreType
,
Score_Value
=
item
.
Score_Value
,
Score
=
item
.
Score
,
Score_p
=
item
.
Score_p
,
HomeWorkStatus
=
item
.
HomeWorkStatus
,
ThName
=
item
.
ThName
,
});
}
}
var
examList
=
Exam_ScoreRepository
.
GetExamScoreListRepository
(
query
);
if
(
examList
!=
null
&&
examList
.
Count
>
0
)
...
...
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