Skip to content

Commit

Permalink
removed references to Red5
Browse files Browse the repository at this point in the history
  • Loading branch information
iShineGuy authored and iShineGuy committed Feb 10, 2018
1 parent 0d81105 commit 9d46bd6
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 49 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
@@ -1,5 +1,8 @@
Change List
=========
Version 2018020701
Removed Red5 references

Version 2017112001
Fixed an incorrect path in dialog.php

Expand Down
10 changes: 4 additions & 6 deletions README.txt
Expand Up @@ -5,11 +5,10 @@ The Moodle PoodLL Anywhere plugin for Atto.
It allows the user to record audio and video or draw pictures, or snap pictures, directly into forum posts, assignment descriptions, page resource content, question descriptions, question responses and other areas.

The recorders available are:
i) audio (red5)
ii) audio (mp3)
iii) video (red5)
iv) whiteboard
v) snapshot
i) audio
ii) video
iii) whiteboard
iv) snapshot

They can be hidden or shown using the settings found at:
site admin -> plugins -> text editors -> Atto html editor -> poodll anywhere
Expand All @@ -19,7 +18,6 @@ show icons depending on the user's role.

The capabilities available to be set are:
Atto/poodll:visible
Atto/poodll:allowaudiored5
Atto/poodll:allowaudiomp3
Atto/poodll:allowvideo
Atto/poodll:allowwhiteboard
Expand Down
12 changes: 1 addition & 11 deletions db/access.php
Expand Up @@ -48,17 +48,7 @@
'manager' => CAP_ALLOW
)
),
'atto/poodll:allowaudiored5' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'coursecreator' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'student' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),

'atto/poodll:allowvideo' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
Expand Down
4 changes: 0 additions & 4 deletions dialog/poodll.php
Expand Up @@ -81,10 +81,6 @@
$instruction = get_string('drawtheninsert', 'atto_poodll');
break;
case 'audiored5':
$recorderhtml = \filter_poodll\poodlltools::fetchAudioRecorderForSubmission('auto', 'none', $updatecontrol,
$usercontextid,'user','draft',$itemid,0,$callbackjs,$hints);
$instruction = get_string('recordtheninsert', 'atto_poodll');
break;
case 'audiomp3':
default:
$recorderhtml = \filter_poodll\poodlltools::fetchMP3RecorderForSubmission($updatecontrol, $usercontextid ,'user','draft',$itemid,0,$callbackjs,$hints);
Expand Down
12 changes: 4 additions & 8 deletions lang/en/atto_poodll.php
Expand Up @@ -33,15 +33,13 @@

