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
b5e9eae8
Commit
b5e9eae8
authored
Jan 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0ac92c42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+58
-0
No files found.
Edu.Module.Exam/CourseExamModule.cs
0 → 100644
View file @
b5e9eae8
using
Edu.Model.ViewModel.Course
;
using
Edu.Repository.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Linq
;
namespace
Edu.Module.Exam
{
/// <summary>
/// 课程预习测试处理类
/// </summary>
public
class
CourseExamModule
{
/// <summary>
/// 课程章节单词处理类对象
/// </summary>
private
readonly
RB_Course_WordsRepository
course_WordsRepository
=
new
RB_Course_WordsRepository
();
/// <summary>
/// 生成课程复习和预习单词
/// </summary>
/// <param name="CourseId"></param>
/// <param name="ChapterId"></param>
/// <param name="NextChapterId"></param>
/// <returns></returns>
public
object
CreateCourseExam
(
int
CourseId
,
int
ChapterId
,
int
NextChapterId
)
{
object
result
=
new
object
();
var
list
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
{
CourseId
=
CourseId
,
QChapterIds
=
ChapterId
+
","
+
NextChapterId
});
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
();
if
(
reviewList
!=
null
&&
reviewList
.
Count
>
0
)
{
for
(
var
i
=
0
;
i
<
reviewList
.
Count
;
i
++)
{
//选择题
if
(
i
%
2
==
0
)
{
}
}
}
if
(
prepList
!=
null
&&
prepList
.
Count
>
0
)
{
}
return
result
;
}
}
}
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