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
fe6dde6a
Commit
fe6dde6a
authored
May 19, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`试卷`
parent
740ace9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
apps/exams/Lib/Action/AdminPaperAction.class.php
+6
-2
No files found.
apps/exams/Lib/Action/AdminPaperAction.class.php
View file @
fe6dde6a
...
@@ -180,6 +180,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -180,6 +180,7 @@ class AdminPaperAction extends AdministratorAction
$data
[
'sort'
]
=
intval
(
$_POST
[
'sort'
]);
$data
[
'sort'
]
=
intval
(
$_POST
[
'sort'
]);
$data
[
'is_screen'
]
=
intval
(
$_POST
[
'is_screen'
]);
$data
[
'is_screen'
]
=
intval
(
$_POST
[
'is_screen'
]);
$data
[
'exams_limit'
]
=
intval
(
$_POST
[
'exams_limit'
]);
$data
[
'exams_limit'
]
=
intval
(
$_POST
[
'exams_limit'
]);
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'is_rand'
]
=
isset
(
$_POST
[
'is_rand'
])
?
intval
(
$_POST
[
'is_rand'
])
:
0
;
$data
[
'is_rand'
]
=
isset
(
$_POST
[
'is_rand'
])
?
intval
(
$_POST
[
'is_rand'
])
:
0
;
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'show_user_group'
]
=
isset
(
$_POST
[
'show_user_group'
])
?
','
.
implode
(
','
,
$_POST
[
'show_user_group'
])
.
','
:
'0'
;
$data
[
'show_user_group'
]
=
isset
(
$_POST
[
'show_user_group'
])
?
','
.
implode
(
','
,
$_POST
[
'show_user_group'
])
.
','
:
'0'
;
...
@@ -195,7 +196,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -195,7 +196,7 @@ class AdminPaperAction extends AdministratorAction
}
}
exit
;
exit
;
}
}
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
...
@@ -217,6 +218,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -217,6 +218,7 @@ class AdminPaperAction extends AdministratorAction
$exams_difficult
=
M
(
'exams_difficult'
)
->
where
([
'mhm_id'
=>
$this
->
mhmId
])
->
findAll
();
$exams_difficult
=
M
(
'exams_difficult'
)
->
where
([
'mhm_id'
=>
$this
->
mhmId
])
->
findAll
();
$this
->
opt
[
'exams_module_id'
]
=
array_column
(
$exams_module
,
'title'
,
'exams_module_id'
);
$this
->
opt
[
'exams_module_id'
]
=
array_column
(
$exams_module
,
'title'
,
'exams_module_id'
);
$this
->
opt
[
'level'
]
=
array_column
(
$exams_difficult
,
'title'
,
'id'
);
$this
->
opt
[
'level'
]
=
array_column
(
$exams_difficult
,
'title'
,
'id'
);
$this
->
opt
[
'best'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_rand'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_rand'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'assembly_type'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'assembly_type'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_screen'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_screen'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
...
@@ -302,6 +304,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -302,6 +304,7 @@ class AdminPaperAction extends AdministratorAction
$data
[
'show_user_group'
]
=
isset
(
$_POST
[
'show_user_group'
])
?
','
.
implode
(
','
,
$_POST
[
'show_user_group'
])
.
','
:
0
;
$data
[
'show_user_group'
]
=
isset
(
$_POST
[
'show_user_group'
])
?
','
.
implode
(
','
,
$_POST
[
'show_user_group'
])
.
','
:
0
;
$this
->
checkPaper
(
$data
,
'edit'
);
$this
->
checkPaper
(
$data
,
'edit'
);
$data
[
'update_time'
]
=
time
();
$data
[
'update_time'
]
=
time
();
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'is_rand'
]
=
isset
(
$_POST
[
'is_rand'
])
?
intval
(
$_POST
[
'is_rand'
])
:
0
;
$data
[
'is_rand'
]
=
isset
(
$_POST
[
'is_rand'
])
?
intval
(
$_POST
[
'is_rand'
])
:
0
;
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
...
@@ -320,7 +323,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -320,7 +323,7 @@ class AdminPaperAction extends AdministratorAction
$this
->
error
(
"未找到编辑的试卷"
);
$this
->
error
(
"未找到编辑的试卷"
);
}
}
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'
is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
,
'best
'
];
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'
best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description
'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
...
@@ -340,6 +343,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -340,6 +343,7 @@ class AdminPaperAction extends AdministratorAction
$paper
[
'exams_subject_id'
]
=
$subject
;
$paper
[
'exams_subject_id'
]
=
$subject
;
$this
->
opt
[
'exams_module_id'
]
=
array_column
(
$exams_module
,
'title'
,
'exams_module_id'
);
$this
->
opt
[
'exams_module_id'
]
=
array_column
(
$exams_module
,
'title'
,
'exams_module_id'
);
$this
->
opt
[
'level'
]
=
array_column
(
$exams_difficult
,
'title'
,
'id'
);
$this
->
opt
[
'level'
]
=
array_column
(
$exams_difficult
,
'title'
,
'id'
);
$this
->
opt
[
'best'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_rand'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_rand'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'assembly_type'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'assembly_type'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_screen'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
$this
->
opt
[
'is_screen'
]
=
[
0
=>
'否'
,
1
=>
'是'
];
...
...
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