@@ -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); |
@@ -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' and |
| 60 | 60 | $component !== 'atto_recordrtc' or |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'videortcicon' => $videortcicon, |
| 68 | 68 | 'oldermoodle' => $moodleversion < $moodle32, |
| 69 | 69 | 'maxrecsize' => $maxrecsize |
| 70 | - ); |
|
| 70 | + ); |
|
| 71 | 71 | |
| 72 | 72 | return $params; |
| 73 | 73 | } |
@@ -79,42 +79,42 @@ discard block |
||
| 79 | 79 | global $PAGE; |
| 80 | 80 | |
| 81 | 81 | $PAGE->requires->strings_for_js(array('audiortc', |
| 82 | - 'videortc', |
|
| 83 | - 'gumabort_title', |
|
| 84 | - 'gumabort', |
|
| 85 | - 'gumnotallowed_title', |
|
| 86 | - 'gumnotallowed', |
|
| 87 | - 'gumnotfound_title', |
|
| 88 | - 'gumnotfound', |
|
| 89 | - 'gumnotreadable_title', |
|
| 90 | - 'gumnotreadable', |
|
| 91 | - 'gumoverconstrained_title', |
|
| 92 | - 'gumoverconstrained', |
|
| 93 | - 'gumsecurity_title', |
|
| 94 | - 'gumsecurity', |
|
| 95 | - 'gumtype_title', |
|
| 96 | - 'gumtype', |
|
| 97 | - 'insecurealert_title', |
|
| 98 | - 'insecurealert', |
|
| 99 | - 'browseralert_title', |
|
| 100 | - 'browseralert', |
|
| 101 | - 'startrecording', |
|
| 102 | - 'recordagain', |
|
| 103 | - 'stoprecording', |
|
| 104 | - 'recordingfailed', |
|
| 105 | - 'attachrecording', |
|
| 106 | - 'norecordingfound_title', |
|
| 107 | - 'norecordingfound', |
|
| 108 | - 'nearingmaxsize_title', |
|
| 109 | - 'nearingmaxsize', |
|
| 110 | - 'uploadprogress', |
|
| 111 | - 'uploadfailed', |
|
| 112 | - 'uploadfailed404', |
|
| 113 | - 'uploadaborted', |
|
| 114 | - 'annotationprompt', |
|
| 115 | - 'annotation:audio', |
|
| 116 | - 'annotation:video'), |
|
| 117 | - 'atto_recordrtc'); |
|
| 82 | + 'videortc', |
|
| 83 | + 'gumabort_title', |
|
| 84 | + 'gumabort', |
|
| 85 | + 'gumnotallowed_title', |
|
| 86 | + 'gumnotallowed', |
|
| 87 | + 'gumnotfound_title', |
|
| 88 | + 'gumnotfound', |
|
| 89 | + 'gumnotreadable_title', |
|
| 90 | + 'gumnotreadable', |
|
| 91 | + 'gumoverconstrained_title', |
|
| 92 | + 'gumoverconstrained', |
|
| 93 | + 'gumsecurity_title', |
|
| 94 | + 'gumsecurity', |
|
| 95 | + 'gumtype_title', |
|
| 96 | + 'gumtype', |
|
| 97 | + 'insecurealert_title', |
|
| 98 | + 'insecurealert', |
|
| 99 | + 'browseralert_title', |
|
| 100 | + 'browseralert', |
|
| 101 | + 'startrecording', |
|
| 102 | + 'recordagain', |
|
| 103 | + 'stoprecording', |
|
| 104 | + 'recordingfailed', |
|
| 105 | + 'attachrecording', |
|
| 106 | + 'norecordingfound_title', |
|
| 107 | + 'norecordingfound', |
|
| 108 | + 'nearingmaxsize_title', |
|
| 109 | + 'nearingmaxsize', |
|
| 110 | + 'uploadprogress', |
|
| 111 | + 'uploadfailed', |
|
| 112 | + 'uploadfailed404', |
|
| 113 | + 'uploadaborted', |
|
| 114 | + 'annotationprompt', |
|
| 115 | + 'annotation:audio', |
|
| 116 | + 'annotation:video'), |
|
| 117 | + 'atto_recordrtc'); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | $params = array('contextid' => $context->id, |
| 60 | 60 | 'sesskey' => $sesskey, |
| 61 | - 'recordrtcroot' => $CFG->wwwroot.'/lib/editor/atto/plugins/recordrtc/', |
|
| 61 | + 'recordrtcroot' => $CFG->wwwroot . '/lib/editor/atto/plugins/recordrtc/', |
|
| 62 | 62 | 'allowedtypes' => $allowedtypes, |
| 63 | 63 | 'audiobitrate' => $audiobitrate, |
| 64 | 64 | 'videobitrate' => $videobitrate, |