From 36123caa3c9c6cb9b3f8d0a8ddabce2ddf6f449e Mon Sep 17 00:00:00 2001 From: Omid1285 Date: Thu, 30 May 2019 20:28:48 +0430 Subject: [PATCH 01/12] Fix: Show white page in moodle 3.6 and later. becuase of moodle devs removed ./eventslib.php in moodle 3.6 --- lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib.php b/lib.php index 296d49f..4257642 100644 --- a/lib.php +++ b/lib.php @@ -41,7 +41,13 @@ $adobeconnect_EXAMPLE_CONSTANT = 42; /** Include eventslib.php */ -require_once($CFG->libdir.'/eventslib.php'); +// require_once($CFG->libdir.'/eventslib.php'); +/** + * replaced with 'deprecatedlib.php' + * because eventslib.php deleted since moodle 35 + */ + +require_once($CFG->libdir.'/deprecatedlib.php'); /** Include calendar/lib.php */ require_once($CFG->dirroot.'/calendar/lib.php'); From 9da544f1155db1e0bbdff8b71d002e9b94a682d7 Mon Sep 17 00:00:00 2001 From: Omid1285 Date: Thu, 30 May 2019 23:40:07 +0430 Subject: [PATCH 02/12] Fix: fixed a bug that Plugin can't install on moodle 3.6 and above. --- db/install.php | 147 ------------------------------------------------ settings.php | 150 +++++++++++++++++++++++++++++++++++++++++++++++++ version.php | 4 +- 3 files changed, 152 insertions(+), 149 deletions(-) diff --git a/db/install.php b/db/install.php index 39f6c8b..a6c5e22 100644 --- a/db/install.php +++ b/db/install.php @@ -23,151 +23,4 @@ function xmldb_adobeconnect_install() { global $DB; - - // The commented out code is waiting for a fix for MDL-25709 - $result = true; - $timenow = time(); - $sysctx = context_system::instance(); - $mrole = new stdClass(); - $levels = array(CONTEXT_COURSECAT, CONTEXT_COURSE, CONTEXT_MODULE); - - $param = array('shortname' => 'coursecreator'); - $coursecreator = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - if (empty($coursecreator)) { - $param = array('archetype' => 'coursecreator'); - $coursecreator = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - } - $coursecreatorrid = array_shift($coursecreator); - - $param = array('shortname' =>'editingteacher'); - $editingteacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - if (empty($editingteacher)) { - $param = array('archetype' => 'editingteacher'); - $editingteacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - } - $editingteacherrid = array_shift($editingteacher); - - $param = array('shortname' =>'teacher'); - $teacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - if (empty($teacher)) { - $param = array('archetype' => 'teacher'); - $teacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); - } - $teacherrid = array_shift($teacher); - - // Fully setup the Adobe Connect Presenter role. - $param = array('shortname' => 'adobeconnectpresenter'); - if (!$mrole = $DB->get_record('role', $param)) { - - if ($rid = create_role(get_string('adobeconnectpresenter', 'adobeconnect'), 'adobeconnectpresenter', - get_string('adobeconnectpresenterdescription', 'adobeconnect'), 'adobeconnectpresenter')) { - - $mrole = new stdClass(); - $mrole->id = $rid; - $result = $result && assign_capability('mod/adobeconnect:meetingpresenter', CAP_ALLOW, $mrole->id, $sysctx->id); - - set_role_contextlevels($mrole->id, $levels); - } else { - $result = false; - } - } - - if (isset($coursecreatorrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); - } - } - - if (isset($editingteacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); - } - } - - if (isset($teacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); - } - } - - // Fully setup the Adobe Connect Participant role. - $param = array('shortname' => 'adobeconnectparticipant'); - - if ($result && !($mrole = $DB->get_record('role', $param))) { - - if ($rid = create_role(get_string('adobeconnectparticipant', 'adobeconnect'), 'adobeconnectparticipant', - get_string('adobeconnectparticipantdescription', 'adobeconnect'), 'adobeconnectparticipant')) { - - $mrole = new stdClass(); - $mrole->id = $rid; - $result = $result && assign_capability('mod/adobeconnect:meetingparticipant', CAP_ALLOW, $mrole->id, $sysctx->id); - set_role_contextlevels($mrole->id, $levels); - } else { - $result = false; - } - } - - if (isset($coursecreatorrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); - } - } - - if (isset($editingteacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); - } - } - - if (isset($teacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); - } - } - - - // Fully setup the Adobe Connect Host role. - $param = array('shortname' => 'adobeconnecthost'); - if ($result && !$mrole = $DB->get_record('role', $param)) { - if ($rid = create_role(get_string('adobeconnecthost', 'adobeconnect'), 'adobeconnecthost', - get_string('adobeconnecthostdescription', 'adobeconnect'), 'adobeconnecthost')) { - - $mrole = new stdClass(); - $mrole->id = $rid; - $result = $result && assign_capability('mod/adobeconnect:meetinghost', CAP_ALLOW, $mrole->id, $sysctx->id); - set_role_contextlevels($mrole->id, $levels); - } else { - $result = false; - } - } - - if (isset($coursecreatorrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); - } - } - - if (isset($editingteacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); - } - } - - if (isset($teacherrid->id)) { - $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); - if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); - } - } - - return $result; - } \ No newline at end of file diff --git a/settings.php b/settings.php index a04b7ea..6a51cda 100644 --- a/settings.php +++ b/settings.php @@ -25,6 +25,156 @@ global $PAGE; +// installation process that can't done in plugin install process moved here from db\install.php file +$param = array('shortname' => 'adobeconnectpresenter'); +$mrole = $DB->get_record('role', $param); + +if (!$mrole){ + // The commented out code is waiting for a fix for MDL-25709 + $result = true; + $timenow = time(); + $sysctx = context_system::instance(); + $mrole = new stdClass(); + $levels = array(CONTEXT_COURSECAT, CONTEXT_COURSE, CONTEXT_MODULE); + + $param = array('shortname' => 'coursecreator'); + $coursecreator = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + if (empty($coursecreator)) { + $param = array('archetype' => 'coursecreator'); + $coursecreator = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + } + $coursecreatorrid = array_shift($coursecreator); + + $param = array('shortname' =>'editingteacher'); + $editingteacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + if (empty($editingteacher)) { + $param = array('archetype' => 'editingteacher'); + $editingteacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + } + $editingteacherrid = array_shift($editingteacher); + + $param = array('shortname' =>'teacher'); + $teacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + if (empty($teacher)) { + $param = array('archetype' => 'teacher'); + $teacher = $DB->get_records('role', $param, 'id ASC', 'id', 0, 1); + } + $teacherrid = array_shift($teacher); + + // Fully setup the Adobe Connect Presenter role. + $param = array('shortname' => 'adobeconnectpresenter'); + if (!$mrole = $DB->get_record('role', $param)) { + + if ($rid = create_role(get_string('adobeconnectpresenter', 'adobeconnect'), 'adobeconnectpresenter', + get_string('adobeconnectpresenterdescription', 'adobeconnect'), 'adobeconnectpresenter')) { + + $mrole = new stdClass(); + $mrole->id = $rid; + $result = $result && assign_capability('mod/adobeconnect:meetingpresenter', CAP_ALLOW, $mrole->id, $sysctx->id); + + set_role_contextlevels($mrole->id, $levels); + } else { + $result = false; + } + } + + if (isset($coursecreatorrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($coursecreatorrid->id, $mrole->id); + } + } + + if (isset($editingteacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($editingteacherrid->id, $mrole->id); + } + } + + if (isset($teacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($teacherrid->id, $mrole->id); + } + } + + // Fully setup the Adobe Connect Participant role. + $param = array('shortname' => 'adobeconnectparticipant'); + + if ($result && !($mrole = $DB->get_record('role', $param))) { + + if ($rid = create_role(get_string('adobeconnectparticipant', 'adobeconnect'), 'adobeconnectparticipant', + get_string('adobeconnectparticipantdescription', 'adobeconnect'), 'adobeconnectparticipant')) { + + $mrole = new stdClass(); + $mrole->id = $rid; + $result = $result && assign_capability('mod/adobeconnect:meetingparticipant', CAP_ALLOW, $mrole->id, $sysctx->id); + set_role_contextlevels($mrole->id, $levels); + } else { + $result = false; + } + } + + if (isset($coursecreatorrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($coursecreatorrid->id, $mrole->id); + } + } + + if (isset($editingteacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($editingteacherrid->id, $mrole->id); + } + } + + if (isset($teacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($teacherrid->id, $mrole->id); + } + } + + + // Fully setup the Adobe Connect Host role. + $param = array('shortname' => 'adobeconnecthost'); + if ($result && !$mrole = $DB->get_record('role', $param)) { + if ($rid = create_role(get_string('adobeconnecthost', 'adobeconnect'), 'adobeconnecthost', + get_string('adobeconnecthostdescription', 'adobeconnect'), 'adobeconnecthost')) { + + $mrole = new stdClass(); + $mrole->id = $rid; + $result = $result && assign_capability('mod/adobeconnect:meetinghost', CAP_ALLOW, $mrole->id, $sysctx->id); + set_role_contextlevels($mrole->id, $levels); + } else { + $result = false; + } + } + + if (isset($coursecreatorrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($coursecreatorrid->id, $mrole->id); + } + } + + if (isset($editingteacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($editingteacherrid->id, $mrole->id); + } + } + + if (isset($teacherrid->id)) { + $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); + if (!$DB->get_record('role_allow_assign', $param)) { + allow_assign($teacherrid->id, $mrole->id); + } + } +} + if ($ADMIN->fulltree) { require_once($CFG->dirroot . '/mod/adobeconnect/locallib.php'); $PAGE->requires->js_init_call('M.mod_adobeconnect.init'); diff --git a/version.php b/version.php index 56c22e1..6e42ae7 100644 --- a/version.php +++ b/version.php @@ -21,9 +21,9 @@ * @copyright (C) 2015 Remote Learner.net Inc http://www.remote-learner.net */ -$plugin->version = 2017111300; +$plugin->version = 2019053000; $plugin->requires = 2017111300; $plugin->cron = 0; $plugin->component = 'mod_adobeconnect'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '3.4.0.0'; +$plugin->release = '3.6.0.0'; From fb65ee970bbe7bf719b30429019b2988230ca8e0 Mon Sep 17 00:00:00 2001 From: ImgBotApp Date: Thu, 4 Jul 2019 19:56:40 +0000 Subject: [PATCH 03/12] [ImgBot] Optimize images /pix/rl_logo.png -- 10.48kb -> 8.02kb (23.47%) --- pix/rl_logo.png | Bin 10735 -> 8215 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pix/rl_logo.png b/pix/rl_logo.png index 9baf219bb3f8f1590c71cebe163d299e0b856bf3..e52a059a5974ff3c5d03d7301ba645cf1b9dbad6 100644 GIT binary patch delta 179 zcmaDKJl$b}3NK5#qpu?a!^VE@KZ&f9CvxctFt8FMGa zQgQ3;<`Z0k^5u;47JF$2eVsX#fq_A_#5JNMC9x#cD!C{XNHG{07+UHYnClvtgcw>{ tnVMM{8)+LDSQ!|Y-upcXMMG|WN@iLmZVfKY&U!!%44$rjF6*2UngGF-HoX7< delta 2719 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 From 13fb3ddf0fc715188be99b06f787218d0ff6ab42 Mon Sep 17 00:00:00 2001 From: alised Date: Thu, 7 May 2020 16:11:28 +0430 Subject: [PATCH 04/12] fix allow_assign function error --- settings.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/settings.php b/settings.php index 6a51cda..ef7ffa1 100644 --- a/settings.php +++ b/settings.php @@ -81,21 +81,21 @@ if (isset($coursecreatorrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); + core_role_set_assign_allowed($coursecreatorrid->id, $mrole->id); } } if (isset($editingteacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); + core_role_set_assign_allowed($editingteacherrid->id, $mrole->id); } } if (isset($teacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); + core_role_set_assign_allowed($teacherrid->id, $mrole->id); } } @@ -119,21 +119,21 @@ if (isset($coursecreatorrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); + core_role_set_assign_allowed($coursecreatorrid->id, $mrole->id); } } if (isset($editingteacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); + core_role_set_assign_allowed($editingteacherrid->id, $mrole->id); } } if (isset($teacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); + core_role_set_assign_allowed($teacherrid->id, $mrole->id); } } @@ -156,21 +156,21 @@ if (isset($coursecreatorrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $coursecreatorrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($coursecreatorrid->id, $mrole->id); + core_role_set_assign_allowed($coursecreatorrid->id, $mrole->id); } } if (isset($editingteacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $editingteacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($editingteacherrid->id, $mrole->id); + core_role_set_assign_allowed($editingteacherrid->id, $mrole->id); } } if (isset($teacherrid->id)) { $param = array('allowassign' => $mrole->id, 'roleid' => $teacherrid->id); if (!$DB->get_record('role_allow_assign', $param)) { - allow_assign($teacherrid->id, $mrole->id); + core_role_set_assign_allowed($teacherrid->id, $mrole->id); } } } From 9dd4afc709b35f670c1ba9bb585c90c7cac31c6f Mon Sep 17 00:00:00 2001 From: Akbar Ahmadi Date: Sun, 7 Jun 2020 14:55:07 +0430 Subject: [PATCH 05/12] add require accesslib.php, remove junk code --- lib.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib.php b/lib.php index 4257642..bb1b65b 100644 --- a/lib.php +++ b/lib.php @@ -40,14 +40,8 @@ $adobeconnect_EXAMPLE_CONSTANT = 42; -/** Include eventslib.php */ -// require_once($CFG->libdir.'/eventslib.php'); -/** - * replaced with 'deprecatedlib.php' - * because eventslib.php deleted since moodle 35 - */ - -require_once($CFG->libdir.'/deprecatedlib.php'); +/** Include accesslib.php */ +require_once($CFG->libdir.'/accesslib.php'); /** Include calendar/lib.php */ require_once($CFG->dirroot.'/calendar/lib.php'); From 291b07b8ad071633db3fbafb84c1164eb7170bab Mon Sep 17 00:00:00 2001 From: Akbar Ahmadi Date: Sun, 7 Jun 2020 15:27:36 +0430 Subject: [PATCH 06/12] Update version.php --- version.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.php b/version.php index 6e42ae7..20bc6b5 100644 --- a/version.php +++ b/version.php @@ -21,9 +21,9 @@ * @copyright (C) 2015 Remote Learner.net Inc http://www.remote-learner.net */ -$plugin->version = 2019053000; -$plugin->requires = 2017111300; +$plugin->version = 20200600700; +$plugin->requires = 20200600700; $plugin->cron = 0; $plugin->component = 'mod_adobeconnect'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '3.6.0.0'; +$plugin->release = '3.8.0.0'; From 8fa15881638152fd3754edcfe85460513575bd76 Mon Sep 17 00:00:00 2001 From: sparse91 <26763315+sparse91@users.noreply.github.com> Date: Wed, 23 Sep 2020 09:46:16 +0330 Subject: [PATCH 07/12] Update version.php --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index 20bc6b5..6e8af2a 100644 --- a/version.php +++ b/version.php @@ -21,8 +21,8 @@ * @copyright (C) 2015 Remote Learner.net Inc http://www.remote-learner.net */ -$plugin->version = 20200600700; -$plugin->requires = 20200600700; +$plugin->version = 2020061501; +$plugin->requires = 2020061501; $plugin->cron = 0; $plugin->component = 'mod_adobeconnect'; $plugin->maturity = MATURITY_STABLE; From 3861362dd958979a8a3171b7aeb11406201d8e81 Mon Sep 17 00:00:00 2001 From: sparse91 <26763315+sparse91@users.noreply.github.com> Date: Wed, 23 Sep 2020 09:52:33 +0330 Subject: [PATCH 08/12] Fix recording list in 3.9 Credits to sanatizade@el.iut.ac.ir --- locallib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/locallib.php b/locallib.php index b08bafa..ed14701 100644 --- a/locallib.php +++ b/locallib.php @@ -633,9 +633,11 @@ function aconnect_get_recordings($aconnect, $folderscoid, $sourcescoid) { if (!is_null($domnode)) { $meetingdetail = $innernodelist->item($x); + $recordingvac9 = $innernodelist->item($x)->attributes->getNamedItem('duration'); + $recordingvac8 = $meetingdetail->getElementsByTagName('duration')->item(0); // Check if the SCO item is a recording or uploaded document. We only want to display recordings - if (!is_null($meetingdetail->getElementsByTagName('duration')->item(0))) { + if ((!is_null($recordingvac9) && $recordingvac9->nodeValue !== '') || !is_null($recordingvac8)) { $j = (int) $domnode->nodeValue; $value = (!is_null($meetingdetail->getElementsByTagName('name'))) ? @@ -668,8 +670,8 @@ function aconnect_get_recordings($aconnect, $folderscoid, $sourcescoid) { $recordings[$j]->modified = (string) $value; - $value = (!is_null($meetingdetail->getElementsByTagName('duration'))) ? - $meetingdetail->getElementsByTagName('duration')->item(0)->nodeValue : ''; + $value = (!is_null($recordingvac9) ? + $recordingvac9->nodeValue : $recordingvac8->nodeValue); $recordings[$j]->duration = (string) $value; From 26ab21b49991813b719a3f8757abc26af2560f95 Mon Sep 17 00:00:00 2001 From: Akbar Ahmadi Date: Sat, 21 Nov 2020 16:43:15 +0330 Subject: [PATCH 09/12] add recording list table --- lang/en/adobeconnect.php | 5 ++++- renderer.php | 28 ++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/lang/en/adobeconnect.php b/lang/en/adobeconnect.php index f953569..ad6236d 100644 --- a/lang/en/adobeconnect.php +++ b/lang/en/adobeconnect.php @@ -167,4 +167,7 @@ $string['event_join_meeting'] = 'User joined a meeting'; $string['event_view_recording'] = 'User viewed a recording'; $string['event_assign_role'] = 'User assigned a Connect Pro role'; -$string['event_unassign_role'] = 'User unassigned a Connect Pro role'; \ No newline at end of file +$string['event_unassign_role'] = 'User unassigned a Connect Pro role'; +$string['startdate'] = 'start'; +$string['enddate'] = 'end'; +$string['duration'] = 'duration'; \ No newline at end of file diff --git a/renderer.php b/renderer.php index f21009a..82c9c45 100644 --- a/renderer.php +++ b/renderer.php @@ -252,17 +252,27 @@ function display_meeting_recording($recordings, $cmid, $groupid, $sourcescoid) { $html .= html_writer::tag('h3', get_string('recordinghdr', 'adobeconnect'), $param); - $param = array('class' => 'aconrecording'); - $html .= html_writer::start_tag('div', $param); + $table = new html_table(); + $table->attributes['class'] = 'generaltable mod_index'; + $counter = 0; foreach ($recordings as $key => $recordinggrp) { if (!empty($recordinggrp)) { + $table->head = array( + '#', + get_string('name'), + get_string('startdate', 'adobeconnect'), + get_string('enddate', 'adobeconnect'), + get_string('duration', 'adobeconnect'), + ); foreach($recordinggrp as $recording_scoid => $recording) { if ($recording->sourcesco != $sourcescoid) { continue; } + $counter++; + $html .= html_writer::start_tag('tr'); $param = array('class' => 'aconrecordingrow'); $html .= html_writer::start_tag('div', $param); @@ -272,15 +282,25 @@ function display_meeting_recording($recordings, $cmid, $groupid, $sourcescoid) { $param = array('target' => '_blank'); $name = html_entity_decode($recording->name); + + $link = html_writer::link($url, format_string($name), $param); + $table->data[] = array( + $counter, + $link, + userdate(strtotime($recording->startdate)), + userdate(strtotime($recording->enddate)), + gmdate("H:i:s", $recording->duration ) + ); + $html .= html_writer::link($url, format_string($name), $param); - $html .= html_writer::end_tag('div'); + $html .= html_writer::end_tag('tr'); } } } - $html .= html_writer::end_tag('div'); + $html .= html_writer::table($table); $html .= html_writer::end_tag('div'); From 678c4c6f1cb24a9be662176f6ec9dd3e469a988a Mon Sep 17 00:00:00 2001 From: Akbar Ahmadi Date: Sat, 21 Nov 2020 16:49:40 +0330 Subject: [PATCH 10/12] Add Persian langauge assests **not translated** MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR welcome ;))) [en] Unfortunately I do not have time to translate these files If you have the opportunity, please translate [fa[ متاسفانه من زمان برا ترجمه ندارم اگر فرصتش رو دارید لطفا ترجمه کنید و درخواست pull بدید --- lang/fa/adobeconnect.php | 173 +++++++++++++++++++ lang/fa/help/adobeconnect/assignroles.html | 48 +++++ lang/fa/help/adobeconnect/index.html | 7 + lang/fa/help/adobeconnect/meetingtype.html | 19 ++ lang/fa/help/adobeconnect/meeturl.html | 28 +++ lang/fa/help/adobeconnect/mods.html | 12 ++ lang/fa/help/adobeconnect/templatescoid.html | 4 + 7 files changed, 291 insertions(+) create mode 100644 lang/fa/adobeconnect.php create mode 100644 lang/fa/help/adobeconnect/assignroles.html create mode 100644 lang/fa/help/adobeconnect/index.html create mode 100644 lang/fa/help/adobeconnect/meetingtype.html create mode 100644 lang/fa/help/adobeconnect/meeturl.html create mode 100644 lang/fa/help/adobeconnect/mods.html create mode 100644 lang/fa/help/adobeconnect/templatescoid.html diff --git a/lang/fa/adobeconnect.php b/lang/fa/adobeconnect.php new file mode 100644 index 0000000..053571c --- /dev/null +++ b/lang/fa/adobeconnect.php @@ -0,0 +1,173 @@ +role role for $a->meetname ($a->groupname)'; +$string['assignroles'] = 'Assign roles'; +$string['availablelist'] = 'Available'; +$string['backtomeeting'] = 'Back to $a meeting'; +$string['cancelchanges'] = 'Cancel'; +$string['duplicatemeetingname'] = 'A duplicate meeting name was found on the server'; +$string['duplicateurl'] = 'A duplicate meeting URL was found on the server'; +$string['editingfor'] = 'Editing for: $a'; +$string['email_login'] = 'Email address login'; +$string['email_login_desc'] = 'Check this option only if your Connect Pro server login is set to use email address. Note that toggling this option on/off during regular usage of this activity module can potentially create duplicaed users on the Connect Pro server'; +$string['endtime'] = 'End time'; +$string['existingusers'] = '$a existing users'; +$string['groupswitch'] = 'Filter by group'; +$string['host'] = 'Host'; +$string['host_desc'] = 'Where REST calls get sent to'; +$string['joinmeeting'] = 'Join Meeting'; +$string['meethost_desc'] = 'Domain where the Adobe server is installed'; +$string['meetinghost'] = 'Meeting domain'; +$string['meetingend'] = 'Meeting end time'; +$string['meetinginfo'] = 'Meeting Info'; +$string['meetingintro'] = 'Meeting Summary'; +$string['meetinggroup'] = 'Meeting group'; +$string['meetingname'] = 'Meeting Name'; +$string['meetingstart'] = 'Meeting start time'; +$string['meetingtype'] = 'Meeting type'; +$string['modulename'] = 'Adobe Connect'; +$string['modulenameplural'] = 'Adobe Connect'; +$string['meettemplates'] = 'Meeting Templates'; +$string['meeturl'] = 'Meeting URL'; +$string['participantbtngrp'] = 'Participant Actions'; +$string['participantsgrp'] = 'Meeting Users'; +$string['particpantslabel'] = 'Participants'; +$string['potentialusers'] = '$a potential users'; +$string['port'] = 'Port'; +$string['port_desc'] = 'Port used to connect to Adobe Connect'; +$string['presenterbtngrp'] = 'Presenter Actions'; +$string['presenterlabel'] = 'Presenter'; +$string['recordinghdr'] = 'Meeting Recordings'; +$string['record_force'] = 'Force Meeting Recordings'; +$string['record_force_desc'] = 'Force all Adobe Connect meetings to be recorded. This is a site wide effect and the Adobe Connect server must be restarted'; +$string['removeparticipant'] = 'Remove'; +$string['removepresenter'] = 'Remove'; +$string['roletoassign'] = 'Role to assign'; +$string['samemeettime'] = 'Invalid Meeting time'; +$string['savechanges'] = 'Save'; +$string['selectparticipants'] = 'Assign roles'; +$string['starttime'] = 'Start time'; +$string['usergrouprequired'] = 'This Meeting requires users to be in a group in order to join'; +$string['testconnection'] = 'Test Connection'; +$string['connectiontesttitle'] = 'Connection test window'; +$string['conntestintro'] = '

