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
404af261
Commit
404af261
authored
Jan 12, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
56b06d92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
2 deletions
+66
-2
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+11
-0
RB_StuWords_ExamRepository.cs
Edu.Repository/Exam/RB_StuWords_ExamRepository.cs
+36
-0
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+19
-2
No files found.
Edu.Module.Exam/CourseExamModule.cs
View file @
404af261
...
@@ -579,5 +579,16 @@ namespace Edu.Module.Exam
...
@@ -579,5 +579,16 @@ namespace Edu.Module.Exam
}
}
return
flag
;
return
flag
;
}
}
/// <summary>
/// 获取学员单词考试列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StuWords_Exam_Extend
>
GetStuWordsExamListModule
(
RB_StuWords_Exam_Extend
query
)
{
var
list
=
stuWords_ExamRepository
.
GetStuWordsExamListRepository
(
query
);
return
list
;
}
}
}
}
}
Edu.Repository/Exam/RB_StuWords_ExamRepository.cs
View file @
404af261
...
@@ -49,5 +49,41 @@ WHERE 1=1
...
@@ -49,5 +49,41 @@ WHERE 1=1
}
}
return
GetPage
<
RB_StuWords_Exam_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_StuWords_Exam_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 获取学员单词考试列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StuWords_Exam_Extend
>
GetStuWordsExamListRepository
(
RB_StuWords_Exam_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_StuWords_Exam AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_StuWords_Exam_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
Stu_Account_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_StuWords_Exam_Extend
.
Stu_Account_Id
),
query
.
Stu_Account_Id
);
}
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_StuWords_Exam_Extend
.
CourseId
),
query
.
CourseId
);
}
if
(
query
.
ChapterId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_StuWords_Exam_Extend
.
ChapterId
),
query
.
ChapterId
);
}
}
return
Get
<
RB_StuWords_Exam_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
}
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
404af261
...
@@ -54,7 +54,7 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -54,7 +54,7 @@ namespace Edu.WebApi.Controllers.Applet
/// <summary>
/// <summary>
/// 试卷处理类对象
/// 试卷处理类对象
/// </summary>
/// </summary>
private
readonly
Module
.
Exam
.
PaperModule
paperModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
Module
.
Exam
.
PaperModule
>();
private
readonly
PaperModule
paperModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
PaperModule
>();
/// <summary>
/// <summary>
/// 学习园地处理类对象
/// 学习园地处理类对象
/// </summary>
/// </summary>
...
@@ -545,6 +545,13 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -545,6 +545,13 @@ namespace Edu.WebApi.Controllers.Applet
Group_Id
=
appletUserInfo
.
Group_Id
,
Group_Id
=
appletUserInfo
.
Group_Id
,
Stu_Account_Id
=
appletUserInfo
.
Id
Stu_Account_Id
=
appletUserInfo
.
Id
});
});
//单词测试列表
var
wordsExamList
=
courseExamModule
.
GetStuWordsExamListModule
(
new
RB_StuWords_Exam_Extend
()
{
ClassId
=
ClassId
,
CourseId
=
CourseId
,
Stu_Account_Id
=
appletUserInfo
.
Id
});
//组装数据
//组装数据
var
RList
=
new
List
<
object
>();
var
RList
=
new
List
<
object
>();
foreach
(
var
item
in
ctList
)
foreach
(
var
item
in
ctList
)
...
@@ -558,6 +565,13 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -558,6 +565,13 @@ namespace Edu.WebApi.Controllers.Applet
StudyProgress
=
(
int
)(
Convert
.
ToDecimal
(
tempPrepWords
.
StudyNum
)
/
Convert
.
ToDecimal
(
tempPrepWords
.
TotalNum
)
*
100
);
StudyProgress
=
(
int
)(
Convert
.
ToDecimal
(
tempPrepWords
.
StudyNum
)
/
Convert
.
ToDecimal
(
tempPrepWords
.
TotalNum
)
*
100
);
}
}
int
Num
=
1
;
int
Num
=
1
;
decimal
Score
=
0
;
//单词测试得分
if
(
wordsExamList
!=
null
&&
wordsExamList
.
Count
>
0
)
{
Score
=
wordsExamList
?.
Where
(
qitem
=>
qitem
.
ChapterId
.
ToString
()
==
item
.
ChapterNo
)?.
OrderByDescending
(
qitem
=>
qitem
.
CreateTime
)?.
FirstOrDefault
()?.
Score
??
0
;
}
RList
.
Add
(
new
RList
.
Add
(
new
{
{
planModel
?.
ClassPlanId
,
planModel
?.
ClassPlanId
,
...
@@ -570,8 +584,11 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -570,8 +584,11 @@ namespace Edu.WebApi.Controllers.Applet
x
.
VideoUrl
x
.
VideoUrl
}),
}),
ChapterTree
=
item
,
ChapterTree
=
item
,
Score
=
tempPrepWords
?.
Score
??
0
,
Score
,
StudyProgress
,
StudyProgress
,
ClassId
,
CourseId
,
item
.
ChapterNo
,
NextChapterNo
=
chapterTreeList
.
Where
(
x
=>
Convert
.
ToInt32
(
x
.
ChapterNo
)
>
Convert
.
ToInt32
(
item
.
ChapterNo
)).
OrderBy
(
x
=>
Convert
.
ToInt32
(
x
.
ChapterNo
)).
FirstOrDefault
()?.
ChapterNo
??
""
NextChapterNo
=
chapterTreeList
.
Where
(
x
=>
Convert
.
ToInt32
(
x
.
ChapterNo
)
>
Convert
.
ToInt32
(
item
.
ChapterNo
)).
OrderBy
(
x
=>
Convert
.
ToInt32
(
x
.
ChapterNo
)).
FirstOrDefault
()?.
ChapterNo
??
""
});
});
}
}
...
...
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