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
6c8782da
Commit
6c8782da
authored
Jun 16, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
335e8794
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
ExamController.cs
EduSpider.WebApi/Controllers/Student/ExamController.cs
+3
-1
TeacherController.cs
EduSpider.WebApi/Controllers/Student/TeacherController.cs
+14
-0
No files found.
EduSpider.WebApi/Controllers/Student/ExamController.cs
View file @
6c8782da
...
...
@@ -31,7 +31,9 @@ namespace EduSpider.WebApi.Controllers
{
ResultPageModel
pmodel
=
JsonHelper
.
Deserialize
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
RB_Exam_Extend
demodel
=
JsonHelper
.
Deserialize
<
RB_Exam_Extend
>(
RequestParm
.
Msg
.
ToString
());
if
(
demodel
.
CourseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
ExamService
.
GetExamPageList
(
pmodel
.
PageIndex
,
pmodel
.
PageSize
,
out
long
count
,
demodel
);
pmodel
.
RowsCount
=
count
;
pmodel
.
PageData
=
list
.
Select
(
x
=>
new
...
...
EduSpider.WebApi/Controllers/Student/TeacherController.cs
View file @
6c8782da
...
...
@@ -89,6 +89,10 @@ namespace EduSpider.WebApi.Controllers
CourseId
=
base
.
ReqParameters
.
GetInt
(
"courseId"
)
};
List
<
object
>
result
=
new
();
if
(
query
.
CourseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
CourseService
.
GetStuCourseList
(
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
...
...
@@ -117,6 +121,12 @@ namespace EduSpider.WebApi.Controllers
{
CourseId
=
base
.
ReqParameters
.
GetInt
(
"courseId"
)
};
if
(
query
.
CourseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
CourseService
.
GetCourseHomeWork
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
@@ -133,6 +143,10 @@ namespace EduSpider.WebApi.Controllers
{
HomeWorkId
=
base
.
ReqParameters
.
GetInt
(
"HomeWorkId"
)
};
if
(
query
.
HomeWorkId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
CourseService
.
GetHomeWorkDetails
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
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