A series of tests have been run in order to determine whether the Adobe Connect Pro server has been properly setup for this integration to work and to also determine whether the user credentials provided in the activity global settings has the correct permissions to perform the neccessary tasks required by the activity module. If any of the tests below have failed, this activity module will not function properly.

For further assistance and documentation in how to set up your Adobe Connect Pro server please consult the MoodleDocs help page for this activity module Help page

'; +$string['greaterstarttime'] = 'The start time cannot be greater than the end time'; +$string['invalidadobemeeturl'] = 'Invalid entry for this field. Click the help bubble for valid entries'; + +$string['adobeconnect:meetingpresenter'] = 'Meeting Presenter'; +$string['adobeconnect:meetingparticipant'] = 'Meeting Particpant'; +$string['adobeconnect:meetinghost'] = 'Meeting Host'; +$string['public'] = 'Public'; +$string['private'] = 'Private'; + +// Error codes +$string['emptyxml'] = 'Unable to connect to the Adobe Connect Pro server at this time. Please inform your Moodle administrator.'; +$string['adminemptyxml'] = 'Unable to connect to the Adobe Connect Pro server at this time. Click continue to proceed to the activity settings page and test the connection'; +$string['notsetupproperty'] = 'The activity module is not properly setup. Please contact your Moodle administrator'; +$string['adminnotsetupproperty'] = 'The activity module is not properly setup. Click continue to proceed to the activity settings page and test the connection'; +$string['notparticipant'] = 'You are not a participant for this meeting'; +$string['unableretrdetails'] = 'Unable to retrieve meeting details'; +$string['usernotenrolled'] = 'Only users enrolled and have a role in this course can join this meeting'; +$string['nopresenterrole'] = 'error: error finding adobeconnectpresenter role'; +$string['nomeeting'] = 'No meeting exists on the server'; +$string['noinstances'] = 'There are no instances of adobeconnect'; +$string['error1'] = 'You must be a site administrator to access this page'; +$string['error2'] = 'The property \'{$a}\' is empty, please input a value and save the settings'; +$string['errormeeting'] = 'Error retrieving recording'; +$string['settingblurb'] = '

