-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcreate.php
More file actions
33 lines (25 loc) · 959 Bytes
/
create.php
File metadata and controls
33 lines (25 loc) · 959 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
32
33
<?php
/**
* Creates a feedback instance and redirects to the coursework page.
*/
require_once(dirname(__FILE__) . '/../../../../config.php');
global $CFG, $USER;
$submissionid = required_param('submissionid', PARAM_INT);
$isfinalgrade = optional_param('isfinalgrade', 0, PARAM_INT);
$assessorid = optional_param('assessorid', $USER->id, PARAM_INT);
$stage_identifier = optional_param('stage_identifier', '', PARAM_ALPHANUMEXT);
$finalised = !!optional_param('submitbutton', 0, PARAM_TEXT);
$ajax = optional_param('ajax', 0, PARAM_INT);
$params = array(
'submissionid' => $submissionid,
'isfinalgrade' => $isfinalgrade,
'assessorid' => $assessorid,
'stage_identifier' => $stage_identifier,
'finalised' => $finalised,
'ajax' => $ajax,
);
if ($ajax) {
$params['cell_type'] = required_param('cell_type', PARAM_TEXT);
}
$controller = new mod_coursework\controllers\feedback_controller($params);
$controller->create_feedback();