| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | // Disable Moodle-specific debug messages and any errors in output. | 
| 27 | 27 |  define('NO_DEBUG_DISPLAY', true); | 
| 28 | 28 | |
| 29 | -require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))).'/config.php'); | |
| 29 | +require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/config.php'); | |
| 30 | 30 | |
| 31 | 31 | require_login(); | 
| 32 | 32 |  if (isguestuser()) { | 
| @@ -50,10 +50,10 @@ discard block | ||
| 50 | 50 |      print_error('invalidarguments'); | 
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | -$contextid = (int)array_shift($args); | |
| 53 | +$contextid = (int) array_shift($args); | |
| 54 | 54 | $component = array_shift($args); | 
| 55 | 55 | $filearea = array_shift($args); | 
| 56 | -$draftid = (int)array_shift($args); | |
| 56 | +$draftid = (int) array_shift($args); | |
| 57 | 57 | |
| 58 | 58 |  if ($component !== 'atto_recordrtc' or $filearea !== 'annotation') { | 
| 59 | 59 | send_file_not_found(); | 
| @@ -74,5 +74,5 @@ | ||
| 74 | 74 | |
| 75 | 75 | // OK response. | 
| 76 | 76 | $filetarget = $filesaved->get_contextid().'/'.$filesaved->get_component().'/'.$filesaved->get_filearea().'/'. | 
| 77 | - $filesaved->get_itemid().'/'.$filesaved->get_filename(); | |
| 77 | + $filesaved->get_itemid().'/'.$filesaved->get_filename(); | |
| 78 | 78 | echo($filetarget); | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | // Disable Moodle-specific debug messages and any errors in output. | 
| 27 | 27 |  define('NO_DEBUG_DISPLAY', true); | 
| 28 | 28 | |
| 29 | -require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))).'/config.php'); | |
| 29 | +require_once(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/config.php'); | |
| 30 | 30 | |
| 31 | 31 |  $contextid = optional_param('contextid', 0, PARAM_INT); | 
| 32 | 32 | |
| @@ -61,18 +61,18 @@ discard block | ||
| 61 | 61 | // Prepare file record object. | 
| 62 | 62 | $usercontext = context_user::instance($USER->id); | 
| 63 | 63 | $fileinfo = array( | 
| 64 | - 'contextid' => $usercontext->id, // ID of context. | |
| 64 | + 'contextid' => $usercontext->id, // ID of context. | |
| 65 | 65 | 'component' => 'atto_recordrtc', // Usually = table name. | 
| 66 | - 'filearea' => 'annotation', // Usually = table name. | |
| 67 | - 'itemid' => time(), // Usually = ID of row in table. | |
| 68 | - 'filepath' => '/', // Any path beginning and ending in "/". | |
| 69 | - 'filename' => $filename, // Any filename. | |
| 66 | + 'filearea' => 'annotation', // Usually = table name. | |
| 67 | + 'itemid' => time(), // Usually = ID of row in table. | |
| 68 | + 'filepath' => '/', // Any path beginning and ending in "/". | |
| 69 | + 'filename' => $filename, // Any filename. | |
| 70 | 70 | 'author' => fullname($USER), | 
| 71 | 71 | 'licence' => $CFG->sitedefaultlicense | 
| 72 | 72 | ); | 
| 73 | 73 | $filesaved = $fs->create_file_from_pathname($fileinfo, $filetmp); | 
| 74 | 74 | |
| 75 | 75 | // OK response. | 
| 76 | -$filetarget = $filesaved->get_contextid().'/'.$filesaved->get_component().'/'.$filesaved->get_filearea().'/'. | |
| 77 | - $filesaved->get_itemid().'/'.$filesaved->get_filename(); | |
| 76 | +$filetarget = $filesaved->get_contextid() . '/' . $filesaved->get_component() . '/' . $filesaved->get_filearea() . '/' . | |
| 77 | + $filesaved->get_itemid() . '/' . $filesaved->get_filename(); | |
| 78 | 78 | echo($filetarget); | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | 'videortcicon' => $videortcicon, | 
| 69 | 69 | 'oldermoodle' => $moodleversion < $moodle32, | 
| 70 | 70 | 'maxrecsize' => $maxrecsize | 
| 71 | - ); | |
| 71 | + ); | |
| 72 | 72 | |
| 73 | 73 | return $params; | 
| 74 | 74 | } | 
| @@ -80,26 +80,26 @@ discard block | ||
| 80 | 80 | global $PAGE; | 
| 81 | 81 | |
| 82 | 82 |      $PAGE->requires->strings_for_js(array('audiortc', | 
| 83 | - 'videortc', | |
| 84 | - 'insecurealert', | |
| 85 | - 'inputdevicealert_title', | |
| 86 | - 'inputdevicealert', | |
| 87 | - 'browseralert_title', | |
| 88 | - 'browseralert', | |
| 89 | - 'startrecording', | |
| 90 | - 'recordagain', | |
| 91 | - 'stoprecording', | |
| 92 | - 'recordingfailed', | |
| 93 | - 'attachrecording', | |
| 94 | - 'norecordingfound', | |
| 95 | - 'nearingmaxsize', | |
| 96 | - 'uploadprogress', | |
| 97 | - 'uploadfailed', | |
| 98 | - 'uploadfailed404', | |
| 99 | - 'uploadaborted', | |
| 100 | - 'annotationprompt', | |
| 101 | - 'annotation:audio', | |
| 102 | - 'annotation:video'), | |
| 83 | + 'videortc', | |
| 84 | + 'insecurealert', | |
| 85 | + 'inputdevicealert_title', | |
| 86 | + 'inputdevicealert', | |
| 87 | + 'browseralert_title', | |
| 88 | + 'browseralert', | |
| 89 | + 'startrecording', | |
| 90 | + 'recordagain', | |
| 91 | + 'stoprecording', | |
| 92 | + 'recordingfailed', | |
| 93 | + 'attachrecording', | |
| 94 | + 'norecordingfound', | |
| 95 | + 'nearingmaxsize', | |
| 96 | + 'uploadprogress', | |
| 97 | + 'uploadfailed', | |
| 98 | + 'uploadfailed404', | |
| 99 | + 'uploadaborted', | |
| 100 | + 'annotationprompt', | |
| 101 | + 'annotation:audio', | |
| 102 | + 'annotation:video'), | |
| 103 | 103 | 'atto_recordrtc'); | 
| 104 | 104 | } | 
| 105 | 105 | |
| @@ -59,7 +59,7 @@ | ||
| 59 | 59 | } | 
| 60 | 60 |      $params = array('contextid' => $context->id, | 
| 61 | 61 | 'sesskey' => $sesskey, | 
| 62 | - 'recordrtcroot' => $CFG->wwwroot.MOODLE_ATTO_RECORDRTC_ROOT, | |
| 62 | + 'recordrtcroot' => $CFG->wwwroot . MOODLE_ATTO_RECORDRTC_ROOT, | |
| 63 | 63 | 'allowedtypes' => $allowedtypes, | 
| 64 | 64 | 'audiobitrate' => $audiobitrate, | 
| 65 | 65 | 'videobitrate' => $videobitrate, |