+

Adobe Systems Inc. and Remote-Learner.net have partnered together to create the first publicly available + and officially sponsored, integration method between Moodle and Adobe Acrobat Connect Pro. This new + integration is designed to simplify the use of synchronous events within Moodle. It provides a + single-sign-on between the two systems with easy creation and management of Adobe Connect Pro + meetings.


+

About Remote-Learner
+ Remote-Learner has been providing educational technologies services since 1982 to its business, + educational and governmental clients. Today, these services include support for best-of-breed + open source programs. Remote-Learner is an official Moodle partner, JasperSoft partner and + Alfresco partner. The company offers SaaS hosting services, IT support contracts, custom + programming, workforce development training, instructional design and strategic consulting + services for organizations planning online learning programs.


+

Visit the Adobe Connect Moodle Plugins Directory for information on Enterprise support.

'; +$string['meeturl_help'] = '

You can customize the URL that is used to connect to the Adobe connect meeting. The Adobe Server domain will always remain the same. + However the last part of the URL can be customized. +

+

For example if the Adobe Connect server domain was located at http://adobe.connect.server/ + when customizing the URL to mymeeting, the URL to connect to the meeting would be http://adobe.connect.server/mymeeting. Leave out the trailing forward slash +

+

Valid URL entries consists of the name with +

    +
  • mymeeting
  • +
  • /mymeeting
  • +
+ +Invalid URL entries consist of more than one forward slash: +
    +
  • mymeeting/mymeeting
  • +
  • mymeeting/mymeeting/
  • +
  • mymeeting/mymeeting//anothermeeting
  • +
  • mymeeting/
  • +
+ +

+

Once the meeting has been saved, you will no longer be able to edit/update this field as the field will be disabled. +If updating the activity settings and if Groups Mode is set to no group then you will see part of the URL in the text field. +Otherwise the text field will remain blank as each course group will have their own meeting URL. +

'; +$string['meetingtype_help'] = '

A public meeting type is one where anyone who has the URL for the meeting can enter the room.

+

A private meeting type is one where only registered users and participants can enter. The login page does not allow +guests to log in. With private meetings the meeting does not actually start until the meeting Presenter or Host joins the meeting.

+ +

+If you are creating a private meeting it is always good practice to assign at +least 1 host or presenter who will be present in the meeting; because users with +the participant role will be unable to join the meeting unless a user with the +host or presenter roles has already joined th meeting. +

+ +

+If the meeting has support for separate groups at least 1 user in each group, who is +to be present in the meeting, should have either the host or presenter role. +

'; +$string['meettemplates_help'] = '

A meeting room template creates meeting with a custom layout for the meeting room.

'; +$string['pluginadministration'] = 'Adobe Connect Administration'; +$string['pluginname'] = 'Adobe Connect'; +$string['modulename'] = 'Adobe Connect'; +$string['recordinghdr'] = 'Recordings'; +$string['https'] = 'HTTPS Connection'; +$string['https_desc'] = 'Connect to the Connect server via HTTPS'; +$string['invalidurl'] = 'The URL needs to start with a letter (a-z)'; +$string['longurl'] = 'That meeting URL is too long. Try shortening it'; +$string['errorrecording'] = 'Unable to find recording session'; +$string['meetinfo'] = 'More Meeting Detail'; +$string['meetinfotxt'] = 'See server meeting details'; +$string['missingexpectedgroups'] = 'There are no groups available.'; +$string['event_view'] = 'Viewed activity'; +$string['event_view_all'] = 'Viewed all instances of the activity'; +$string['event_join_meeting'] = 'User joined a meeting'; +$string['event_view_recording'] = 'User viewed a recording'; +$string['event_assign_role'] = 'User assigned a Connect Pro role'; +$string['event_unassign_role'] = 'User unassigned a Connect Pro role'; +$string['startdate'] = 'شروع'; +$string['enddate'] = 'پایان'; +$string['duration'] = 'مدت زمان'; \ No newline at end of file diff --git a/lang/fa/help/adobeconnect/assignroles.html b/lang/fa/help/adobeconnect/assignroles.html new file mode 100644 index 0000000..f43ab5a --- /dev/null +++ b/lang/fa/help/adobeconnect/assignroles.html @@ -0,0 +1,48 @@ +

