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
648e63e5
Commit
648e63e5
authored
Jun 02, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e047b0f3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
StuCommentRepository.cs
EduSpider.Repository/StuCommentRepository.cs
+1
-2
StuHomeWorkRepository.cs
EduSpider.Repository/StuHomeWorkRepository.cs
+3
-3
CourseService.cs
EduSpider.Services/CourseService.cs
+1
-1
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+2
-2
No files found.
EduSpider.Repository/StuCommentRepository.cs
View file @
648e63e5
...
@@ -85,8 +85,7 @@ WHERE 1=1
...
@@ -85,8 +85,7 @@ WHERE 1=1
/// <returns></returns>
/// <returns></returns>
public
bool
BatchSetStuCommentRepository
(
List
<
RB_Stu_Comment
>
list
)
public
bool
BatchSetStuCommentRepository
(
List
<
RB_Stu_Comment
>
list
)
{
{
bool
flag
=
false
;
bool
flag
=
base
.
BatchInsert
(
list
);
flag
=
base
.
BatchInsert
(
list
);
return
flag
;
return
flag
;
}
}
...
...
EduSpider.Repository/StuHomeWorkRepository.cs
View file @
648e63e5
...
@@ -90,7 +90,7 @@ WHERE 1=1
...
@@ -90,7 +90,7 @@ WHERE 1=1
var
dataList
=
GetStuHomeWorkDetailsListRepository
(
new
CourseQuery
()
{
CourseId
=
CourseId
});
var
dataList
=
GetStuHomeWorkDetailsListRepository
(
new
CourseQuery
()
{
CourseId
=
CourseId
});
var
courseList
=
dataList
.
GroupBy
(
qitem
=>
new
{
qitem
.
course_id
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
course_id
});
var
courseList
=
dataList
.
GroupBy
(
qitem
=>
new
{
qitem
.
course_id
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
course_id
});
if
(
courseList
!=
null
&&
courseList
.
Count
()
>
0
)
if
(
courseList
!=
null
&&
courseList
.
Any
()
)
{
{
foreach
(
var
cItem
in
courseList
)
foreach
(
var
cItem
in
courseList
)
{
{
...
@@ -180,7 +180,7 @@ WHERE 1=1
...
@@ -180,7 +180,7 @@ WHERE 1=1
var
secondList
=
homeWorkList
.
Where
(
qitem
=>
qitem
.
RowNum
>
5
&&
qitem
.
RowNum
<=
9
).
ToList
();
var
secondList
=
homeWorkList
.
Where
(
qitem
=>
qitem
.
RowNum
>
5
&&
qitem
.
RowNum
<=
9
).
ToList
();
var
secondSubmitCount
=
secondList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Count
();
var
secondSubmitCount
=
secondList
.
Where
(
qitem
=>
qitem
.
HomeWorkStatus
==
0
).
Count
();
//第二阶段有提交作业情况(至少一次)
//第二阶段有提交作业情况(至少一次)
if
(
secondList
.
Count
()
!=
secondSubmitCount
)
if
(
secondList
.
Count
!=
secondSubmitCount
)
{
{
var
secondScore
=
secondList
.
Average
(
qitem
=>
qitem
.
Score_p
)
*
100
;
var
secondScore
=
secondList
.
Average
(
qitem
=>
qitem
.
Score_p
)
*
100
;
info
=
GetCommentInfo
(
courseCommentModel
,
secondScore
);
info
=
GetCommentInfo
(
courseCommentModel
,
secondScore
);
...
@@ -444,7 +444,7 @@ WHERE 1=1
...
@@ -444,7 +444,7 @@ WHERE 1=1
{
{
string
info
=
""
;
string
info
=
""
;
var
commentModel
=
commentRepository
.
GetComment
(
Score
);
var
commentModel
=
commentRepository
.
GetComment
(
Score
);
if
(
courseCommentModel
!=
null
&&
courseCommentModel
.
CommentDetails
!=
null
&&
courseCommentModel
.
CommentDetails
.
Count
()
>
0
)
if
(
courseCommentModel
!=
null
&&
courseCommentModel
.
CommentDetails
!=
null
&&
courseCommentModel
.
CommentDetails
.
Count
>
0
)
{
{
var
tempModel
=
courseCommentModel
.
CommentDetails
.
Where
(
qitem
=>
qitem
.
StartNum
<=
Score
&&
Score
<
qitem
.
EndNum
)?.
FirstOrDefault
();
var
tempModel
=
courseCommentModel
.
CommentDetails
.
Where
(
qitem
=>
qitem
.
StartNum
<=
Score
&&
Score
<
qitem
.
EndNum
)?.
FirstOrDefault
();
if
(
tempModel
!=
null
)
if
(
tempModel
!=
null
)
...
...
EduSpider.Services/CourseService.cs
View file @
648e63e5
...
@@ -435,7 +435,7 @@ namespace EduSpider.Services
...
@@ -435,7 +435,7 @@ namespace EduSpider.Services
var
subList
=
StuCommentRepository
.
GetStuCommentListRepository
(
new
CourseQuery
()
{
CourseId
=
item
.
CourseId
,
CommentTimes
=
item
.
Times
});
var
subList
=
StuCommentRepository
.
GetStuCommentListRepository
(
new
CourseQuery
()
{
CourseId
=
item
.
CourseId
,
CommentTimes
=
item
.
Times
});
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
{
var
totalCount
=
subList
.
Count
()
;
var
totalCount
=
subList
.
Count
;
if
(
subList
.
Where
(
qitem
=>
qitem
.
ShowType
==
1
).
Count
()
==
totalCount
)
if
(
subList
.
Where
(
qitem
=>
qitem
.
ShowType
==
1
).
Count
()
==
totalCount
)
{
{
ShowType
=
1
;
ShowType
=
1
;
...
...
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
648e63e5
...
@@ -168,7 +168,7 @@ namespace EduSpider.WebApi.Controllers
...
@@ -168,7 +168,7 @@ namespace EduSpider.WebApi.Controllers
{
{
Id
=
0
,
Id
=
0
,
Title
=
"系统默认配置"
,
Title
=
"系统默认配置"
,
CourseId
=
query
.
CourseId
,
query
.
CourseId
,
CommentDetails
=
sysList
CommentDetails
=
sysList
};
};
}
}
...
@@ -260,7 +260,7 @@ namespace EduSpider.WebApi.Controllers
...
@@ -260,7 +260,7 @@ namespace EduSpider.WebApi.Controllers
public
ApiResult
BatchSetStuComment
()
public
ApiResult
BatchSetStuComment
()
{
{
var
stuListStr
=
base
.
ReqParameters
.
GetString
(
"ChooseStuList"
);
var
stuListStr
=
base
.
ReqParameters
.
GetString
(
"ChooseStuList"
);
List
<
RB_Stu_Comment
>
list
=
new
List
<
RB_Stu_Comment
>
();
List
<
RB_Stu_Comment
>
list
=
new
();
if
(!
string
.
IsNullOrWhiteSpace
(
stuListStr
))
if
(!
string
.
IsNullOrWhiteSpace
(
stuListStr
))
{
{
JArray
jArray
=
JArray
.
Parse
(
stuListStr
);
JArray
jArray
=
JArray
.
Parse
(
stuListStr
);
...
...
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