Commit f99d4cbd96b3bdac4b9a44929b09efc805d0cfbd

Authored by DFNVC
1 parent 47a843b62a

Revert "Verbesserungen und Bug-Fixes im Bereich Aufzeichnungen:"

This reverts commit 47a843b62af988ae31958b096aacc86985fb7e4f.

Showing 9 changed files with 39 additions and 96 deletions Side-by-side Diff

delrecording.php
... ... @@ -1,36 +0,0 @@
1   -<?php
2   -
3   -require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
4   -require_once(dirname(__FILE__).'/locallib.php');
5   -require_once(dirname(__FILE__).'/connect_class.php');
6   -require_once(dirname(__FILE__).'/connect_class_dom.php');
7   -
8   -$id = required_param('id', PARAM_INT);
9   -$recordingscoid = required_param('recording', PARAM_INT);
10   -
11   -global $CFG, $USER, $DB, $PAGE, $OUTPUT;
12   -
13   -// Do the usual Moodle setup
14   -if (! $cm = get_coursemodule_from_id('adobeconnect', $id)) {
15   - error('Course Module ID was incorrect');
16   -}
17   -$cond = array('id' => $cm->course);
18   -if (! $course = $DB->get_record('course', $cond)) {
19   - error('Course is misconfigured');
20   -}
21   -
22   -$cond = array('id' => $cm->instance);
23   -if (! $adobeconnect = $DB->get_record('adobeconnect', $cond)) {
24   - error('Course module is incorrect');
25   -}
26   -require_login($course, true, $cm);
27   -
28   -$context = context_module::instance($id);
29   -$user_is_host = has_capability('mod/adobeconnect:meetinghost', $context);
30   -
31   -if ($user_is_host) {
32   - $aconnect = aconnect_login();
33   - aconnect_remove_meeting($aconnect, $recordingscoid);
34   -}
35   -
36   -redirect('https://moodle.vc.dfn.de/mod/adobeconnect/view.php?id=' . $id);
37 0 \ No newline at end of file
... ... @@ -52,7 +52,7 @@ if (! $adobeconnects = get_all_instances_in_course(&#39;adobeconnect&#39;, $course)) {
52 52  
53 53 $usesections = course_format_uses_sections($course->format);
54 54 if ($usesections) {
55   -// $sections = get_all_sections($course->id);
  55 + $sections = get_all_sections($course->id);
56 56 }
57 57  
58 58 $table = new html_table();
... ... @@ -88,5 +88,4 @@ foreach ($adobeconnects as $adobeconnect) {
88 88  
89 89 echo html_writer::table($table);
90 90  
91   -
92 91 echo $OUTPUT->footer();
93 92 \ No newline at end of file
lang/de/adobeconnect.php
... ... @@ -61,7 +61,6 @@ $string[&#39;presenterlabel&#39;] = &#39;Moderator&#39;;
61 61 $string['recordinghdr'] = 'Meeting-Aufzeichnung';
62 62 $string['record_force'] = 'Meeting-Aufzeichnung erzwingen';
63 63 $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. ';
64   -$string['record_play'] = 'Aufzeichung abspielen';
65 64 $string['record_convert'] = 'Konvertieren';
66 65 $string['record_convert_help'] = 'Hilfe: Konvertieren von Aufzeichnungen';
67 66 $string['convert_recording_help'] = '<h2>Konvertierung von Adobe Connect Aufzeichnungen</h2>
... ... @@ -75,9 +74,6 @@ Adobe Connect Host zugewiesen werden.
75 74 Die Konvertierungsdauer entspricht immer der Länge der Aufzeichnung, da ein Download<br>
76 75 der Original-Aufzeichnungen unter Adobe Connect nicht möglich ist.
77 76 </p>';
78   -$string['record_delete'] = 'Aufzeichnung löschen';
79   -$string['confirm_record_delete'] = 'Wollen Sie die Aufzeichnung "{$a}" wirklich löschen ?';
80   -$string['recording_error'] = 'Das Meeting kann nicht gelöscht werden, da es noch Aufzeichnungen enthält !';
81 77  
82 78 $string['removeparticipant'] = 'Entfernen';
83 79 $string['removepresenter'] = 'Entfernen';
... ... @@ -127,15 +123,14 @@ $string[&#39;error2&#39;] = &#39;Die Eigenschaft \&#39;{$a}\&#39; is leer. Geben Sie bitte einen Wer
127 123 $string['settingblurb'] = '<p>Dieses Plugin wurde durch den DFN-Verein für den DFNVC Webkonferenz-Dienst modifiziert.<br>
128 124 Es wurde ursprünglich von Remote-Learner und Adobe entwickelt.</p>';
129 125  
130   -$string['meeturl_help'] = '<p>Sie können die für den Aufbau der Verbidnung zum Meetingraum verwendete URL anpassen.<br>
131   -Der Domain-Teil bleibt immer die gleiche (webconf.vc.dfn.de). Nur der Teil nach der Domain kann geändert werden.
132   -</p>
133   -<p>
134   -Erlaubt sind nur alphanumerische ASCII-Zeichen und Bindestriche.
135   -</p>
  126 +$string['meeturl_help'] = '<p>Sie können die für den Aufbau der Verbidnung zum Meetingraum verwendete URL anpassen.
  127 +Der Domain-Teil bleibt immer die gleiche (webconf.vc.dfn.de). Nur der Teil nach der Domain kann geändert werden.</p>
136 128  
137 129 <p>Beispiele für korrekte URL-Einträge:
138   -<ul><li>meinmeeting</li><li>mein-meeting</li></ul>
  130 +<ul><li>meinmeeting</li><li>/meinmeeting</li></ul>
  131 +
  132 +Nicht korrekte URL-Einträge:
  133 +<ul><li>meinmeeting/meinmeeting</li><li>/meinmeeting/meinmeeting/</li><li>meinmeeting/</li></ul>
139 134 </p>
140 135  
141 136 <p>Wenn ein Meeting gespeichert wurde, ist es nicht mehr möglich dieses Feld zu ändern. Das Feld wird deaktiviert.
lang/en/adobeconnect.php
... ... @@ -62,7 +62,6 @@ $string[&#39;presenterlabel&#39;] = &#39;Presenter&#39;;
62 62 $string['recordinghdr'] = 'Meeting Recordings';
63 63 $string['record_force'] = 'Force Meeting Recordings';
64 64 $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';
65   -$string['record_play'] = 'Play recording';
66 65 $string['record_convert'] = 'Convert';
67 66 $string['record_convert_help'] = 'Help: Converting Recordings';
68 67 $string['convert_recording_help'] = '<h2>Converting Adobe Connect Recordings</h2>
... ... @@ -76,9 +75,6 @@ the Adobe Connect Host role.&lt;br&gt;
76 75 The conversion duration eqates to the length of the recording becaus it is<br>
77 76 not possible to download the original Adobe Connect recording in advance.
78 77 </p>';
79   -$string['record_delete'] = 'Delete recording';
80   -$string['confirm_record_delete'] = 'Do you really want to delete the recroding {$a}?';
81   -$string['recording_error'] = 'The meeting cannot be deleted because it still contains recordings!';
82 78  
83 79 $string['removeparticipant'] = 'Remove';
84 80 $string['removepresenter'] = 'Remove';
... ... @@ -129,15 +125,24 @@ $string[&#39;settingblurb&#39;] = &#39;Plugin modified by DFN-Verein.
129 125 single-sign-on between the two systems with easy creation and management of Adobe Connect Pro
130 126 meetings.</p>';
131 127  
132   -$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>
133   -However the last part of the URL can be customized.</p>
134   -<p>Only alphanumeric characters and hyphen are allowed.
  128 +$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.
  129 + However the last part of the URL can be customized.
  130 +</p>
  131 +<p>For example if the Adobe Connect server domain was located at <b>http://adobe.connect.server/</b>
  132 + 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
135 133 </p>
136   -
137 134 <p>Valid URL entries consists of the name with
138 135 <ul>
139 136 <li>mymeeting</li>
140   -<li>my-meeting</li>
  137 +<li>/mymeeting</li>
  138 +</ul>
  139 +
  140 +Invalid URL entries consist of more than one forward slash:
  141 +<ul>
  142 +<li>mymeeting/mymeeting</li>
  143 +<li>mymeeting/mymeeting/</li>
  144 +<li>mymeeting/mymeeting//anothermeeting</li>
  145 +<li>mymeeting/</li>
141 146 </ul>
142 147  
143 148 </p>
... ... @@ -411,26 +411,20 @@ function adobeconnect_update_instance($adobeconnect) {
411 411 */
412 412 function adobeconnect_delete_instance($id) {
413 413 global $DB;
414   -
  414 +
415 415 $param = array('id' => $id);
416 416 if (! $adobeconnect = $DB->get_record('adobeconnect', $param)) {
417 417 return false;
418 418 }
419 419  
  420 + $result = true;
  421 +
  422 + // Remove meeting from Adobe connect server
420 423 $param = array('instanceid' => $adobeconnect->id);
421 424 $adbmeetings = $DB->get_records('adobeconnect_meeting_groups', $param);
422   - $meetingscoid = $DB->get_field('adobeconnect_meeting_groups', 'meetingscoid',$param);
423 425  
424   - $aconnect = aconnect_login();
425   - if (aconnect_get_recordings($aconnect, $meetingscoid, $meetingscoid)) {
426   - $delerror = get_string('recording_error','adobeconnect');
427   - print_error($delerror,' ');
428   - aconnect_logout($aconnect);
429   - return false;
430   - }
431   -
432   - $result = true;
433 426 if (!empty($adbmeetings)) {
  427 + $aconnect = aconnect_login();
434 428 foreach ($adbmeetings as $meeting) {
435 429 // Update calendar event
436 430 $param = array('courseid' => $adobeconnect->course, 'instance' => $adobeconnect->id,
... ... @@ -447,8 +441,10 @@ function adobeconnect_delete_instance($id) {
447 441  
448 442 aconnect_logout($aconnect);
449 443 }
  444 +
450 445 $param = array('id' => $adobeconnect->id);
451 446 $result &= $DB->delete_records('adobeconnect', $param);
  447 +
452 448 $param = array('instanceid' => $adobeconnect->id);
453 449 $result &= $DB->delete_records('adobeconnect_meeting_groups', $param);
454 450  
... ... @@ -208,11 +208,10 @@ function adobe_connection_test($host = &#39;&#39;, $port = 80, $username = &#39;&#39;,
208 208 echo '<p style="color:#680000">XML response:<br />'. htmlspecialchars($aconnectDOM->_xmlresponse). '</p>';
209 209 }
210 210  
211   - //
212 211 // Test creating a user
213 212 // DFNVC
214 213 //
215   - echo '<p><b>Test creating a user:</b></p>';
  214 + echo '<p><b>Test creating a user:</b></p>';
216 215 $user = new stdClass();
217 216 $res = preg_split('/@/',$username);
218 217 $apiuserdomain = $res[1];
... ... @@ -124,12 +124,12 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
124 124  
125 125 // Search for a Meeting with the same starting name. It will cause a duplicate
126 126 // meeting name (and error) when the user begins to add participants to the meeting
127   - // DFNVC
128   - //
129   - // $meetfldscoid = aconnect_get_folder($aconnect, 'meetings');
130   - $meetfldscoid = aconnect_get_meeting_folder($aconnect);
131   - //
132   - //
  127 + // DFNVC
  128 + //
  129 + // $meetfldscoid = aconnect_get_folder($aconnect, 'meetings');
  130 + $meetfldscoid = aconnect_get_meeting_folder($aconnect);
  131 + //
  132 + //
133 133 $filter = array('filter-like-name' => $data['name']);
134 134 $namematches = aconnect_meeting_exists($aconnect, $meetfldscoid, $filter);
135 135  
... ... @@ -137,8 +137,6 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
137 137 $namematches = array();
138 138 }
139 139  
140   -
141   -
142 140 // Now search for existing meeting room URLs
143 141 $url = $data['meeturl'];
144 142 $url = $data['meeturl'] = adobeconnect_clean_meet_url($data['meeturl']);
... ... @@ -149,14 +147,9 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
149 147 $errors['meeturl'] = get_string('invalidadobemeeturl', 'adobeconnect');
150 148 }
151 149  
152   -# $filter = array('filter-like-url-path' => $url);
153   -# DFNVC ERROR !!
154   -#
155   - $filter = array('filter-url-path' => "/$url/");
  150 + $filter = array('filter-like-url-path' => $url);
156 151 $urlmatches = aconnect_meeting_exists($aconnect, $meetfldscoid, $filter);
157   - #$errors['meeturl'] = 'urlmatches:';
158 152  
159   -
160 153 if (empty($urlmatches)) {
161 154 $urlmatches = array();
162 155 } else {
... ... @@ -203,7 +196,7 @@ class mod_adobeconnect_mod_form extends moodleform_mod {
203 196  
204 197 foreach($urlmatches as $matchkey => $match) {
205 198 $matchurl = rtrim($match->url, '/');
206   - if ($matchurl == $url) {
  199 + if (0 == substr_compare($matchurl, $url . '_', 0, strlen($url . '_'), false)) {
207 200 $errors['meeturl'] = get_string('duplicateurl', 'adobeconnect');
208 201 }
209 202 }
... ... @@ -112,7 +112,7 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
112 112 $url = $CFG->wwwroot . '/mod/adobeconnect/joinrecording.php?id=' . $cmid . '&recording='. $recording_scoid . '&groupid='. $groupid . '&sesskey=' . $USER->sesskey;
113 113 // recording name
114 114 $name = '<img src="' . $CFG->wwwroot .'/pix/e/insert_edit_video.svg"/>&nbsp;&nbsp;';
115   - $name .= html_writer::link($url, format_string($recording->name), array('target' => '_blank','title'=>get_string('record_play','adobeconnect')));
  115 + $name .= html_writer::link($url, format_string($recording->name), array('target' => '_blank','title'=>'Play Recording'));
116 116 // start date
117 117 $startdate = format_string($recording->startdate);
118 118 $time = strtotime($startdate);
... ... @@ -126,18 +126,10 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
126 126 // Moodle users with role meeting host can convert recordings on their local Windows PCs
127 127 $action = '';
128 128 if ($user_is_host) {
129   - // Konvertieren
130 129 $converturl = $url . '&convert=true';
131 130 $param = array('target' => '_blank','title'=>get_string('record_convert','adobeconnect'));
132 131 $action = html_writer::link($converturl,get_string('record_convert','adobeconnect'),$param);
133 132 array_push($row, $action);
134   - // Löschen
135   - $delurl = "/mod/adobeconnect/delrecording.php?id=$cmid&recording=$recording_scoid";
136   - $a = $recording->name;
137   - $confirmdel = get_string('confirm_record_delete','adobeconnect',$a);
138   - $param = array('onclick' => "return confirm('$confirmdel')", 'title'=>get_string('record_delete','adobeconnect'));
139   - $del = html_writer::link($CFG->wwwroot . $delurl, '<img alt="' . get_string('record_delete','adobeconnect') . '" src="' . $CFG->wwwroot .'/pix/t/delete.svg" />', $param);
140   - array_push($row, $del);
141 133 // Help
142 134 $param = array('target' => '_blank','title'=>get_string('record_convert_help','adobeconnect'));
143 135 $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 @@
7 7 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
8 8 */
9 9  
10   -$plugin->version = 2018020800; // The current module version (Date: YYYYMMDDXX)
  10 +$plugin->version = 2016011800; // The current module version (Date: YYYYMMDDXX)
11 11 $plugin->requires = 2014051212; // Requires this Moodle version
12 12 $plugin->component = 'mod_adobeconnect';
13 13 $plugin->cron = 0; // Period for cron to check this module (secs)