Assigning Roles

+ +

+When assigning roles to a private meeting it is always good practice to assign at +least 1 host or presenter who will be present in the meeting; because users with +the participant role will be unable to join the meeting unless a user with the +host or presenter roles has already joined th meeting. +

+ +

+If the meeting has support for separate groups at least 1 user in each group, who is +to be present in the meeting, should have either the host or presenter role. +

+ +

+By assigning a role to a user in a context, you +are granting them the permissions contained +in that role, for the current context and all +"lower" contexts. +

+ +

+Contexts: +

+
    +
  1. System (the entire installation)
  2. +
  3. Front page (the "site course")
  4. +
  5. Course Categories
  6. +
  7. Course Sub-categories
  8. +
  9. Courses
  10. +
  11. Blocks and Activities
  12. +
+ +

+So for example, if you grant a Student role to a +user in a Course, they will have that role for +the course, but also all Blocks and Activities inside +that course. Their actual permissions may depend on +other roles and overrides that have been defined. +

+ +

+See also +Roles, +Contexts, +Permissions and +Overrides. +

diff --git a/lang/fa/help/adobeconnect/index.html b/lang/fa/help/adobeconnect/index.html new file mode 100644 index 0000000..61f3252 --- /dev/null +++ b/lang/fa/help/adobeconnect/index.html @@ -0,0 +1,7 @@ +

