adding functionality to allow teacher approval of record
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
require_once('../../config.php');
|
||||
require_once('lib.php');
|
||||
require_once($CFG->libdir.'/blocklib.php');
|
||||
|
||||
require_once('pagelib.php');
|
||||
require_login();
|
||||
|
||||
if (!isteacher()) {
|
||||
error ('you need to be a teacher to use this page!');
|
||||
}
|
||||
|
||||
if (confirm_sesskey()
|
||||
&& ($recordid = required_param('recordid',PARAM_INT))
|
||||
&& ($d = required_param('d',PARAM_INT))) {
|
||||
data_approve_record($recordid);
|
||||
}
|
||||
|
||||
$page=optional_param('page','0',PARAM_INT);
|
||||
$rid = optional_param('rid','0', PARAM_INT);
|
||||
$search =optional_param('search','',PARAM_ALPHA);
|
||||
$sort= optional_param('sort','',PARAM_ALPHA);
|
||||
$order=optional_param('order','',PARAM_ALPHA);
|
||||
|
||||
print_heading(get_string('recordapproved','data'));
|
||||
redirect('view.php?d='.$d.'&approved=1&page='.$page.'&rid='.$rid.'&search='.$search.'&sort='.$sort.'&order='.$order.'&');
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user