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
05f6c2ee
Commit
05f6c2ee
authored
Jan 10, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7665afd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+1
-1
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+14
-8
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
05f6c2ee
...
...
@@ -529,7 +529,7 @@ namespace Edu.Common
{
Random
rd
=
new
Random
();
int
result
=
rd
.
Next
(
1
,
100
);
return
result
%
3
;
return
result
%
4
;
}
}
}
\ No newline at end of file
Edu.Module.Exam/CourseExamModule.cs
View file @
05f6c2ee
...
...
@@ -26,7 +26,7 @@ namespace Edu.Module.Exam
/// <param name="ChapterId"></param>
/// <param name="NextChapterId"></param>
/// <returns></returns>
public
object
CreateCourseExam
(
int
CourseId
,
int
ChapterId
,
int
NextChapterId
)
public
object
CreateCourseExam
(
int
CourseId
,
int
ChapterId
,
int
NextChapterId
)
{
object
result
=
new
object
();
var
list
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
...
...
@@ -34,12 +34,12 @@ namespace Edu.Module.Exam
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
();
List
<
object
>
reviewGroupList
=
new
List
<
object
>();
List
<
object
>
prepGroupList
=
new
List
<
object
>();
if
(
reviewList
!=
null
&&
reviewList
.
Count
>
0
)
{
for
(
var
i
=
0
;
i
<
reviewList
.
Count
;
i
++)
...
...
@@ -51,18 +51,24 @@ namespace Edu.Module.Exam
int
randNum
=
Common
.
ConvertHelper
.
CreateRandomNum
();
switch
(
randNum
)
{
//根据单词选择中文意思
case
0
:
break
;
//根据中文意思选择单词
case
1
:
break
;
//根据日语书写选择中文意思
case
2
:
break
;
//根据中文意思选日语书写
case
3
:
break
;
}
List
<
optionItem
>
options
=
new
List
<
optionItem
>();
reviewGroupList
.
Add
(
new
{
...
...
@@ -85,15 +91,15 @@ namespace Edu.Module.Exam
QuestionTypeId
=
3
,
QuestionTypeKey
=
"fill-in"
,
QuestionContent
=
fillInItems
,
Title
=
title
Title
=
title
});
}
}
}
if
(
prepList
!=
null
&&
prepList
.
Count
>
0
)
{
{
}
result
=
new
{
...
...
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