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
7fa36a61
Commit
7fa36a61
authored
3 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8ac2af28
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
23 deletions
+65
-23
RB_Student_Practice.cs
Edu.Model/Entity/Exam/RB_Student_Practice.cs
+5
-0
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+38
-23
RB_Student_PracticeRepository.cs
Edu.Repository/Exam/RB_Student_PracticeRepository.cs
+4
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+18
-0
No files found.
Edu.Model/Entity/Exam/RB_Student_Practice.cs
View file @
7fa36a61
...
@@ -83,5 +83,10 @@ namespace Edu.Model.Entity.Exam
...
@@ -83,5 +83,10 @@ namespace Edu.Model.Entity.Exam
/// 学生答案
/// 学生答案
/// </summary>
/// </summary>
public
string
StudentAnswer
{
get
;
set
;
}
public
string
StudentAnswer
{
get
;
set
;
}
/// <summary>
/// 是否复习
/// </summary>
public
int
IsReview
{
get
;
set
;
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Module.Exam/CourseExamModule.cs
View file @
7fa36a61
...
@@ -850,7 +850,7 @@ namespace Edu.Module.Exam
...
@@ -850,7 +850,7 @@ namespace Edu.Module.Exam
{
{
item
.
Id
,
item
.
Id
,
item
.
Name
,
item
.
Name
,
JoinNum
=
joinNum
JoinNum
=
joinNum
});
});
}
}
}
}
...
@@ -903,7 +903,7 @@ namespace Edu.Module.Exam
...
@@ -903,7 +903,7 @@ namespace Edu.Module.Exam
{
{
MyUseTime
=
Common
.
ConvertHelper
.
CalcMinutesAndSeconds
(
myLast
.
StartTime
,
myLast
.
EndTime
);
MyUseTime
=
Common
.
ConvertHelper
.
CalcMinutesAndSeconds
(
myLast
.
StartTime
,
myLast
.
EndTime
);
MyScore
=
myLast
.
Score
;
MyScore
=
myLast
.
Score
;
MyRank
=
tempList
.
FindIndex
(
qitem
=>
qitem
.
Id
==
myLast
.
Id
)
+
1
;
MyRank
=
tempList
.
FindIndex
(
qitem
=>
qitem
.
Id
==
myLast
.
Id
)
+
1
;
}
}
MyTimes
=
tempList
?.
Where
(
qitem
=>
qitem
.
StudentId
==
query
.
StudentId
)?.
Count
()
??
0
;
MyTimes
=
tempList
?.
Where
(
qitem
=>
qitem
.
StudentId
==
query
.
StudentId
)?.
Count
()
??
0
;
}
}
...
@@ -933,14 +933,14 @@ namespace Edu.Module.Exam
...
@@ -933,14 +933,14 @@ namespace Edu.Module.Exam
/// <param name="rowsCount"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
object
>
GetAppBankDetailsPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Question_ViewModel
query
,
int
StudentId
=
0
)
public
List
<
object
>
GetAppBankDetailsPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Question_ViewModel
query
,
int
StudentId
=
0
)
{
{
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
var
questionList
=
questionRepository
.
GetQuestionPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
)?.
OrderBy
(
qitem
=>
qitem
.
Category
)?.
ToList
();
var
questionList
=
questionRepository
.
GetQuestionPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
)?.
OrderBy
(
qitem
=>
qitem
.
Category
)?.
ToList
();
List
<
RB_Student_ExamDetails_Extend
>
stuExamList
=
new
List
<
RB_Student_ExamDetails_Extend
>();
List
<
RB_Student_ExamDetails_Extend
>
stuExamList
=
new
List
<
RB_Student_ExamDetails_Extend
>();
if
(
StudentId
>
0
)
if
(
StudentId
>
0
)
{
{
stuExamList
=
student_ExamDetailsRepository
.
GetStudentExamDetailsListRepository
(
new
RB_Student_ExamDetails_Extend
()
{
BankId
=
query
.
BankId
,
StudentId
=
StudentId
});
stuExamList
=
student_ExamDetailsRepository
.
GetStudentExamDetailsListRepository
(
new
RB_Student_ExamDetails_Extend
()
{
BankId
=
query
.
BankId
,
StudentId
=
StudentId
});
}
}
if
(
questionList
!=
null
&&
questionList
.
Count
>
0
)
if
(
questionList
!=
null
&&
questionList
.
Count
>
0
)
{
{
...
@@ -1009,8 +1009,8 @@ namespace Edu.Module.Exam
...
@@ -1009,8 +1009,8 @@ namespace Edu.Module.Exam
StudentAnswer
=
studentAnswerList
,
StudentAnswer
=
studentAnswerList
,
item
.
Answer
,
item
.
Answer
,
Score
,
Score
,
IsAnswer
=
tempQuestion
?.
IsAnswer
??
0
,
IsAnswer
=
tempQuestion
?.
IsAnswer
??
0
,
IsWrong
=
tempQuestion
?.
IsWrong
??
0
,
IsWrong
=
tempQuestion
?.
IsWrong
??
0
,
StudentScore
=
tempQuestion
?.
StudentScore
??
0
,
StudentScore
=
tempQuestion
?.
StudentScore
??
0
,
};
};
result
.
Add
(
obj
);
result
.
Add
(
obj
);
...
@@ -1174,7 +1174,7 @@ namespace Edu.Module.Exam
...
@@ -1174,7 +1174,7 @@ namespace Edu.Module.Exam
int
wordsWrongFinishCount
=
0
;
int
wordsWrongFinishCount
=
0
;
int
wordsWrongStartId
=
0
;
int
wordsWrongStartId
=
0
;
var
list
=
student_PracticeRepository
.
GetStudentPracticeWrongStaticRepository
(
query
);
var
list
=
student_PracticeRepository
.
GetStudentPracticeWrongStaticRepository
(
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
var
tempReadingList
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ReadingChoose
)?.
ToList
();
var
tempReadingList
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ReadingChoose
)?.
ToList
();
...
@@ -1189,13 +1189,13 @@ namespace Edu.Module.Exam
...
@@ -1189,13 +1189,13 @@ namespace Edu.Module.Exam
listeningWrongTotalCount
=
tempListeningList
.
Sum
(
qitem
=>
qitem
.
WrongCount
);
listeningWrongTotalCount
=
tempListeningList
.
Sum
(
qitem
=>
qitem
.
WrongCount
);
}
}
var
tempGrammarList
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseGrammarUse
)?.
ToList
();
var
tempGrammarList
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseGrammarUse
)?.
ToList
();
if
(
tempGrammarList
!=
null
&&
tempGrammarList
.
Count
>
0
)
if
(
tempGrammarList
!=
null
&&
tempGrammarList
.
Count
>
0
)
{
{
grammarWrongTotalCount
=
tempGrammarList
.
Sum
(
qitem
=>
qitem
.
WrongCount
);
grammarWrongTotalCount
=
tempGrammarList
.
Sum
(
qitem
=>
qitem
.
WrongCount
);
}
}
var
tempWordsList
=
list
?.
Where
(
qitem
=>
var
tempWordsList
=
list
?.
Where
(
qitem
=>
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWord
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseMean
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseMean
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWordUse
||
qitem
.
Category
==
Common
.
Enum
.
Course
.
QuestionCategoryEnum
.
ChooseWordUse
...
@@ -1241,6 +1241,21 @@ namespace Edu.Module.Exam
...
@@ -1241,6 +1241,21 @@ namespace Edu.Module.Exam
return
list
;
return
list
;
}
}
/// <summary>
/// 设置错题已复习
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetPracticeReviewModule
(
RB_Student_Practice_Extend
model
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Practice_Extend
.
IsReview
),
model
.
IsReview
}
};
bool
flag
=
student_PracticeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Practice_Extend
.
Id
),
model
.
Id
));
return
flag
;
}
#
endregion
#
endregion
}
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Repository/Exam/RB_Student_PracticeRepository.cs
View file @
7fa36a61
...
@@ -113,6 +113,10 @@ WHERE 1=1
...
@@ -113,6 +113,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
LevelType
),
(
int
)
query
.
LevelType
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Student_Practice_Extend
.
LevelType
),
(
int
)
query
.
LevelType
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCategoryIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Student_Practice_Extend
.
Category
),
query
.
QCategoryIds
);
}
}
}
builder
.
AppendFormat
(
" GROUP BY Category "
);
builder
.
AppendFormat
(
" GROUP BY Category "
);
return
Get
<
RB_Student_Practice_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Student_Practice_Extend
>(
builder
.
ToString
()).
ToList
();
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
7fa36a61
...
@@ -1242,6 +1242,7 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -1242,6 +1242,7 @@ namespace Edu.WebApi.Controllers.Exam
StudentId
=
base
.
ParmJObj
.
GetInt
(
"StudentId"
),
StudentId
=
base
.
ParmJObj
.
GetInt
(
"StudentId"
),
LevelType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"LevelType"
),
LevelType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"LevelType"
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
QCategoryIds
=
base
.
ParmJObj
.
GetStringValue
(
"QCategoryIds"
),
};
};
query
.
IsQueryWrong
=
1
;
query
.
IsQueryWrong
=
1
;
var
list
=
courseExamModule
.
GetPracticeWrongPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
courseExamModule
.
GetPracticeWrongPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
...
@@ -1249,6 +1250,23 @@ namespace Edu.WebApi.Controllers.Exam
...
@@ -1249,6 +1250,23 @@ namespace Edu.WebApi.Controllers.Exam
pageModel
.
PageData
=
list
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
}
}
/// <summary>
/// 设置错题复习
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowRepeat
]
public
ApiResult
SetPracticeReview
()
{
var
model
=
new
RB_Student_Practice_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
IsReview
=
1
};
bool
flag
=
courseExamModule
.
SetPracticeReviewModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
endregion
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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