$string['browse'] = 'Browse';
$string['visible'] = 'Visible';
$string['audiomp3_desc'] = 'Record MP3';
$string['audiored5_desc'] = 'Record Audio';
$string['audiomp3_desc'] = 'Record Audio';
$string['video_desc'] = 'Record Video';
$string['whiteboard_desc'] = 'Draw a Picture';
$string['snapshot_desc'] = 'Take a Picture';
$string['widgets_desc'] = 'Insert a Widget';
$string['nothingtoinsert'] = 'Nothing to insert!';
$string['allowaudiomp3'] = 'Allow MP3 Recording';
$string['allowaudiored5'] = 'Allow Audio(Red5) Recording';
$string['allowaudiomp3'] = 'Allow Audio Recording';
$string['allowwhiteboard'] = 'Allow Whiteboard';
$string['allowvideo'] = 'Allow Video Recording';
$string['allowsnapshot'] = 'Allow Snapshot';
Expand All @@ -50,8 +48,7 @@
$string['recordtheninsert'] = 'After recording, press "Upload" then "Insert."';
$string['drawtheninsert'] = 'After drawing, press "Save Picture" then "Insert."';
$string['snaptheninsert'] = 'After taking a picture, press "Upload", then "Insert."';
$string['show_audiomp3'] = 'Show MP3 recorder';
$string['show_audiored5'] = 'Show Audio recorder(red5)';
$string['show_audiomp3'] = 'Show Audio recorder';
$string['show_video'] = 'Show Video recorder';
$string['show_whiteboard'] = 'Show Whiteboard';
$string['show_snapshot'] = 'Show Snapshot';
Expand All @@ -65,8 +62,7 @@
$string['chooseinsert'] = 'What do you want to insert?';
$string['whiteboardheading'] = 'Whiteboard';
$string['usewhiteboard'] = 'Choose the whiteboard type:';
$string['poodll:allowaudiomp3'] = 'Allow MP3 Recording';
$string['poodll:allowaudiored5'] = 'Allow Audio(Red5) Recording';
$string['poodll:allowaudiomp3'] = 'Allow Audio Recording';
$string['poodll:allowwhiteboard'] = 'Allow Whiteboard';
$string['poodll:allowvideo'] = 'Allow Video Recording';
$string['poodll:allowsnapshot'] = 'Allow Snapshot';
Expand Down
7 changes: 5 additions & 2 deletions lib.php
Expand Up @@ -37,7 +37,6 @@ function atto_poodll_strings_for_js() {
'fieldsheader',
'nofieldsheader',
'dialogtitle',
'audiored5_desc',
'audiomp3_desc',
'video_desc',
'whiteboard_desc',
Expand Down Expand Up @@ -85,10 +84,14 @@ function atto_poodll_params_for_js($elementid, $options, $fpoptions) {
$params['usewhiteboard'] = get_config('atto_poodll','usewhiteboard');

//add icons to editor if the permissions are all ok
$recorders = array('audiomp3','audiored5','video','whiteboard','snapshot','widgets');
$recorders = array('audiomp3','video','whiteboard','snapshot','widgets');
$allowedrecorders = get_config('atto_poodll','recorderstoshow');
if(!empty($allowedrecorders)){
$allowedrecorders = explode(',',$allowedrecorders);
//we deleted the red5 option, just in case, we map it here to mp3
if(array_key_exists('show_audiored5',$allowedrecorders) && !array_key_exists('show_audiomp3',$allowedrecorders) ){
$allowedrecorders[]='show_audiomp3';
}
foreach($recorders as $recorder){
if((array_search('show_' . $recorder,$allowedrecorders)!==false) && has_capability('atto/poodll:allow' . $recorder, $coursecontext)){
$params[$recorder]=true;
Expand Down
3 changes: 1 addition & 2 deletions settings.php
Expand Up @@ -33,13 +33,12 @@

// Recorder settings
$recoptions = array('show_audiomp3' => new lang_string('show_audiomp3', 'atto_poodll'),
'show_audiored5' => new lang_string('show_audiored5', 'atto_poodll'),
'show_video' => new lang_string('show_video', 'atto_poodll'),
'show_whiteboard' => new lang_string('show_whiteboard', 'atto_poodll'),
'show_snapshot' => new lang_string('show_snapshot', 'atto_poodll'),
'show_widgets' => new lang_string('show_widgets', 'atto_poodll'));

$recoptiondefaults = array('show_audiomp3' => 1,'show_audiored5' => 0,'show_video' => 1,'show_whiteboard' => 1,'show_snapshot' => 1,'show_widgets' => 1);
$recoptiondefaults = array('show_audiomp3' => 1,'show_video' => 1,'show_whiteboard' => 1,'show_snapshot' => 1,'show_widgets' => 1);
$settings->add(new admin_setting_configmulticheckbox('atto_poodll/recorderstoshow',
get_string('recorderstoshow', 'atto_poodll'),
get_string('recorderstoshowdetails', 'atto_poodll'), $recoptiondefaults,$recoptions));
Expand Down
4 changes: 2 additions & 2 deletions version.php
Expand Up @@ -24,11 +24,11 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2017112001;
$plugin->version = 2018020701;
$plugin->requires = 2016052300;//moodle 3.1.0
$plugin->component = 'atto_poodll'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
// Human readable version information
$plugin->release = '3.0.5 (Build 2017112001)';
$plugin->release = '3.0.6 (Build 2018020701)';
$plugin->dependencies = array('filter_poodll' => 2016081401);

Expand Up @@ -147,7 +147,7 @@ Y.namespace('M.atto_poodll').Button = Y.Base.create('button', Y.M.editor_atto.Ed
}


var recorders = new Array('audiomp3','audiored5','video', 'whiteboard','snapshot','widgets');
var recorders = new Array('audiomp3','video', 'whiteboard','snapshot','widgets');
for (var therecorder = 0; therecorder < recorders.length; therecorder++) {
// Add the poodll button first (if we are supposed to)
if(config.hasOwnProperty(recorders[therecorder])){
Expand Down Expand Up @@ -184,9 +184,9 @@ Y.namespace('M.atto_poodll').Button = Y.Base.create('button', Y.M.editor_atto.Ed
var height=260;
switch(therecorder){
case 'audiomp3':
case 'audiored5': width=360;
height=260;
break;
width=360;
height=260;
break;
case 'video':
case 'snapshot':width=360;
height=450;
Expand Down

0 comments on commit 9d46bd6

Please sign in to comment.