Author: sebawagner
Date: Sat Apr 21 16:23:29 2012
New Revision: 1328709

URL: http://svn.apache.org/viewvc?rev=1328709&view=rev
Log:
OPENMEETINGS-3 Fix update of rooms, room types add interview room type, remove 
audience, fix recording play back integration

Removed:
    
incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway_BACKUP.php
Modified:
    incubator/openmeetings/trunk/plugins/moodle_plugin/README.txt
    incubator/openmeetings/trunk/plugins/moodle_plugin/icon.gif
    incubator/openmeetings/trunk/plugins/moodle_plugin/lang/de/openmeetings.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/lang/en/openmeetings.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/lang/es/openmeetings.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/lang/fr/openmeetings.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/lang/ru/openmeetings.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/mod_form.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway.php
    incubator/openmeetings/trunk/plugins/moodle_plugin/pix/icon.gif
    incubator/openmeetings/trunk/plugins/moodle_plugin/view.php

Modified: incubator/openmeetings/trunk/plugins/moodle_plugin/README.txt
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/README.txt?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/README.txt (original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/README.txt Sat Apr 21 
16:23:29 2012
@@ -2,8 +2,4 @@ This Moodle plugin uses OpenMeetings Ope
 You need your own OpenMeetings instance running.
 
 Check out:
-http://www.openmeetings.de
-http://code.google.com/p/openmeetings
-
-Demo: 
-http://moodle.openmeetings.de
\ No newline at end of file
+http://incubator.apache.org/openmeetings/
\ No newline at end of file

Modified: incubator/openmeetings/trunk/plugins/moodle_plugin/icon.gif
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/icon.gif?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/lang/de/openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/lang/de/openmeetings.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/lang/de/openmeetings.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/lang/de/openmeetings.php 
Sat Apr 21 16:23:29 2012
@@ -45,7 +45,7 @@ $string['recordings_show'] = 'Aufgezeich
 $string['Comment'] = 'Kommentar';
 
 $string['Conference'] = 'Konference (bis 16 Teilnehmer)';
-$string['Audience'] = 'Audience (bis 32 Teilnehmer)';
+$string['Interview'] = 'Interview (2 Teilnehmer)';
 $string['Restricted'] = 'Webinar (bis 150 Teilnehmer)';
 $string['Recording'] = 'Aufzeichnung anzeigen (Aufzeichnung auswählen die 
statt dem Konferenzraum dann angezeigt wird!)';
 

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/lang/en/openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/lang/en/openmeetings.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/lang/en/openmeetings.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/lang/en/openmeetings.php 
Sat Apr 21 16:23:29 2012
@@ -45,7 +45,7 @@ $string['recordings_show'] = 'Available 
 $string['Comment'] = 'Comment';
 
 $string['Conference'] = 'Conference (max 16 participants)';
-$string['Audience'] = 'Audience (max 32 participants)';
+$string['Interview'] = 'Interview (2 participants)';
 $string['Restricted'] = 'Webinar (max 150 participants)';
 $string['Recording'] = 'Show Recording (select recording from drop down to be 
shown instead of meeting)';
 

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/lang/es/openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/lang/es/openmeetings.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/lang/es/openmeetings.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/lang/es/openmeetings.php 
Sat Apr 21 16:23:29 2012
@@ -45,6 +45,7 @@ $string['recordings_show'] = 'Dispuestas
 $string['Comment'] = 'Comentario';
 
 $string['Conference'] = 'Conferencia (max 16 participantes)';
+$string['Interview'] = 'Interview (2 participantes)';
 $string['Audience'] = 'Audiencia (max 32 participantes)';
 $string['Restricted'] = 'Webinar (max 150 participantes)';
 $string['Recording'] = 'Mostrar Grabaciones (seleccionar grabacion en el menu 
desplegable para ser mostrado en lugar de la reunion)';

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/lang/fr/openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/lang/fr/openmeetings.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/lang/fr/openmeetings.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/lang/fr/openmeetings.php 
Sat Apr 21 16:23:29 2012
@@ -45,7 +45,7 @@ $string['recordings_show'] = 'Available 
 $string['Comment'] = 'Comment';
 
 $string['Conference'] = 'Réunion (max 16 participants)';
-$string['Audience'] = 'Conférence (max 32 participants)';
+$string['Interview'] = 'Interview (2 participants)';
 $string['Restricted'] = 'Accès restreint (max 150 participants)';
 $string['Recording'] = 'Show Recording (select recording from drop down to be 
