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
accf11dc
Commit
accf11dc
authored
Mar 15, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f1ba8692
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
2 deletions
+87
-2
RB_Question_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
+5
-0
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+78
-2
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+4
-0
No files found.
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
View file @
accf11dc
...
...
@@ -139,5 +139,10 @@ namespace Edu.Model.ViewModel.Question
/// 排序类型(1-问题编号)
/// </summary>
public
int
OrderByType
{
get
;
set
;
}
/// <summary>
/// 问题编号
/// </summary>
public
string
QuestionIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Exam/CourseExamModule.cs
View file @
accf11dc
...
...
@@ -1267,10 +1267,86 @@ namespace Edu.Module.Exam
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Practice_Extend
>
GetPracticeWrongPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Practice_Extend
query
)
public
List
<
object
>
GetPracticeWrongPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Practice_Extend
query
)
{
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
student_PracticeRepository
.
GetStudentPracticePageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
return
list
;
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
questionIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
QuestionId
));
var
questionList
=
questionRepository
.
GetQuestionListRepository
(
new
RB_Question_ViewModel
()
{
QuestionIds
=
questionIds
});
foreach
(
var
item
in
list
)
{
var
tempQuestion
=
questionList
.
Where
(
qitem
=>
qitem
.
QuestionId
==
item
.
QuestionId
).
FirstOrDefault
();
var
QuestionContentObj
=
analysisQuestion
.
ParsingQuestion
(
item
.
QuestionTypeKey
,
item
.
QuestionContent
,
isNoAnswer
:
false
);
List
<
object
>
quesAnswerList
=
new
List
<
object
>();
if
(
tempQuestion
.
QuestionTypeKey
==
"listening"
||
tempQuestion
.
QuestionTypeKey
==
"reading-comprehensio"
)
{
try
{
var
listenList
=
JsonHelper
.
DeserializeObject
<
List
<
SubAnswerItem
>>(
tempQuestion
.
Answer
);
if
(
listenList
!=
null
&&
listenList
.
Count
>
0
)
{
foreach
(
var
subItem
in
listenList
)
{
quesAnswerList
.
Add
(
subItem
.
SubAnswer
);
}
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
}
}
if
(
tempQuestion
.
QuestionTypeKey
!=
"listening"
&&
tempQuestion
.
QuestionTypeKey
!=
"reading-comprehensio"
&&
!
string
.
IsNullOrEmpty
(
tempQuestion
.
Answer
))
{
try
{
var
tempList
=
Common
.
ConvertHelper
.
StringToFileList
(
tempQuestion
.
Answer
);
if
(
tempList
!=
null
&&
tempList
.
Count
>
0
)
{
foreach
(
var
tItem
in
tempList
)
{
quesAnswerList
.
Add
(
tItem
);
}
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_Answer:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
}
}
List
<
string
>
studentAnswerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
item
?.
StudentAnswer
))
{
studentAnswerList
=
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
item
?.
StudentAnswer
);
}
var
obj
=
new
{
item
.
Id
,
item
.
QuestionId
,
item
.
QuestionTypeId
,
item
.
QuestionTypeKey
,
item
.
Category
,
item
.
LevelType
,
item
.
Title
,
item
.
AnswerParse
,
QuestionContentObj
,
QuestionAnswerList
=
quesAnswerList
,
StudentAnswer
=
studentAnswerList
,
item
.
Answer
,
Score
=
0
,
IsAnswer
=
item
?.
IsAnswer
??
0
,
IsWrong
=
item
?.
IsWrong
??
0
,
StudentScore
=
0
};
result
.
Add
(
obj
);
}
}
return
result
;
}
/// <summary>
...
...
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
accf11dc
...
...
@@ -52,6 +52,10 @@ WHERE 1=1 AND B.Status=0
{
builder
.
AppendFormat
(
" AND B.{0}={1} "
,
nameof
(
RB_Question_ViewModel
.
BankType
),
(
int
)
query
.
BankType
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QuestionIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Question_ViewModel
.
QuestionId
),
query
.
QuestionIds
);
}
return
Get
<
RB_Question_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
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