Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
c22976f1
Commit
c22976f1
authored
May 19, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试卷
parent
d06edf78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
apps/exams/Lib/Action/IndexAction.class.php
+6
-5
apps/exams/Lib/Model/ExamsPaperModel.class.php
+0
-1
No files found.
apps/exams/Lib/Action/IndexAction.class.php
View file @
c22976f1
...
...
@@ -111,6 +111,7 @@ class IndexAction extends Action
if
(
is_admin
(
$this
->
mid
)
||
$is_buy
==
3
||
$is_buy
==
4
||
$is_buy
==
6
)
{
$v
[
'is_buy'
]
=
1
;
}
$v
[
'exams_user'
]
=
100
;
}
unset
(
$v
);
//获取试题难度
...
...
@@ -180,7 +181,7 @@ class IndexAction extends Action
$this
->
assign
(
'jumpUrl'
,
U
(
'exams/Index/index'
));
$this
->
error
(
'该试卷不存在!'
);
}
if
(
$this
->
is_wap
&&
strpos
(
$_SERVER
[
'HTTP_USER_AGENT'
],
'MicroMessenger'
))
{
$this
->
assign
(
'is_wx'
,
true
);
}
...
...
@@ -280,13 +281,13 @@ class IndexAction extends Action
}
$temp_id
=
intval
(
$_GET
[
'temp'
]);
// 获取试卷试题等信息 -- 判断自动组卷(1)和手动组卷
// 获取试卷试题等信息 -- 判断自动组卷(1)和手动组卷
if
(
$paper
[
'assembly_type'
]
==
1
){
// 是否继续作答
if
(
!
$temp_id
){
$paper_options
=
D
(
"ExamsPaper"
,
'exams'
)
->
doAssembly
(
$paper
);
}
else
{
$paper_options
=
D
(
'ExamsPaperOptions'
,
'exams'
)
->
where
([
'exams_users_id'
=>
$temp_id
])
->
find
();
$paper_options
=
D
(
'ExamsPaperOptions'
,
'exams'
)
->
where
([
'exams_users_id'
=>
$temp_id
])
->
find
();
}
$paper_options
=
D
(
'ExamsPaperOptions'
,
'exams'
)
->
getPaperOptionsData
(
$paper_options
);
}
else
{
...
...
@@ -352,7 +353,7 @@ class IndexAction extends Action
$this
->
error
(
'你已超过该考试允许参考的最大次数'
);
}
}
$temp_id
=
D
(
"ExamsUser"
,
'exams'
)
->
doExamsPaper
(
$_POST
);
if
(
$temp_id
)
{
$url
=
U
(
'exams/Index/examsresult'
,
[
'joinType'
=>
$_POST
[
'exams_mode'
],
'paper_id'
=>
$_POST
[
'paper_id'
],
'temp'
=>
$temp_id
]);
...
...
@@ -415,7 +416,7 @@ class IndexAction extends Action
$mod
->
exams_users_id
=
$temp_id
;
}
//如果是高频练习单独获取试题
$exams_mode
=
D
(
'ExamsUser'
,
'exams'
)
->
where
([
'exams_users_id'
=>
$temp_id
])
->
getField
(
'exams_mode'
);
if
(
$_GET
[
'joinType'
]
==
4
&&
$exams_mode
==
4
){
...
...
apps/exams/Lib/Model/ExamsPaperModel.class.php
View file @
c22976f1
...
...
@@ -86,7 +86,6 @@ class ExamsPaperModel extends Model
$data
[
$key
][
'exams_count'
]
=
intval
(
$v
[
'exams_count'
]);
$data
[
$key
][
'reply_time'
]
=
intval
(
$v
[
'reply_time'
]);
$data
[
$key
][
'exams_limit'
]
=
intval
(
$v
[
'exams_limit'
]);
$data
[
$key
][
'exams_user'
]
=
100
;
if
(
IS_API
&&
$is_need
==
0
){
unset
(
$data
[
$key
][
'paper_options'
]);
}
...
...
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