Adobe Connect

+ diff --git a/lang/fa/help/adobeconnect/meetingtype.html b/lang/fa/help/adobeconnect/meetingtype.html new file mode 100644 index 0000000..fd381ef --- /dev/null +++ b/lang/fa/help/adobeconnect/meetingtype.html @@ -0,0 +1,19 @@ +

 Meeting Type

+
+

A public meeting type is one where anyone who has the URL for the meeting can enter the room.

+

A private meeting type is one where only registered users and participants can enter. The login page does not allow +guests to log in. With private meetings the meeting does not actually start until the meeting Presenter or Host joins the meeting.

+ +

+If you are creating a private meeting it is always good practice to assign at +least 1 host or presenter who will be present in the meeting; because users with +the participant role will be unable to join the meeting unless a user with the +host or presenter roles has already joined th meeting. +

+ +

+If the meeting has support for separate groups at least 1 user in each group, who is +to be present in the meeting, should have either the host or presenter role. +

+ +
diff --git a/lang/fa/help/adobeconnect/meeturl.html b/lang/fa/help/adobeconnect/meeturl.html new file mode 100644 index 0000000..bd78d75 --- /dev/null +++ b/lang/fa/help/adobeconnect/meeturl.html @@ -0,0 +1,28 @@ +

 Meeting URL

+
+

You can customize the URL that is used to connect to the Adobe connect meeting. The Adobe Server domain will always remain the same. + However the last part of the URL can be customized. +

+

For example if the Adobe Connect server domain was located at http://adobe.connect.server/ + when customizing the URL to mymeeting, the URL to connect to the meeting would be http://adobe.connect.server/mymeeting. Leave out the trailing forward slash +

+

Valid URL entries consists of the name with +

    +
  • mymeeting
  • +
  • /mymeeting
  • +
+ +Invalid URL entries consist of more than one forward slash: +
    +
  • mymeeting/mymeeting
  • +
  • mymeeting/mymeeting/
  • +
  • mymeeting/mymeeting//anothermeeting
  • +
  • mymeeting/
  • +
+ +

+

Once the meeting has been saved, you will no longer be able to edit/update this field as the field will be disabled. +If updating the activity settings and if Groups Mode is set to no group then you will see part of the URL in the text field. +Otherwise the text field will remain blank as each course group will have their own meeting URL. +

+
diff --git a/lang/fa/help/adobeconnect/mods.html b/lang/fa/help/adobeconnect/mods.html new file mode 100644 index 0000000..b0e0a81 --- /dev/null +++ b/lang/fa/help/adobeconnect/mods.html @@ -0,0 +1,12 @@ +

 Adobe Connect

+
+

The Adobe Connect Pro activity module provides the officially sponsored integration +method between Moodle and Adobe Connect Pro. It was developed in conjunction with the Remote-Learner +development team and Adobe Inc. It is designed to simplify the use of synchronous events within Moodle. +It provides a single sign on between the two systems with easy event creation and management.

+ +

+Please see the Adobe Connect Pro Module page for more +details on this project. +

+
diff --git a/lang/fa/help/adobeconnect/templatescoid.html b/lang/fa/help/adobeconnect/templatescoid.html new file mode 100644 index 0000000..d2d39ca --- /dev/null +++ b/lang/fa/help/adobeconnect/templatescoid.html @@ -0,0 +1,4 @@ +

 Meeting Template

+
+

A meeting room template creates meeting with a custom layout for the meeting room.

+
From 6969e05e6282d510036a170bc78d8bd199552c12 Mon Sep 17 00:00:00 2001 From: Akbar Ahmadi Date: Sat, 21 Nov 2020 16:52:32 +0330 Subject: [PATCH 11/12] bump version 3.9.0.0 --- version.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.php b/version.php index 6e8af2a..9f8f020 100644 --- a/version.php +++ b/version.php @@ -21,9 +21,9 @@ * @copyright (C) 2015 Remote Learner.net Inc http://www.remote-learner.net */ -$plugin->version = 2020061501; -$plugin->requires = 2020061501; +$plugin->version = 2020112116; +$plugin->requires = 2020112116; $plugin->cron = 0; $plugin->component = 'mod_adobeconnect'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = '3.8.0.0'; +$plugin->release = '3.9.0.0'; From 32c3a1ed0696e57d97e62a8fd93eee72323409f2 Mon Sep 17 00:00:00 2001 From: sparse91 <26763315+sparse91@users.noreply.github.com> Date: Sat, 2 Jan 2021 14:19:37 +0330 Subject: [PATCH 12/12] Play recording with html5 player by default Due to adobe flash deprecation. --- joinrecording.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joinrecording.php b/joinrecording.php index bb48f45..473d3f1 100644 --- a/joinrecording.php +++ b/joinrecording.php @@ -150,4 +150,4 @@ $adobesession = $aconnect->get_cookie(); redirect($protocol . $CFG->adobeconnect_meethost . $port - . $recording->url . '?session=' . $aconnect->get_cookie()); + . $recording->url . '?session=' . $aconnect->get_cookie() . '&html-view=true');