| @@ -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 |  $contextid = optional_param('contextid', 0, PARAM_INT); | 
| 33 | 33 | |
| @@ -62,18 +62,18 @@ discard block | ||
| 62 | 62 | // Prepare file record object. | 
| 63 | 63 | $usercontext = context_user::instance($USER->id); | 
| 64 | 64 | $fileinfo = array( | 
| 65 | - 'contextid' => $usercontext->id, // ID of context. | |
| 65 | + 'contextid' => $usercontext->id, // ID of context. | |
| 66 | 66 | 'component' => 'atto_recordrtc', // Usually = table name. | 
| 67 | - 'filearea' => 'annotation', // Usually = table name. | |
| 68 | - 'itemid' => time(), // Usually = ID of row in table. | |
| 69 | - 'filepath' => '/', // Any path beginning and ending in "/". | |
| 70 | - 'filename' => $filename, // Any filename. | |
| 67 | + 'filearea' => 'annotation', // Usually = table name. | |
| 68 | + 'itemid' => time(), // Usually = ID of row in table. | |
| 69 | + 'filepath' => '/', // Any path beginning and ending in "/". | |
| 70 | + 'filename' => $filename, // Any filename. | |
| 71 | 71 | 'author' => fullname($USER), | 
| 72 | 72 | 'license' => $CFG->sitedefaultlicense | 
| 73 | 73 | ); | 
| 74 | 74 | $filesaved = $fs->create_file_from_pathname($fileinfo, $filetmp); | 
| 75 | 75 | |
| 76 | 76 | // OK response. | 
| 77 | -$filetarget = $filesaved->get_contextid().'/'.$filesaved->get_component().'/'.$filesaved->get_filearea().'/'. | |
| 78 | - $filesaved->get_itemid().'/'.$filesaved->get_filename(); | |
| 77 | +$filetarget = $filesaved->get_contextid() . '/' . $filesaved->get_component() . '/' . $filesaved->get_filearea() . '/' . | |
| 78 | + $filesaved->get_itemid() . '/' . $filesaved->get_filename(); | |
| 79 | 79 | echo($filetarget); | 
| @@ -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 | require_login(); | 
| 33 | 33 |  if (isguestuser()) { | 
| @@ -51,10 +51,10 @@ discard block | ||
| 51 | 51 |      print_error('invalidarguments'); | 
| 52 | 52 | } | 
| 53 | 53 | |
| 54 | -$contextid = (int)array_shift($args); | |
| 54 | +$contextid = (int) array_shift($args); | |
| 55 | 55 | $component = array_shift($args); | 
| 56 | 56 | $filearea = array_shift($args); | 
| 57 | -$draftid = (int)array_shift($args); | |
| 57 | +$draftid = (int) array_shift($args); | |
| 58 | 58 | |
| 59 | 59 | if ($component !== 'tinymce_recordrtc' or | 
| 60 | 60 | $component !== 'atto_recordrtc' or |