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
8e1c50c7
Commit
8e1c50c7
authored
Aug 16, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
45f2b0e0
e21c893d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
672 additions
and
32 deletions
+672
-32
RB_Examination_Publish.cs
Edu.Model/Entity/Exam/RB_Examination_Publish.cs
+143
-0
ExamFolderTreeModel.cs
Edu.Model/ViewModel/Exam/ExamFolderTreeModel.cs
+32
-0
RB_Examination_Paper_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
+10
-0
RB_Examination_Publish_ViewModel.cs
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
+15
-0
PaperModule.cs
Edu.Module.Exam/PaperModule.cs
+211
-6
RB_Examination_PaperRepository.cs
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
+62
-0
RB_Examination_PublishRepository.cs
Edu.Repository/Exam/RB_Examination_PublishRepository.cs
+41
-0
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+1
-0
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+157
-26
No files found.
Edu.Model/Entity/Exam/RB_Examination_Publish.cs
0 → 100644
View file @
8e1c50c7
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Exam
{
/// <summary>
/// 试卷发布实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Examination_Publish
{
/// <summary>
/// 发布考试主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 试卷编号
/// </summary>
public
int
PaperId
{
get
;
set
;
}
/// <summary>
/// 发放类型(1-按班级发放,2-指定学生发放)
/// </summary>
public
int
PublishType
{
get
;
set
;
}
/// <summary>
/// 考试开始时间
/// </summary>
public
DateTime
ExamStartTime
{
get
;
set
;
}
/// <summary>
/// 考试结束时间
/// </summary>
public
DateTime
ExamEndTime
{
get
;
set
;
}
/// <summary>
/// 考试限时
/// </summary>
public
int
ExamTimes
{
get
;
set
;
}
/// <summary>
/// 限时提交(多少分钟内不允许提交)
/// </summary>
public
int
SubmitTimes
{
get
;
set
;
}
/// <summary>
/// 限时进入(多少分钟后不允许参加考试)
/// </summary>
public
int
EnterTimes
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 题目乱序(1-是)
/// </summary>
public
int
IsQuestionRandom
{
get
;
set
;
}
/// <summary>
/// 选项乱序(1-是)
/// </summary>
public
int
IsOptionRandom
{
get
;
set
;
}
/// <summary>
/// 学生离开作答页面(1-是)
/// </summary>
public
int
IsLeaveAnswer
{
get
;
set
;
}
/// <summary>
/// 离开次数
/// </summary>
public
int
LeaveTimes
{
get
;
set
;
}
/// <summary>
/// 是否禁用多终端(1-是)
/// </summary>
public
int
IsDisableMultiTerminal
{
get
;
set
;
}
/// <summary>
/// 是否只允许(App、PC)考试(1-是)
/// </summary>
public
int
IsExamType
{
get
;
set
;
}
/// <summary>
/// 考试终端类型(1-App,2-PC)
/// </summary>
public
int
ExamTypeValue
{
get
;
set
;
}
/// <summary>
/// 考试须知
/// </summary>
public
string
ExamNotice
{
get
;
set
;
}
/// <summary>
/// 及格分数
/// </summary>
public
decimal
PassScore
{
get
;
set
;
}
/// <summary>
/// 考试到达截止时间后自动提交(1-是)
/// </summary>
public
int
IsAutoSubmit
{
get
;
set
;
}
/// <summary>
/// 填空类型的题目设为主观题(1-是)
/// </summary>
public
int
FillInIsSubject
{
get
;
set
;
}
/// <summary>
/// 填空题答案不区分大小写(1-是)
/// </summary>
public
int
FillInIsIgnore
{
get
;
set
;
}
/// <summary>
/// 多选题未选全给一半分(1-是)
/// </summary>
public
int
IsHalfScore
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/ExamFolderTreeModel.cs
0 → 100644
View file @
8e1c50c7
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Exam
{
/// <summary>
/// 试卷文件树形结构
/// </summary>
public
class
ExamFolderTreeModel
{
/// <summary>
/// 试卷编号
/// </summary>
public
int
PaperId
{
get
;
set
;
}
/// <summary>
/// 试卷名称
/// </summary>
public
string
PaperName
{
get
;
set
;
}
/// <summary>
/// 父节点编号
/// </summary>
public
int
ParentId
{
get
;
set
;
}
/// <summary>
/// 下级文件夹列表
/// </summary>
public
List
<
ExamFolderTreeModel
>
ChildList
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Examination_Paper_ViewModel.cs
View file @
8e1c50c7
...
...
@@ -21,5 +21,15 @@ namespace Edu.Model.ViewModel.Exam
/// 问题数量
/// </summary>
public
int
QuestionCount
{
get
;
set
;
}
/// <summary>
/// 试卷编号
/// </summary>
public
string
QPaperIds
{
get
;
set
;
}
/// <summary>
/// 是否查询文件夹
/// </summary>
public
int
IsQueryFolder
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Exam/RB_Examination_Publish_ViewModel.cs
0 → 100644
View file @
8e1c50c7
using
Edu.Model.Entity.Exam
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Exam
{
/// <summary>
/// 试卷发布视图实体类
/// </summary>
public
class
RB_Examination_Publish_ViewModel
:
RB_Examination_Publish
{
}
}
Edu.Module.Exam/PaperModule.cs
View file @
8e1c50c7
This diff is collapsed.
Click to expand it.
Edu.Repository/Exam/RB_Examination_PaperRepository.cs
View file @
8e1c50c7
...
...
@@ -43,11 +43,73 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @PaperName "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperName
));
parameters
.
Add
(
"PaperName"
,
"%"
+
query
.
PaperName
.
Trim
()
+
"%"
);
}
if
(
query
.
ParentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
query
.
ParentId
);
}
if
(
query
.
PaperId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
query
.
PaperId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPaperIds
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
query
.
QPaperIds
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
));
return
GetPage
<
RB_Examination_Paper_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取试卷列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Examination_Paper_ViewModel
>
GetExaminationPaperListRepository
(
RB_Examination_Paper_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Examination_Paper AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
0
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
PaperName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @PaperName "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperName
));
parameters
.
Add
(
"PaperName"
,
"%"
+
query
.
PaperName
.
Trim
()
+
"%"
);
}
if
(
query
.
ParentId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
ParentId
),
query
.
ParentId
);
}
if
(
query
.
PaperId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
query
.
PaperId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPaperIds
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN({1}) "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
),
query
.
QPaperIds
);
}
//查询文件夹
if
(
query
.
IsQueryFolder
==
1
)
{
builder
.
AppendFormat
(
@" AND A.{0}=1 "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperType
));
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Examination_Paper_ViewModel
.
PaperId
));
return
Get
<
RB_Examination_Paper_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取试卷所有下级列表
/// </summary>
...
...
Edu.Repository/Exam/RB_Examination_PublishRepository.cs
0 → 100644
View file @
8e1c50c7
using
Edu.Model.Entity.Exam
;
using
Edu.Model.ViewModel.Exam
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Exam
{
/// <summary>
/// 试卷发布仓储层
/// </summary>
public
class
RB_Examination_PublishRepository
:
BaseRepository
<
RB_Examination_Publish
>
{
/// <summary>
/// 获取发布试卷分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Examination_Publish_ViewModel
>
GetExaminationPublishPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Examination_Publish_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Examination_Publish AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Examination_Publish_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
return
GetPage
<
RB_Examination_Publish_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
8e1c50c7
...
...
@@ -208,6 +208,7 @@ namespace Edu.WebApi.Controllers.Course
item
.
QuestionId
,
item
.
CourseId
,
Title
=
newTitle
,
SourceTitle
=
item
.
Title
,
item
.
QuestionTypeId
,
item
.
QuestionTypeKey
,
QuestionTypeName
=
item
.
QuestionTypeKey
!=
"single-number"
?
item
.
QuestionTypeName
:
"选择题"
,
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
8e1c50c7
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