-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathupdate.php
More file actions
31 lines (23 loc) · 799 Bytes
/
update.php
File metadata and controls
31 lines (23 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* Creates a feedback instance and redirects to the coursework page.
*/
require_once(dirname(__FILE__) . '/../../../../config.php');
global $CFG, $USER;
$feedbackid = required_param('feedbackid', PARAM_INT);
$finalised = !!optional_param('submitbutton', 0, PARAM_TEXT);
$ajax = optional_param('ajax', 0, PARAM_INT);
$remove = !!optional_param('removefeedbackbutton', 0, PARAM_TEXT);
$confirm = optional_param('confirm', 0, PARAM_INT);
$params = array(
'feedbackid' => $feedbackid,
'finalised' => $finalised,
'remove' => $remove,
'confirm' => $confirm,
'ajax' => $ajax
);
if ($ajax) {
$params['cell_type'] = required_param('cell_type', PARAM_TEXT);
}
$controller = new mod_coursework\controllers\feedback_controller($params);
$controller->update_feedback();