Commit 05f6c2ee authored by 黄奎's avatar 黄奎

页面修改

parent 7665afd3
......@@ -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
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment