Skip to content
Snippets Groups Projects
Commit 8df6df72 authored by DFNVC's avatar DFNVC
Browse files

Verbesserungen und Bug-Fixes im Bereich Aufzeichnungen:

Meetings können nicht mehr versehentlich gelöscht werden,
falls noch Aufzeichnungen enthalten sind.
Neue Veranstalter-Löschfunktion für Aufzeichungen.
Eine Adobe-Connect-Aktivität kann nicht mehr erzeugt werden,
wenn die angegebene Meeting-URL bereits existiert.
parent 0c2420a7
Branches
No related tags found
No related merge requests found
<?php
require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once(dirname(__FILE__).'/locallib.php');
require_once(dirname(__FILE__).'/connect_class.php');
require_once(dirname(__FILE__).'/connect_class_dom.php');
$id = required_param('id', PARAM_INT);
$recordingscoid = required_param('recording', PARAM_INT);
global $CFG, $USER, $DB, $PAGE, $OUTPUT;
// Do the usual Moodle setup
if (! $cm = get_coursemodule_from_id('adobeconnect', $id)) {
error('Course Module ID was incorrect');
}
$cond = array('id' => $cm->course);
if (! $course = $DB->get_record('course', $cond)) {
error('Course is misconfigured');
}
$cond = array('id' => $cm->instance);
if (! $adobeconnect = $DB->get_record('adobeconnect', $cond)) {
error('Course module is incorrect');
}
require_login($course, true, $cm);
$context = context_module::instance($id);
$user_is_host = has_capability('mod/adobeconnect:meetinghost', $context);
if ($user_is_host) {
$aconnect = aconnect_login();
aconnect_remove_meeting($aconnect, $recordingscoid);
}
redirect('https://moodle.vc.dfn.de/mod/adobeconnect/view.php?id=' . $id);
\ No newline at end of file
......@@ -52,7 +52,7 @@ if (! $adobeconnects = get_all_instances_in_course('adobeconnect', $course)) {
$usesections = course_format_uses_sections($course->format);
if ($usesections) {
$sections = get_all_sections($course->id);
// $sections = get_all_sections($course->id);
}
$table = new html_table();
......@@ -88,4 +88,5 @@ foreach ($adobeconnects as $adobeconnect) {
echo html_writer::table($table);
echo $OUTPUT->footer();
\ No newline at end of file
......@@ -61,6 +61,7 @@ $string['presenterlabel'] = 'Moderator';
$string['recordinghdr'] = 'Meeting-Aufzeichnung';
$string['record_force'] = 'Meeting-Aufzeichnung erzwingen';
$string['record_force_desc'] = 'Alle Meetings aufzeichnen. Dies ist eine Einstellung für den gesamten Adobe Connect Server. Der Server muss dazu neu gestartet werden. ';
$string['record_play'] = 'Aufzeichung abspielen';
$string['record_convert'] = 'Konvertieren';
$string['record_convert_help'] = 'Hilfe: Konvertieren von Aufzeichnungen';
$string['convert_recording_help'] = '<h2>Konvertierung von Adobe Connect Aufzeichnungen</h2>
......@@ -74,6 +75,9 @@ Adobe Connect Host zugewiesen werden.
Die Konvertierungsdauer entspricht immer der Länge der Aufzeichnung, da ein Download<br>
der Original-Aufzeichnungen unter Adobe Connect nicht möglich ist.
</p>';
$string['record_delete'] = 'Aufzeichnung löschen';
$string['confirm_record_delete'] = 'Wollen Sie die Aufzeichnung "{$a}" wirklich löschen ?';
$string['recording_error'] = 'Das Meeting kann nicht gelöscht werden, da es noch Aufzeichnungen enthält !';
$string['removeparticipant'] = 'Entfernen';
$string['removepresenter'] = 'Entfernen';
......@@ -123,14 +127,15 @@ $string['error2'] = 'Die Eigenschaft \'{$a}\' is leer. Geben Sie bitte einen Wer
$string['settingblurb'] = '<p>Dieses Plugin wurde durch den DFN-Verein für den DFNVC Webkonferenz-Dienst modifiziert.<br>
Es wurde ursprünglich von Remote-Learner und Adobe entwickelt.</p>';
$string['meeturl_help'] = '<p>Sie können die für den Aufbau der Verbidnung zum Meetingraum verwendete URL anpassen.
Der Domain-Teil bleibt immer die gleiche (webconf.vc.dfn.de). Nur der Teil nach der Domain kann geändert werden.</p>
$string['meeturl_help'] = '<p>Sie können die für den Aufbau der Verbidnung zum Meetingraum verwendete URL anpassen.<br>
Der Domain-Teil bleibt immer die gleiche (webconf.vc.dfn.de). Nur der Teil nach der Domain kann geändert werden.
</p>
<p>
Erlaubt sind nur alphanumerische ASCII-Zeichen und Bindestriche.
</p>
<p>Beispiele für korrekte URL-Einträge:
<ul><li>meinmeeting</li><li>/meinmeeting</li></ul>
Nicht korrekte URL-Einträge:
<ul><li>meinmeeting/meinmeeting</li><li>/meinmeeting/meinmeeting/</li><li>meinmeeting/</li></ul>
<ul><li>meinmeeting</li><li>mein-meeting</li></ul>
</p>
<p>Wenn ein Meeting gespeichert wurde, ist es nicht mehr möglich dieses Feld zu ändern. Das Feld wird deaktiviert.
......
......@@ -62,6 +62,7 @@ $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['record_play'] = 'Play recording';
$string['record_convert'] = 'Convert';
$string['record_convert_help'] = 'Help: Converting Recordings';
$string['convert_recording_help'] = '<h2>Converting Adobe Connect Recordings</h2>
......@@ -75,6 +76,9 @@ the Adobe Connect Host role.<br>
The conversion duration eqates to the length of the recording becaus it is<br>
not possible to download the original Adobe Connect recording in advance.
</p>';
$string['record_delete'] = 'Delete recording';
$string['confirm_record_delete'] = 'Do you really want to delete the recroding {$a}?';
$string['recording_error'] = 'The meeting cannot be deleted because it still contains recordings!';
$string['removeparticipant'] = 'Remove';
$string['removepresenter'] = 'Remove';
......@@ -125,24 +129,15 @@ $string['settingblurb'] = 'Plugin modified by DFN-Verein.
single-sign-on between the two systems with easy creation and management of Adobe Connect Pro
meetings.</p>';
$string['meeturl_help'] = '<p>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.
</p>
<p>For example if the Adobe Connect server domain was located at <b>http://adobe.connect.server/</b>
when customizing the URL to <b>mymeeting</b>, the URL to connect to the meeting would be <b>http://adobe.connect.server/mymeeting</b>. Leave out the trailing forward slash
$string['meeturl_help'] = '<p>You can customize the URL that is used to connect to the Adobe connect meeting. The Adobe Server domain will always remain the same.<br>
However the last part of the URL can be customized.</p>
<p>Only alphanumeric characters and hyphen are allowed.
</p>
<p>Valid URL entries consists of the name with
<ul>
<li>mymeeting</li>
<li>/mymeeting</li>
</ul>
Invalid URL entries consist of more than one forward slash:
<ul>
<li>mymeeting/mymeeting</li>
<li>mymeeting/mymeeting/</li>
<li>mymeeting/mymeeting//anothermeeting</li>
<li>mymeeting/</li>
<li>my-meeting</li>
</ul>
</p>
......
......@@ -417,14 +417,20 @@ function adobeconnect_delete_instance($id) {
return false;
}
$result = true;
// Remove meeting from Adobe connect server
$param = array('instanceid' => $adobeconnect->id);
$adbmeetings = $DB->get_records('adobeconnect_meeting_groups', $param);
$meetingscoid = $DB->get_field('adobeconnect_meeting_groups', 'meetingscoid',$param);
if (!empty($adbmeetings)) {
$aconnect = aconnect_login();
if (aconnect_get_recordings($aconnect, $meetingscoid, $meetingscoid)) {
$delerror = get_string('recording_error','adobeconnect');
print_error($delerror,' ');
aconnect_logout($aconnect);
return false;
}
$result = true;
if (!empty($adbmeetings)) {
foreach ($adbmeetings as $meeting) {
// Update calendar event
$param = array('courseid' => $adobeconnect->course, 'instance' => $adobeconnect->id,
......@@ -441,10 +447,8 @@ function adobeconnect_delete_instance($id) {
aconnect_logout($aconnect);
}
$param = array('id' => $adobeconnect->id);
$result &= $DB->delete_records('adobeconnect', $param);
$param = array('instanceid' => $adobeconnect->id);
$result &= $DB->delete_records('adobeconnect_meeting_groups', $param);
......
......@@ -208,6 +208,7 @@ function adobe_connection_test($host = '', $port = 80, $username = '',
echo '<p style="color:#680000">XML response:<br />'. htmlspecialchars($aconnectDOM->_xmlresponse). '</p>';
}
//
// Test creating a user
// DFNVC
//
......
......@@ -137,6 +137,8 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
$namematches = array();
}
// Now search for existing meeting room URLs
$url = $data['meeturl'];
$url = $data['meeturl'] = adobeconnect_clean_meet_url($data['meeturl']);
......@@ -147,8 +149,13 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
$errors['meeturl'] = get_string('invalidadobemeeturl', 'adobeconnect');
}
$filter = array('filter-like-url-path' => $url);
# $filter = array('filter-like-url-path' => $url);
# DFNVC ERROR !!
#
$filter = array('filter-url-path' => "/$url/");
$urlmatches = aconnect_meeting_exists($aconnect, $meetfldscoid, $filter);
#$errors['meeturl'] = 'urlmatches:';
if (empty($urlmatches)) {
$urlmatches = array();
......@@ -196,7 +203,7 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
foreach($urlmatches as $matchkey => $match) {
$matchurl = rtrim($match->url, '/');
if (0 == substr_compare($matchurl, $url . '_', 0, strlen($url . '_'), false)) {
if ($matchurl == $url) {
$errors['meeturl'] = get_string('duplicateurl', 'adobeconnect');
}
}
......
......@@ -112,7 +112,7 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
$url = $CFG->wwwroot . '/mod/adobeconnect/joinrecording.php?id=' . $cmid . '&recording='. $recording_scoid . '&groupid='. $groupid . '&sesskey=' . $USER->sesskey;
// recording name
$name = '<img src="' . $CFG->wwwroot .'/pix/e/insert_edit_video.svg"/>&nbsp;&nbsp;';
$name .= html_writer::link($url, format_string($recording->name), array('target' => '_blank','title'=>'Play Recording'));
$name .= html_writer::link($url, format_string($recording->name), array('target' => '_blank','title'=>get_string('record_play','adobeconnect')));
// start date
$startdate = format_string($recording->startdate);
$time = strtotime($startdate);
......@@ -126,10 +126,18 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
// Moodle users with role meeting host can convert recordings on their local Windows PCs
$action = '';
if ($user_is_host) {
// Konvertieren
$converturl = $url . '&convert=true';
$param = array('target' => '_blank','title'=>get_string('record_convert','adobeconnect'));
$action = html_writer::link($converturl,get_string('record_convert','adobeconnect'),$param);
array_push($row, $action);
// Löschen
$delurl = "/mod/adobeconnect/delrecording.php?id=$cmid&recording=$recording_scoid";
$a = $recording->name;
$confirmdel = get_string('confirm_record_delete','adobeconnect',$a);
$param = array('onclick' => "return confirm('$confirmdel')", 'title'=>get_string('record_delete','adobeconnect'));
$del = html_writer::link($CFG->wwwroot . $delurl, '<img alt="' . get_string('record_delete','adobeconnect') . '" src="' . $CFG->wwwroot .'/pix/t/delete.svg" />', $param);
array_push($row, $del);
// Help
$param = array('target' => '_blank','title'=>get_string('record_convert_help','adobeconnect'));
$help = html_writer::link($CFG->wwwroot . "/help.php?component=adobeconnect&identifier=convert_recording&lang=$COURSE->lang", '<img alt="' . get_string('record_convert_help','adobeconnect') . '" src="' . $CFG->wwwroot .'/pix/help.svg" />', $param);
......
......@@ -7,7 +7,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$plugin->version = 2016011800; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2018020800; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2014051212; // Requires this Moodle version
$plugin->component = 'mod_adobeconnect';
$plugin->cron = 0; // Period for cron to check this module (secs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment