@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // Disable Moodle-specific debug messages and any errors in output. |
28 | 28 | define('NO_DEBUG_DISPLAY', true); |
29 | 29 | |
30 | -require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))).'/config.php'); |
|
30 | +require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/config.php'); |
|
31 | 31 | |
32 | 32 | // Should probably be required_param, as the context to which it is linked is important. |
33 | 33 | $contextid = optional_param('contextid', 0, PARAM_INT); |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | // Prepare file record object. |
66 | 66 | $usercontext = context_user::instance($USER->id); |
67 | 67 | $fileinfo = array( |
68 | - 'contextid' => $usercontext->id, // ID of context. |
|
68 | + 'contextid' => $usercontext->id, // ID of context. |
|
69 | 69 | 'component' => 'atto_recordrtc', // Usually = table name. |
70 | - 'filearea' => 'annotation', // Usually = table name. |
|
71 | - 'itemid' => time(), // Usually = ID of row in table. |
|
72 | - 'filepath' => '/', // Any path beginning and ending in "/". |
|
73 | - 'filename' => $filename, // Any filename. |
|
70 | + 'filearea' => 'annotation', // Usually = table name. |
|
71 | + 'itemid' => time(), // Usually = ID of row in table. |
|
72 | + 'filepath' => '/', // Any path beginning and ending in "/". |
|
73 | + 'filename' => $filename, // Any filename. |
|
74 | 74 | 'author' => fullname($USER), |
75 | 75 | 'license' => $CFG->sitedefaultlicense |
76 | 76 | ); |
77 | 77 | $filesaved = $fs->create_file_from_pathname($fileinfo, $filetmp); |
78 | 78 | |
79 | 79 | // OK response. |
80 | -$filetarget = $filesaved->get_contextid().'/'.$filesaved->get_component().'/'.$filesaved->get_filearea().'/'. |
|
81 | - $filesaved->get_itemid().'/'.$filesaved->get_filename(); |
|
80 | +$filetarget = $filesaved->get_contextid() . '/' . $filesaved->get_component() . '/' . $filesaved->get_filearea() . '/' . |
|
81 | + $filesaved->get_itemid() . '/' . $filesaved->get_filename(); |
|
82 | 82 | echo($filetarget); |