Commit 4b39424ef869c41da93d19b3b2937a662e87a4af

Authored by DFNVC
1 parent ede2e6bba9
Exists in master

Aufzeichungen: Direkter Link in den Bearbeitungsmodus.

Veraltete Funktion notify() durch $OUTPUT->notification() ersetzt.

Showing 5 changed files with 30 additions and 31 deletions Side-by-side Diff

... ... @@ -17,7 +17,7 @@ $groupid = required_param('groupid', PARAM_INT);
17 17 $sesskey = required_param('sesskey', PARAM_ALPHANUM);
18 18  
19 19  
20   -global $CFG, $USER, $DB;
  20 +global $CFG, $USER, $DB, $OUTPUT;
21 21  
22 22 if (! $cm = get_coursemodule_from_id('adobeconnect', $id)) {
23 23 error('Course Module ID was incorrect');
... ... @@ -44,19 +44,18 @@ if (isset($CFG->adobeconnect_email_login) and !empty($CFG->adobeconnect_email_lo
44 44 }
45 45  
46 46 if (0 != $cm->groupmode){
47   -
48 47 if (empty($groupid)) {
49 48 $groups = groups_get_user_groups($course->id, $usrobj->id);
50   -
51 49 if (array_key_exists(0, $groups)) {
52 50 $groupid = current($groups[0]);
53 51 }
54   -
55 52 if (empty($groupid)) {
56 53 $groupid = 0;
57   - notify(get_string('usergrouprequired', 'adobeconnect'));
58   - print_footer($course);
59   - die();
  54 + echo $OUTPUT->header();
  55 + echo '<p>&nbsp;<p>';
  56 + echo $OUTPUT->notification(get_string('usergrouprequired', 'adobeconnect'));
  57 + echo $OUTPUT->footer();
  58 + return;
60 59 }
61 60  
62 61 }
... ... @@ -19,8 +19,9 @@ $groupid = required_param(&#39;groupid&#39;, PARAM_INT);
19 19 // DFNVC
20 20 $recordingscoid = required_param('recording', PARAM_INT);
21 21 $convert = optional_param('convert', null, PARAM_INT);
  22 +$edit = optional_param('edit', null, PARAM_INT);
22 23  
23   -global $CFG, $USER, $DB;
  24 +global $CFG, $USER, $DB, $OUTPUT;
24 25  
25 26 // Do the usual Moodle setup
26 27 if (! $cm = get_coursemodule_from_id('adobeconnect', $id)) {
... ... @@ -65,9 +66,6 @@ $aconnect = aconnect_login();
65 66 //$aconnect->request_http_header_login(1, $login);
66 67 //$adobesession = $aconnect->get_cookie();
67 68 $user_session_cookie = $aconnect->user_session_cookie($login);
68   -//notify('test: ' . htmlspecialchars($aconnect->_xmlrequest));
69   -//notify('test: ' . htmlspecialchars($aconnect->_xmlresponse));
70   -//notify('test: ' . $adobesession);
71 69 aconnect_logout($aconnect);
72 70  
73 71  
... ... @@ -167,11 +165,6 @@ $aconnect = aconnect_login();
167 165 $recording = array();
168 166 $fldid = aconnect_get_folder($aconnect, 'content');
169 167  
170   -//notify('test: ' . htmlspecialchars($aconnect->_xmlrequest));
171   -//notify('test: ' . htmlspecialchars($aconnect->_xmlresponse));
172   -//notify('test: ' . $adobesession);
173   -
174   -
175 168 //$data = aconnect_get_recordings($aconnect, $fldid, $meetscoid->meetingscoid);
176 169 $data = '';
177 170  
... ... @@ -186,22 +179,19 @@ if (!empty($data2)) {
186 179 $recording[] = $data2;
187 180 }
188 181  
189   -// DFNVC
  182 +//
  183 +// DFNconf
190 184 //
191 185 $meetfldscoid = aconnect_get_meeting_folder($aconnect);
192   -//notify('test: ' . htmlspecialchars($aconnect->_xmlrequest));
193   -//notify('test: ' . htmlspecialchars($aconnect->_xmlresponse));
194   -
195 186  
196 187 $recordingurlpath = aconnect_get_recording_urlpath($aconnect, $meetscoid->meetingscoid, $recordingscoid);
197   -//notify('test: ' . htmlspecialchars($aconnect->_xmlrequest));
198   -//notify('test: ' . htmlspecialchars($aconnect->_xmlresponse));
199   -//notify('test: ' . $aconnect->get_cookie());
200   -//return;
201 188  
202 189 if (empty($recordingurlpath) and confirm_sesskey()) {
203   - notify('error getting recording urlpath');
204   - die();
  190 + echo $OUTPUT->header();
  191 + echo '<p>&nbsp;<p>';
  192 + echo $OUTPUT->notification('Aufzeichnung wurde auf dem DFNconf Meeting-Server <b>' . $CFG->adobeconnect_meethost . '</b> nicht gefunden !');
  193 + echo $OUTPUT->footer();
  194 + return;
205 195 }
206 196 aconnect_logout($aconnect);
207 197  
... ... @@ -215,12 +205,15 @@ if (!empty($CFG-&gt;adobeconnect_port) and (80 != $CFG-&gt;adobeconnect_port)) {
215 205 $port = ':' . $CFG->adobeconnect_port;
216 206 }
217 207  
218   -//redirect($protocol . $CFG->adobeconnect_meethost . $port
219   -// . $recording->url . '?session=' . $adobesession);
220   -// DFNVC
  208 +//
  209 +// DFNconf
  210 +//
221 211 if ($convert == 'true') {
222 212 redirect($protocol . $CFG->adobeconnect_meethost . $port . $recordingurlpath . '?pbMode=offline&session=' . $user_session_cookie);
223 213 }
  214 +elseif ($edit == 'true') {
  215 + redirect($protocol . $CFG->adobeconnect_meethost . $port . $recordingurlpath . '?pbMode=edit&session=' . $user_session_cookie);
  216 +}
224 217 else {
225 218 redirect($protocol . $CFG->adobeconnect_meethost . $port . $recordingurlpath . '?session=' . $user_session_cookie);
226 219 }
lang/de/adobeconnect.php
... ... @@ -79,6 +79,8 @@ $string[&#39;record_delete&#39;] = &#39;Aufzeichnung löschen&#39;;
79 79 $string['confirm_record_delete'] = 'Wollen Sie die Aufzeichnung "{$a}" wirklich löschen ?';
80 80 $string['recording_error'] = 'Das Meeting kann nicht gelöscht werden, da es noch Aufzeichnungen enthält !';
81 81  
  82 +$string['record_edit'] = 'Bearbeiten';
  83 +
82 84 $string['removeparticipant'] = 'Entfernen';
83 85 $string['removepresenter'] = 'Entfernen';
84 86 $string['roletoassign'] = 'Zugewiesene Rolle';
lang/en/adobeconnect.php
... ... @@ -80,6 +80,8 @@ $string[&#39;record_delete&#39;] = &#39;Delete recording&#39;;
80 80 $string['confirm_record_delete'] = 'Do you really want to delete the recroding {$a}?';
81 81 $string['recording_error'] = 'The meeting cannot be deleted because it still contains recordings!';
82 82  
  83 +$string['record_edit'] = 'Edit';
  84 +
83 85 $string['removeparticipant'] = 'Remove';
84 86 $string['removepresenter'] = 'Remove';
85 87 $string['roletoassign'] = 'Role to assign';
... ... @@ -111,7 +111,7 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
111 111 // recording url
112 112 $url = $CFG->wwwroot . '/mod/adobeconnect/joinrecording.php?id=' . $cmid . '&recording='. $recording_scoid . '&groupid='. $groupid . '&sesskey=' . $USER->sesskey;
113 113 // recording name
114   - $name = '<img src="' . $CFG->wwwroot .'/pix/e/insert_edit_video.svg"/>&nbsp;&nbsp;';
  114 + $name = '<img src="' . $CFG->wwwroot .'/pix/e/insert_edit_video.svg" height="24" width="24"/>&nbsp;&nbsp;';
115 115 $name .= html_writer::link($url, format_string($recording->name), array('target' => '_blank','title'=>get_string('record_play','adobeconnect')));
116 116 // start date
117 117 $startdate = format_string($recording->startdate);
... ... @@ -130,7 +130,10 @@ class mod_adobeconnect_renderer extends plugin_renderer_base {
130 130 $converturl = $url . '&convert=true';
131 131 $param = array('target' => '_blank','title'=>get_string('record_convert','adobeconnect'));
132 132 $action = html_writer::link($converturl,get_string('record_convert','adobeconnect'),$param);
133   - array_push($row, $action);
  133 + $editurl = $url . '&edit=true';
  134 + $editparam = array('target' => '_blank','title'=>get_string('record_edit','adobeconnect'));
  135 + $editaction = html_writer::link($editurl,get_string('record_edit','adobeconnect'),$editparam);
  136 + array_push($row, $action . '&nbsp;&nbsp;|&nbsp;&nbsp;' . $editaction);
134 137 // Löschen
135 138 $delurl = "/mod/adobeconnect/delrecording.php?id=$cmid&recording=$recording_scoid";
136 139 $a = $recording->name;