shown instead of meeting)';
 

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/lang/ru/openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/lang/ru/openmeetings.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/lang/ru/openmeetings.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/lang/ru/openmeetings.php 
Sat Apr 21 16:23:29 2012
@@ -45,7 +45,7 @@ $string['recordings_show'] = 'З&#1
 $string['Comment'] = 
'Комментарий';
 
 $string['Conference'] = 
'Конференция 
(до 16 
участников)';
-$string['Audience'] = 
'Аудитория 
(до 32 
участников)';
+$string['Interview'] = 'Interview (2 participants)';
 $string['Restricted'] = 
'Веб-семинар 
(до 150 
участников)';
 $string['Recording'] = 
'Показать 
запись 
(выберите 
запись из 
выпадающего 
списка, чтобы 
показать 
вместо 
совещания)';
 

Modified: incubator/openmeetings/trunk/plugins/moodle_plugin/mod_form.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/mod_form.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/mod_form.php (original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/mod_form.php Sat Apr 21 
16:23:29 2012
@@ -45,7 +45,7 @@ class mod_openmeetings_mod_form extends 
                $mform->addElement('hidden', 'room_id', '0', 
array('size'=>'64'));
 
                /// Adding the "Room Type" field
-               $mform->addElement('select', 'type', get_string('Room_Type', 
'openmeetings'), array('1'=>get_string('Conference', 'openmeetings'), 
'2'=>get_string('Audience', 'openmeetings'), '3'=>get_string('Restricted', 
'openmeetings'), '0'=>get_string('Recording', 'openmeetings')));
+               $mform->addElement('select', 'type', get_string('Room_Type', 
'openmeetings'), array('1'=>get_string('Conference', 'openmeetings'), 
'3'=>get_string('Restricted', 'openmeetings'), '4'=>get_string('Interview', 
'openmeetings'), '0'=>get_string('Recording', 'openmeetings')));
 
                /// Adding the "Number of Participants" field
                $mform->addElement('select', 'max_user', get_string('Max_User', 
'openmeetings'), array('2'=>'2', '4'=>'4', '8'=>'8', '16'=>'16', '24'=>'24', 
'36'=>'36', '50'=>'50', '100'=>'100', '150'=>'150', '200'=>'200', '250'=>'250', 
'500'=>'500', '1000'=>'1000'));
@@ -107,26 +107,18 @@ class mod_openmeetings_mod_form extends 
                
                        $resultDom = 
$openmeetings_gateway->openmeetings_getRecordingsByExternalRooms();
                
-                       $flvrecordings = 
$resultDom->getElementsByTagName('flvrecording');
-                       if ($flvrecordings->length > 0) {
+                       $flvrecordings = 
$resultDom->getElementsByTagName('return');
                                
-                               foreach ($flvrecordings as $flvrecording) {
-                                       
-                                       $flvRecordingIdNode = 
$flvrecording->getElementsByTagName('flvRecordingId');
-                                       $flvRecordingNameNode = 
$flvrecording->getElementsByTagName('fileName');
-                                       if ($flvRecordingIdNode->length > 0) {
-                                               
$recordings[$flvRecordingIdNode->item(0)->nodeValue] = 
$flvRecordingNameNode->item(0)->nodeValue;
-                                       }
-                                       
-                               }
+                       foreach ($flvrecordings as $flvrecording) {
                                
-                       } else {
-                               $flvRecordingIdNode = 
$resultDom->getElementsByTagName('flvRecordingId');
-                               $flvRecordingNameNode = 
$resultDom->getElementsByTagName('fileName');
+                               $flvRecordingIdNode = 
$flvrecording->getElementsByTagName('flvRecordingId');
+                               $flvRecordingNameNode = 
$flvrecording->getElementsByTagName('fileName');
                                if ($flvRecordingIdNode->length > 0) {
                                        
$recordings[$flvRecordingIdNode->item(0)->nodeValue] = 
$flvRecordingNameNode->item(0)->nodeValue;
                                }
+                               
                        }
+                               
                
                
                }

Modified: 
incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway.php 
(original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/openmeetings_gateway.php 
Sat Apr 21 16:23:29 2012
@@ -23,7 +23,7 @@ require_once($CFG->dirroot.'/mod/openmee
 class openmeetings_gateway {
 
        var $session_id = "";
-
+       
        function getUrl() {
                global $CFG;
                //FIXME protocol should be added
@@ -63,13 +63,12 @@ class openmeetings_gateway {
                        if ($err) {
                                echo '<h2>Error</h2><pre>' . $err . '</pre>';
                        } else {
-                               //echo '<h2>Result</h2><pre>'; 
print_r($response); echo '</pre>';
                                $this->session_id = $response;
 
                                $result = 
$restService->call($this->getUrl()."/services/UserService/loginUser?"
                                . "SID=".$this->session_id
-                               . "&username=" . 
$CFG->openmeetings_openmeetingsAdminUser
-                               . "&userpass=" . 
$CFG->openmeetings_openmeetingsAdminUserPass
+                               . "&username=" . 
urlencode($CFG->openmeetings_openmeetingsAdminUser)
+                               . "&userpass=" . 
urlencode($CFG->openmeetings_openmeetingsAdminUserPass)
                                );
 
                                if ($restService->getError()) {
@@ -79,11 +78,7 @@ class openmeetings_gateway {
                                        if ($err) {
                                                echo '<h2>Error</h2><pre>' . 
$err . '</pre>';
                                        } else {
-                                               //echo '<h2>Result</h2><pre>'; 
print_r($result); echo '</pre>';
                                                $returnValue = $result;
-                                               //print_r($result);
-                                               //exit;
-                                               //echo 
'<h2>returnValue</h2><pre>'; printf($returnValue); echo '</pre>';
                                        }
                                }
                        }
@@ -97,46 +92,6 @@ class openmeetings_gateway {
        }
 
 
-       function openmeetings_createroomwithmod($openmeetings) {
-               global $CFG;
-
-               $restService = new openmeetings_rest_service();
-               //echo $restService."<br/>";
-               $err = $restService->getError();
-               if ($err) {
-                       echo '<h2>Constructor error</h2><pre>' . $err . 
'</pre>';
-                       echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
-                       exit();
-               }
-                       
-               $result = 
$restService->call($this->getUrl()."/services/RoomService/addRoomWithModerationQuestionsAndAudioType?"
 .
-                                                       
"SID=".$this->session_id.
-                                                       
"&name=".$openmeetings->name.
-                                                       
"&roomtypes_id=".$openmeetings->roomtypes_id.
-                                                       
"&comment=".$openmeetings->comment.
-                                                       
"&numberOfPartizipants=".$openmeetings->numberOfPartizipants.
-                                                       
"&ispublic=".$openmeetings->ispublic.
-                                                       
"&appointment=".$openmeetings->appointment.
-                                                       
"&isDemoRoom=".$openmeetings->isDemoRoom.
-                                                       
"&demoTime=".$openmeetings->demoTime.
-                                                       
"&isModeratedRoom=".$openmeetings->isModeratedRoom.
-                                                       
"&allowUserQuestions=true" .
-                                                       "&isAudioOnly=false");
-
-               if ($restService->fault) {
-                       echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
-               } else {
-                       $err = $restService->getError();
-                       if ($err) {
-                               echo '<h2>Error</h2><pre>' . $err . '</pre>';
-                       } else {
-                               //echo '<h2>Result</h2><pre>'; 
print_r($result["return"]); echo '</pre>';
-                               return $result;
-                       }
-               }
-               return -1;
-       }
-
        function openmeetings_updateRoomWithModeration($openmeetings) {
 
                global $CFG;
@@ -156,32 +111,18 @@ class openmeetings_gateway {
                        $isModeratedRoom = true;
                }
 
-               $params = array(
-                               'SID' => $this->session_id,
-                               'room_id' => $openmeetings->room_id,
-                               'name' => $course_name,
-                               'roomtypes_id' => $openmeetings->type,
-                               'comment' => 'Created by SOAP-Gateway for 
Moodle Platform',
-                               'numberOfPartizipants' => 
$openmeetings->max_user,
-                               'ispublic' => 0,
-                               'appointment' => 0,
-                               'isDemoRoom' => 0,
-                               'demoTime' => 0,
-                               'isModeratedRoom' => $isModeratedRoom
-               );
-                       
                $result = 
$restService->call($this->getUrl()."/services/RoomService/updateRoomWithModeration?"
 .
                                                        
"SID=".$this->session_id.
                                                        
"&room_id=".$openmeetings->room_id.
-                                                       "&name=".$course_name.
-                                                       
"&roomtypes_id=".$openmeetings->type.
-                                                       "&comment="."Created by 
SOAP-Gateway for Moodle Platform".
+                                                       
"&name=".urlencode($course_name).
+                                                       
"&roomtypes_id=".urlencode($openmeetings->type).
+                                                       
"&comment=".urlencode("Created by SOAP-Gateway for Moodle Platform").
                                                        
"&numberOfPartizipants=".$openmeetings->max_user.
                                                        "&ispublic=false".
                                                        "&appointment=false".
                                                        "&isDemoRoom=false".
                                                        "&demoTime=0".
-                                                       
"&isModeratedRoom=".$isModeratedRoom);
+                                                       
"&isModeratedRoom=".$this->var_to_str($isModeratedRoom));
 
                if ($restService->fault) {
                        echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
@@ -197,99 +138,44 @@ class openmeetings_gateway {
                return -1;
        }
 
-
-       function 
openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($username, 
$firstname, $lastname,
-       $profilePictureUrl, $email, $userId, $systemType, $room_id, 
$becomeModerator, $allowRecording) {
-               global $CFG;
-
-               $restService = new openmeetings_rest_service();
-               //echo $restService."<br/>";
-               $err = $restService->getError();
-               if ($err) {
-                       echo '<h2>Constructor error</h2><pre>' . $err . 
'</pre>';
-                       echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
-                       exit();
-               }
-
-               $result = 
$restService->call($this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHashByURLAndRecFlag?"
 .
-                                                       
"SID=".$this->session_id.
-                                                       "&username=".$username.
-                                                       
"&firstname=".$firstname.
-                                                       "&lastname=".$lastname.
-                                                       
"&profilePictureUrl=".$profilePictureUrl.
-                                                       "&email=".$email.
-                                                       
"&externalUserId=".$userId.
-                                                       
"&externalUserType=".$systemType.
-                                                       "&room_id=".$room_id.
-                                                       
"&becomeModeratorAsInt=".$becomeModerator.
-                                                       
"&showAudioVideoTestAsInt=1".
-                                                       
"&allowRecording=".$allowRecording);
-
-               if ($restService->fault) {
+       /*
+        * public String setUserObjectAndGenerateRecordingHashByURL(String SID, 
String username, String firstname, String lastname,
+                                       Long externalUserId, String 
externalUserType, Long recording_id)
+        */
+        function 
openmeetings_setUserObjectAndGenerateRecordingHashByURL($username, $firstname, 
$lastname, 
+                                               $userId, $systemType, 
$recording_id) {
+           $restService = new openmeetings_rest_service();
+               $result = 
$restService->call($this->getUrl().'/services/UserService/setUserObjectAndGenerateRecordingHashByURL?'.
+                       'SID='.$this->session_id .
+                       '&username='.urlencode($username) .
+                       '&firstname='.urlencode($firstname) .
+                       '&lastname='.urlencode($lastname) .
+                       '&externalUserId='.$userId .
+                       '&externalUserType='.urlencode($systemType) .
+                       '&recording_id='.$recording_id,
+                       'return'
+                       );
+               
+               if ($client_roomService->fault) {
                        echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
                } else {
                        $err = $restService->getError();
                        if ($err) {
                                echo '<h2>Error</h2><pre>' . $err . '</pre>';
                        } else {
-                               //echo '<h2>Result</h2><pre>'; 
print_r($result["return"]); echo '</pre>';
+                               echo '<h2>Result</h2><pre>'; print_r($result); 
echo '</pre>';
                                return $result;
                        }
-               }
+               }   
                return -1;
        }
 
-       function 
openmeetings_addRoomWithModerationExternalTypeAndTopBarOption($openmeetings) {
+       function 
openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($username, 
$firstname, $lastname,
+                                       $profilePictureUrl, $email, $userId, 
$systemType, $room_id, $becomeModerator, $allowRecording) {
                global $CFG;
 
                $restService = new openmeetings_rest_service();
-               //echo $client_roomService."<br/>";
-               $err = $restService->getError();
-               if ($err) {
-                       echo '<h2>Constructor error</h2><pre>' . $err . 
'</pre>';
-                       echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
-                       exit();
-               }
-
-               $result = 
$restService->call($this->getUrl()."/services/RoomService/addRoomWithModerationExternalTypeAndTopBarOption?"
 .
-                                                       
"SID=".$this->session_id.
-                                                       
"&name=".urlencode($openmeetings->name).
-                                                       
"&roomtypes_id=".$openmeetings->roomtypes_id.
-                                                       
"&comment=".urlencode($openmeetings->comment).
-                                                       
"&numberOfPartizipants=".$openmeetings->numberOfPartizipants.
-                                                       
"&ispublic=".$this->var_to_str($openmeetings->ispublic).
-                                                       
"&appointment=".$this->var_to_str($openmeetings->appointment).
-                                                       
"&isDemoRoom=".$this->var_to_str($openmeetings->isDemoRoom).
-                                                       
"&demoTime=".$openmeetings->demoTime.
-                                                       
"&isModeratedRoom=".$this->var_to_str($openmeetings->isModeratedRoom).
-                                                       
"&externalRoomType=".$openmeetings->externalRoomType.
-                                                       "&allowUserQuestions=" 
.$this->var_to_str($openmeetings->allowUserQuestions).
-                                                       
"&isAudioOnly=".$this->var_to_str($openmeetings->isAudioOnly).
-                                                       
"&waitForRecording=false".
-                                                       
"&allowRecording=".$this->var_to_str($openmeetings->allowRecording).
-                                                       "&hideTopBar=false");
-
-
-               if ($restService->fault) {
-                       echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
-               } else {
-                       $err = $restService->getError();
-                       if ($err) {
-                               echo '<h2>Error</h2><pre>' . $err . '</pre>';
-                       } else {
-                               //echo '<h2>Result</h2><pre>'; 
print_r($result["return"]); echo '</pre>';
-                               //return $result["return"];
-                               return $result;
-                       }
-               }
-               return -1;
-       }
-
-       function updateRoomWithModerationAndQuestions($openmeetings) {
-               global $CFG;
-                       
-               $restService = new openmeetings_rest_service();
-               //echo $client_roomService."<br/>";
+               //echo $restService."<br/>";
                $err = $restService->getError();
                if ($err) {
                        echo '<h2>Constructor error</h2><pre>' . $err . 
'</pre>';
@@ -297,36 +183,32 @@ class openmeetings_gateway {
                        exit();
                }
 
-               $result = 
$restService->call($this->getUrl()."/services/RoomService/updateRoomWithModerationAndQuestions?"
 .
+               $result = 
$restService->call($this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHashByURLAndRecFlag?"
 .
                                                        
"SID=".$this->session_id.
-                                                       
"&room_id=".$openmeetings->room_id.
-                                                       
"&name=".urlencode($openmeetings->name).
-                                                       
"&roomtypes_id=".$openmeetings->roomtypes_id.
-                                                       
"&comment=".urlencode($openmeetings->comment).
-                                                       
"&numberOfPartizipants=".$openmeetings->numberOfPartizipants.
-                                                       
"&ispublic=".$this->var_to_str($openmeetings->ispublic).
-                                                       
"&appointment=".$this->var_to_str($openmeetings->appointment).
-                                                       
"&isDemoRoom=".$this->var_to_str($openmeetings->isDemoRoom).
-                                                       
"&demoTime=".$openmeetings->demoTime.
-                                                       
"&isModeratedRoom=".$this->var_to_str($openmeetings->isModeratedRoom).
-                                                       
"&allowUserQuestions=".$this->var_to_str($openmeetings->allowUserQuestions));
+                                                       
"&username=".urlencode($username).
+                                                       
"&firstname=".urlencode($firstname).
+                                                       
"&lastname=".urlencode($lastname).
+                                                       
"&profilePictureUrl=".urlencode($profilePictureUrl).
+                                                       
"&email=".urlencode($email).
+                                                       
"&externalUserId=".urlencode($userId).
+                                                       
"&externalUserType=".urlencode($systemType).
+                                                       
"&room_id=".urlencode($room_id).
+                                                       
"&becomeModeratorAsInt=".$becomeModerator.
+                                                       
"&showAudioVideoTestAsInt=1".
+                                                       
"&allowRecording=".$this->var_to_str($allowRecording));
 
                if ($restService->fault) {
                        echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
-                       //print_r($params);
-                       //exit();
                } else {
                        $err = $restService->getError();
                        if ($err) {
                                echo '<h2>Error</h2><pre>' . $err . '</pre>';
                        } else {
                                //echo '<h2>Result</h2><pre>'; 
print_r($result["return"]); echo '</pre>';
-                               //return $result["return"];
                                return $result;
                        }
                }
                return -1;
-
        }
 
        function deleteRoom($openmeetings) {
@@ -340,16 +222,6 @@ class openmeetings_gateway {
                        echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
                        exit();
                }
-               /*
-                $params = array(
-               'SID' => $this->session_id,
-               'rooms_id' => $openmeetings->room_id
-                       
-               );
-
-               $result = $client_roomService->call('deleteRoom',$params);
-               */
-
 
                $result = 
$restService->call($this->getUrl()."/services/RoomService/deleteRoom?" .
                                                        
"SID=".$this->session_id.
@@ -370,53 +242,10 @@ class openmeetings_gateway {
                return -1;
        }
 
+
        /**
-        * Sets the User Id and remembers the User,
-        * the value for $systemType is any Flag but usually should always be 
the same,
-        * it only has a reason if you have more then one external Systems, so 
the $userId will not
-        * be unique, then you can use the $systemType to give each system its 
own scope
-        *
-        * so a unique external user is always the pair of: $userId + 
$systemType
-        *
-        * in this case the $systemType is 'moodle'
-        *
+        * Generate a new room hash for entering a conference room
         */
-       function openmeetings_setUserObjectWithExternalUser($username, 
$firstname, $lastname, $profilePictureUrl, $email, $userId, $systemType) {
-               global $CFG;
-
-               $restService = new 
nusoap_client($this->getUrl()."/services/UserService?wsdl", true);
-
-               $err = $restService->getError();
-               if ($err) {
-                       echo '<h2>Constructor error</h2><pre>' . $err . 
'</pre>';
-                       echo '<h2>Debug</h2><pre>' . 
htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
-                       exit();
-               }
-               $params = array(
-                       'SID' => $this->session_id,
-                       'username' => urlencode($username),
-                       'firstname' => $firstname,
-                       'lastname' => $lastname,
-                       'profilePictureUrl' => $profilePictureUrl,
-                       'email' => $email,
-                       'externalUserId' => $userId,
-                       'externalUserType' => $systemType
-               );
-               $result = 
$restService->call('setUserObjectWithExternalUser',$params);
-               if ($client_roomService->fault) {
-                       echo '<h2>Fault (Expect - The request contains an 
invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
-               } else {
-                       $err = $restService->getError();
-                       if ($err) {
-                               echo '<h2>Error</h2><pre>' . $err . '</pre>';
-                       } else {
-                               //echo '<h2>Result</h2><pre>'; 
print_r($result["return"]); echo '</pre>';
-                               return $result["return"];
-                       }
-               }
-               return -1;
-       }
-
        function openmeetings_setUserObjectAndGenerateRoomHash($username,
                                                                        
$firstname,
                                                                        
$lastname,
@@ -468,6 +297,9 @@ class openmeetings_gateway {
                return -1;
        }
        
+       /**
+        * Create a new conference room
+        */
        function openmeetings_createRoomWithModAndType($openmeetings) {
                global $USER, $CFG;
        
@@ -502,13 +334,15 @@ class openmeetings_gateway {
                        if ($err) {
                                echo '<h2>Error</h2><pre>' . $err . '</pre>';
                        } else {
-                               echo '<h2>Result Create Room </h2><pre>'; 
print_r($result); echo '</pre>';
                                return $result;
                        }
                }   
                return -1;
        }
 
+       /**
+        * Get list of available recordings made by this Moodle instance
+        */
        function openmeetings_getRecordingsByExternalRooms() {
        
                global $CFG;

Modified: incubator/openmeetings/trunk/plugins/moodle_plugin/pix/icon.gif
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/pix/icon.gif?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/openmeetings/trunk/plugins/moodle_plugin/view.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/moodle_plugin/view.php?rev=1328709&r1=1328708&r2=1328709&view=diff
==============================================================================
--- incubator/openmeetings/trunk/plugins/moodle_plugin/view.php (original)
+++ incubator/openmeetings/trunk/plugins/moodle_plugin/view.php Sat Apr 21 
16:23:29 2012
@@ -105,7 +105,6 @@ if ($openmeetings_gateway->openmeetings_
        }
                
        // Simulate the User automatically
-       //echo "openmeetings_setUserObjectWithExternalUser<br/>";
        if ($openmeetings->type != 0){
                $returnVal = 
$openmeetings_gateway->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($USER->username,$USER->firstname,
                
$USER->lastname,$USER->picture,$USER->email,$USER->id,$CFG->openmeetings_openmeetingsModuleKey,$openmeetings->room_id,$becomemoderator,$allowRecording);


Reply via email to