[Hw4mdl-svn] SF.net SVN: hw4mdl: [193] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <tro...@us...> - 2007-08-01 14:04:18
|
Revision: 193 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=193&view=rev Author: trollinger Date: 2007-08-01 07:04:16 -0700 (Wed, 01 Aug 2007) Log Message: ----------- Update Live classroom module after release 3.1 Modified Paths: -------------- trunk/moodle/mod/liveclassroom/config.html trunk/moodle/mod/liveclassroom/css/StyleSheet.css trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/js/Ajax.js trunk/moodle/mod/liveclassroom/js/constants.js trunk/moodle/mod/liveclassroom/js/hwCommons.js trunk/moodle/mod/liveclassroom/js/verifForm.js trunk/moodle/mod/liveclassroom/lang/en/help/liveclassroom/mods.html trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/en_utf8/help/liveclassroom/mods.html trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/pictures/items/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/items/filter-enabled-right.png trunk/moodle/mod/liveclassroom/pictures/items/filter-rollover-right.png trunk/moodle/mod/liveclassroom/pictures/items/headerbar-logo.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-VoiceBoardicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-VoicePresentationicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-subitem.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-voicerecordericon.png trunk/moodle/mod/liveclassroom/reports.php trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/liveclassroom/welcome.php Added Paths: ----------- trunk/moodle/mod/liveclassroom/doAction.php trunk/moodle/mod/liveclassroom/js/ajaxslt/ trunk/moodle/mod/liveclassroom/js/ajaxslt/AUTHORS trunk/moodle/mod/liveclassroom/js/ajaxslt/COPYING trunk/moodle/mod/liveclassroom/js/ajaxslt/README trunk/moodle/mod/liveclassroom/js/ajaxslt/dom.js trunk/moodle/mod/liveclassroom/js/ajaxslt/util.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xmltoken.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xpath.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xslt.js trunk/moodle/mod/liveclassroom/js/dojo/ trunk/moodle/mod/liveclassroom/js/dojo/LICENSE trunk/moodle/mod/liveclassroom/js/dojo/README trunk/moodle/mod/liveclassroom/js/dojo/build.txt trunk/moodle/mod/liveclassroom/js/dojo/dojo.js trunk/moodle/mod/liveclassroom/js/dojo/iframe_history.html trunk/moodle/mod/liveclassroom/js/dojo/src/ trunk/moodle/mod/liveclassroom/js/dojo/src/io/ trunk/moodle/mod/liveclassroom/js/dojo/src/io/BrowserIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/IframeIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/RepubsubIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/RhinoIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/ScriptSrcIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/XhrIframeProxy.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/__package__.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/cometd.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/common.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/cookie.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/xip_client.html trunk/moodle/mod/liveclassroom/js/dojo/src/io/xip_server.html trunk/moodle/mod/liveclassroom/js/xsl/ trunk/moodle/mod/liveclassroom/js/xsl/wimba.xsl trunk/moodle/mod/liveclassroom/lib/common/ trunk/moodle/mod/liveclassroom/lib/common/WimbaCommons.php trunk/moodle/mod/liveclassroom/lib/common/WimbaUI.php trunk/moodle/mod/liveclassroom/lib/common/WimbaXml.php trunk/moodle/mod/liveclassroom/lib/common/XmlArchive.php trunk/moodle/mod/liveclassroom/lib/common/XmlOrphanedArchive.php trunk/moodle/mod/liveclassroom/lib/common/XmlResource.php trunk/moodle/mod/liveclassroom/lib/common/XmlRoom.php trunk/moodle/mod/liveclassroom/lib/common/domxml-php4-php5.php trunk/moodle/mod/liveclassroom/lib/lc/ trunk/moodle/mod/liveclassroom/lib/lc/LCAction.php trunk/moodle/mod/liveclassroom/lib/lc/LCRoom.php trunk/moodle/mod/liveclassroom/lib/lc/LCUser.php trunk/moodle/mod/liveclassroom/lib/lc/PrefixUtil.php trunk/moodle/mod/liveclassroom/lib/lc/lcapi.php trunk/moodle/mod/liveclassroom/pictures/backgrounds/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/listitem-information-16_12.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-activities-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-content-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-delete-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-launch-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-new-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-poll-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-schedule-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-settings-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/x_round-16_14.png trunk/moodle/mod/liveclassroom/pictures/buttons/x_squared.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-archiveicon-selected.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-archiveicon.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-boardicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif trunk/moodle/mod/liveclassroom/pictures/items/listitem-orphanedarchiveicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-pcicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-presentationicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-subitem-selected.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-voicetoolsicon.gif trunk/moodle/mod/liveclassroom/pictures/items/liveclassroom.png trunk/moodle/mod/liveclassroom/pictures/items/phone_60.png Removed Paths: ------------- trunk/moodle/mod/liveclassroom/lib/lcapi.php Modified: trunk/moodle/mod/liveclassroom/config.html =================================================================== --- trunk/moodle/mod/liveclassroom/config.html 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/config.html 2007-08-01 14:04:16 UTC (rev 193) @@ -2,6 +2,19 @@ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> <input type="hidden" name="module" value="liveclassroom"> + +<?php + +require_once("lib/lc/LCAction.php"); +require_once("lib/lc/lcapi.php"); +$lcApi=new LCApi($CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword, $CFG->dataroot); +$config = $lcApi->lcapi_get_status(); + + +?> + <table cellpadding="9" cellspacing="0" > <tr valign="top"> @@ -34,11 +47,12 @@ <tr> <td><br /></td> </tr> -<?php $config = lcapi_get_system_config(); ?> + + <tr valign="top"> <td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td> <td> - <?php echo $config[LCAPI_ATTR_SERVER_VERSION]; ?> + <?php echo $config["horizon_version"]; ?> </td> </tr> <tr valign="top"> Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css =================================================================== --- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-08-01 14:04:16 UTC (rev 193) @@ -1,677 +1,800 @@ -body -{ background-color:#ffffff; - margin-top:0px; - margin-bottom:0px; - margin-right:0px; - margin-left:0px; - font-family: Verdana,Arial,Helvetica,sans-serif; - font-size:70%; +body +{ + background-color: #ffffff; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:8px; } -/* size remaining text relative to baseline */ -/* some indiv classes and elements have different sizes, later in doc */ -body a, -body table, body td, body th, -body p, body div, body li, body li li, -body input, body textarea, body select, body option ,td textarea -{font-size:100%;} +* +{ + margin:0; + padding:0; +} -.page_title +/*general html element*/ +input { -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size:14px; -font-weight:bold; -color:#3c4b5b; -vertical-align: middle; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.area_title -{ -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size:12px; -font-weight:bold; -color:#3c4b5b; -vertical-align: middle; -background-color:#c4cedc; -padding-left:2px; -vertical-align:middle; -} -.limitWidth +td{ + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; + } +textarea { - width:160px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.alignRight -{ - +html{ + margin:0; + padding:0; + border:0; + height:100%; + } -.shiftAvailability +select { - - padding-right:50px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -* html div.tab -{ - padding-top: 2%; +label +{ + font-family:Verdana, Arial, Helvetica, sans-serif; + font-size:11px; + vertical-align:top; +} - display: none; - height: 290px; - +label.labelEnabled +{ + color:#000; } - -div.tab +label.labelDisabled { - padding-top: 2%; + color:#ccc; +} +option{ +margin-right: 5px; +} +/*general class*/ +.alert +{ + color: Red; +} - - display: none; - - height:278px; -} -.settingsPadding +.italic { - padding-left:120px; - padding-right:150px; + font-style:italic; } -.titlePodcaster - { - color:#305060; - font-size:14pt; - padding-left:10px; - font-family:Century Gothic, Verdana, Helvetica, Arial; - font-weight:bold; - font-style:italic; - vertical-align:top; - +.top +{ + vertical-align:top; - } - - - .podcaster - { - padding-left:15px; - } -.button_hide -{ - - width:25px; - display:none; } -div.current_tab +* html .top { - - position: relative; - display: block; - height:180px; - - + vertical-align:baseline; } -td.tabSelected +.comment { - background-image: url(../pictures/items/tab-selected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; font-family: Verdana; - cursor:default; + color: #555555; + font-style: italic; + font-size: 11px; + padding-left: 20px; } - -td.tabDisabled +.commentAdvanced { - color: #CACACA; - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + color: #555555; + font-size: 11px; } -td.tabNoSelected +.subOption td { - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; - font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + padding-left: 20px; } -a { -text-decoration:none; - color:Black; } +.hide +{ + display: none; +} -a:hover { - text-decoration:none; - color:Black; } +/*headerBar*/ +#headerBar table +{ + width: 100%; + background-image: url( "../pictures/backgrounds/headerbar.png" ); + height: 32px; + border-bottom: solid 1px Black; +} -td.action,input.action{ - background-image:url(../pictures/buttons/general-empty.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer +.headerBarRight +{ + padding-right:10px; } -td.action:hover,input.action:hover{ - background-image:url(../pictures/buttons/general-empty-over.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer +.headerBarLeft +{ + padding-left:10px; } -.action label + +/*contextBar*/ +#contextBar table { - cursor:pointer + background-image: url( "../pictures/backgrounds/toolbar.png" ); + height: 30px; + width: 100%; + border-bottom: solid 1px #F0F0F0; } -.alert +.contextBarRight { - color:Red; + padding-right:10px; } +.contextBarLeft +{ + padding-left:10px; +} +.roomNameForSettings +{ + font-family: Verdana; + font-weight: bold; + font-size: 12px; +} +/*filterBar*/ -a.room { color:#889EB3; - -text-decoration:none; -display:block; -width:100%; -cursor:help; - +#filterBar +{ + background-image: url( "../pictures/backgrounds/filterbar.png" ); + height: 24px; + font-weight: bold; + border-bottom: fine 1px #C7D3E1; + list-style-type:none; + + } -a.room:hover {color:#889EB3; - - +a.filterdisabled,.filterenabled,.filterrollover +{ + display:block;float:left; + color:#333333; + vertical-align:middle; text-decoration:none; - border: none; - - background-position: 3px 4px; - cursor:help; + white-space:nowrap; + padding-left:8px; + margin-left:10px; } +a.filterdisabled span,a.filterenabled span,a.filterrollover span +{ + display:block; + float:left; + padding-right:8px; + height:24px; + line-height:24px; + cursor:default; + vertical-align:middle; +} -.info a{ - position:relative; /*this is the key*/ - z-index:24; - color:#000; - text-decoration:none} +a.filterenabled span +{ + background:url("../pictures/items/filter-enabled-right.png") no-repeat right top; + color:white; +} -.info a:hover{z-index:25;text-decoration:underline;} +a.filterenabled +{ + background:url("../pictures/items/filter-enabled-left.png") no-repeat left top; +} +a.filterrollover +{ + background:url("../pictures/items/filter-rollover-left.png") no-repeat left top; +} -.info a span{display: none;font-size:8pt;} +a.filterrollover span +{ + background:url("../pictures/items/filter-rollover-right.png") no-repeat right top; +} -.info a:hover span{ /*the span will display just on :hover state*/ - font-size:8pt; - display:block; - position:absolute; - top:1.5em; left:5em; width:28em; - border:1px solid #FFF99F; - background-color:#FFF99F; color:#000; - text-align: center} - - - -.button_disabled { - - color:#666666; - font-family: Arial; - text-decoration:none; - font-size: 9px; - +/*list*/ +* html #list +{ + padding-top:0px; + margin-top:0px; + height: 315px; + overflow-y: scroll; + overflow-x: hidden; + width: 100%; + vertical-align:top; } - -.button_enabled a +#list { + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 315px; + overflow: auto; + width: 100%; +} +.listMinHeigth +{ + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 185px; + overflow: auto; + width: 100%; - color:black; - font-family: Arial; - width:30px; - font-size: 9px; - } -.separator_space +.productTitle { - width:2px; + background-color: #B0C1D5; + font-family: Verdana; + color: White; + font-size: 12px; + height: 16px; + font-weight: bold; + cursor: default; + } -.empty_space +.productTitle label { - width:50px; + vertical-align:top; } +/*list column*/ -.button_enabled a:hover{ color:black; +.list_icon +{ + width:16px; - font-family: Arial; - font-size: 9px; - - cursor:hand; } +.list_archive +{ + width:16px; + border-bottom: solid 1px #F3F3F3; +} +.list_information +{ + width:16px; + padding-right:20px; +} +.list_availability +{ + width:16px; +} -tr.selectRoom{ - background-color:red; - cursor:hand; - text-decoration:none; +.list_name +{ + width:300px; + text-align:left; } -.divProduct + +.list_noElement { - padding-top:3px; -padding-left:2px ; - + padding-left:32px; + font-style:italic; + } -.separateProduct +.moreRoom { - border-top:solid 1px #C7D3E1 + color: Navy; + text-decoration: underline; + padding-left: 20px; + font-weight: bold; } -.shortShift{ +/*List Elements*/ - padding-left:5px; +.liveclassroom td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -.room td{ - padding-left:0px ; - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; - text-decoration:none; +.liveclassroomstudent +{ + display:none; } -.room label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; - text-decoration:none; +.liveclassroomstudent td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -tr.overRoom{ - font-family:Verdana; - color:Black; - font-size:11px; - border-bottom:solid 1px #F3F3F3; - background-color:#f0f3f5; - - cursor:default; +.liveclassroom label +{ + font-family: Verdana; + color: Black; } -.archive td{ - padding-left: 5px; - font-family:Verdana; - color:#666666; - font-style:italic; - font-size:11px; - border-bottom:solid 1px #F3F3F3; +.voicetools td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -.room td{ - padding-left:5px ; - font-family:Verdana; - color:Black; - font-size:10; - border-bottom:solid 1px #F3F3F3; - cursor:default; +.voicetools label +{ + font-family: Verdana; + color: Black; } -.archive label{ - padding-left:5px ; - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; +.orphanedarchive td +{ + padding-left: 5px; + cursor: default; + text-decoration: none; + border-bottom: solid 1px #F3F3F3; } -.room label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; + +.orphanedarchive label +{ + font-family: Verdana; + color: Black; + font-size: 8; + text-decoration: none; } +.archiveHide +{ + display:none; +} +.archive td +{ + padding-left: 5px; + cursor: default; + display:table-cell; + border-bottom: solid 1px #F3F3F3; +} +.archive label +{ + font-family: Verdana; + color: Black; + font-style: italic; + font-family: Verdana; + color: #666666; + +} -.filterBar table{ - - background-image:url("../pictures/backgrounds/filterbar.png"); - height:24px; - font-weight:bold ; - - border-bottom:fine 1px #C7D3E1 +.orphanedarchivestudent +{ + display:none; } - - -.filter_enabled +/*toolBar*/ +#toolBar table { - font-family :Verdana; - color:#333333; - height:24px; - text-align:center; - font-size:10px; - font-weight:bold ; + padding-left: 5px; + width: 100%; + height:50px; + background-image: url( "../pictures/backgrounds/toolbar.png" ); + border-bottom: solid 1px #999999; } -.filter_selected -{ font-weight:bold ; - font-family :Verdana; - color:#ffffff; - text-align:center; - height:24px; - font-size:10px; - +.button_disabled { + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + font-size: 9px; + width:60px; } -.filter_left_enabled -{ - background-image:url("../pictures/items/filter-enabled-left.png"); - background-repeat:no-repeat; +.button_disabled span{ + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + text-align:center; + font-size: 9px; + + } -.filter_middle_enabled -{ - background-image:url("../pictures/items/filter-enabled-middle.png"); - font-family :Verdana; - color:#ffffff; - text-align:center; - height:24px; - font-size:10px; - font-weight:bold ; +.button_enabled span { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; } -.filter_right_enabled +.button_enabled { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; + width:60px; +} + +.separator_space { - background-image:url("../pictures/items/filter-enabled-right.png"); - background-repeat:no-repeat; + width: 2px; } -.filter_right_rollover + +.empty_space { - background-image:url("../pictures/items/filter-rollover-right.png"); - background-repeat:no-repeat; +heigth:10px; + z-index:0; + visibility:hidden; + width: 50px; } -.noFilter + +/*settings*/ + +/*tabs*/ +#tabs { - background-image:none; - font-family :Verdana; - color:#333333; - text-align:center; - height:24px; - font-size:10px; - font-weight:bold ; + background-image: url( "../pictures/backgrounds/toolbar.png" ); } -.filter_middle_rollover + +td.tabSelected,td.tabDisabled,td.tabNoSelected { - background-image:url("../pictures/items/filter-rollover-middle.png"); - font-family :Verdana; - color:#333333; - text-align:center; - height:24px; - font-size:10px; - font-weight:bold ; - + background-image: url(../pictures/items/tab-selected.gif); + background-repeat: no-repeat; + width: 78px; + font-size: 10px; + font-family: Verdana; + cursor:default; } -.filter_left_rollover + +td.tabDisabled { - background-image:url("../pictures/items/filter-rollover-left.png"); - background-repeat:no-repeat; + color: #CACACA; + z-index:-14; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; } -.filterSpace +td.tabNoSelected { - padding-left:10px; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; } -.contextBar table + +/*tab content*/ +div.tabContent { - padding-left:5px; - padding-right:5px; - background-image:url("../pictures/backgrounds/toolbar.png"); - - height:30px; - width:100% - + padding-left:5%; + padding-right:5%; + margin-top:7%; + + display: block; + height: 247px; } - -.tabBackground +* html div.tabContent { - background-image:url("../pictures/backgrounds/toolbar.png"); - + height: 248px; } +div.tabContentcalendar /*use for the calendar event*/ +{ + padding-left:3%; + padding-right:3%; + padding-top:4%; + position: relative; + display: block; + height: 230px; +} -.productChoice table +/*choice panel*/ +#productChoice table { + margin-left: 10px; + margin-right: 10px; - - border-bottom:solid 1px #F0F0F0; - margin-left:10px; - margin-right:10px; - } - -.comment{ - - font-family:Verdana; - color:#555555; - font-style:italic; - font-size:11px; - padding-left:20px; +.choiceAll td +{ + height:102px; + border-bottom: solid 1px #F0F0F0; + padding-left:15px; } +*>html .choiceAll td { + height:102px; +} +.choiceVtonly td +{ + border-bottom: solid 1px #F0F0F0; + padding-left:15px; + height:103px; -.subOption td { - - font-family:Verdana; - - font-size:11px; - padding-left:20px; - vertical-align:top; } +*>html .choiceVtonly td { + height:103px; +} -.roomNameForSettings +product_choice_left { - font-family:Verdana; - font-weight: bold; - font-size:12px; - - + width:130px; } +product_choice_right +{ + padding-right:20px; +} +/*validation bar*/ +#validationBar table +{ + width: 100%; + height: 22px; + padding: 0px; + background-color: #F0F0F0; + border-top: solid 1px #999999; +} -.hide +td.actionHide, input.action { display:none; } -.hideAndShift +td.action, input.action { - display:none; - padding-left:20px; + background-image: url(../pictures/buttons/general-empty.png); + background-repeat: no-repeat; + background-position: center; + text-decoration: none; + color: Black; + text-align: center; + cursor: pointer; + width:75px; } -.visible +td.action:hover, input.action:hover { - display:block; + background-image: url(../pictures/buttons/general-empty-over.png); } -.visibleAndShift +.action label { - display:block; - padding-left:20px; + cursor: pointer; } - -label.moreRoom +/*MessageBar*/ +#messageBar { - color:Navy; - text-decoration:underline; - padding-left:20px; - font-weight: bold; - cursor:default; + width:99%; } +.message +{ + background-color: #ffff99; + position:absolute; + bottom:4px; + left:1px; + right:1px; + height: 20px; + display: block; +} -#popup { - -display:none; - font-size:8pt; - display:block; - position:absolute; - top:45%; left:45%; - - color:#000; +/*loading panel*/ +#loading +{ + display: none; + font-size: 8pt; + display: block; + position: absolute; + top: 0; + left: 0; + color: #000; text-align: center; } +/*tooltip*/ +.tooltip +{ + display: none; + position: absolute; + z-index: 1; + background-color: #ffffd0; + padding: 2px; + margin: 2px; + left: 0px; + top: 0px; + font-family: Verdana; + font-size: 8pt; + cursor: default; +} -.expand +/*Error Panel*/ +#error_frame { - background-color:Black; + + background-color: #FFD0D0; + padding: 0; + margin: 0; + border-style: solid; + border-color: red; + border-width: 1px; + text-align: left; + vertical-align: middle; } +#error_frame table +{ + height:254px; +} -.headerBar table +#error_title { -padding-left:5px ; -width:100%; -padding-right:5px ; + font-family: Verdana,Arial,Helvetica; + font-size: 12px; + font-weight: bold; + color: black; + padding: 0; + margin: 0; + text-align: left; + vertical-align: top; +} -background-image:url("../pictures/backgrounds/headerbar.png"); -height:32px; -border-bottom:solid 1px Black; +/*popup*/ +/*background*/ +.opac +{ + + display:none; + z-index:2 !important; + position:absolute; + width:100%; + height:100%; + top:0px; + left:0px; + background-color:#000; + filter:alpha(opacity=33); + -moz-opacity:.33; + opacity:.33; + + +} +.nameElement { + font-family: Verdana; + font-weight: bold; + font-size: 12px; +} +div.advancedPopup { + position:absolute; + left:0px; + top:0px; + width:350px; + height:150px; + z-index: 50 !important;; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -.toolBar table -{ - padding-left:5px ; - width:100%; - - background-image:url("../pictures/backgrounds/toolbar.png"); - border-bottom:solid 1px #999999; +div.window-left { + position:absolute; + left:0px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-left.png" ); + background-repeat:none; } -.list -{ - - height:317px; - overflow:auto; - overflow-x: hidden; - width:100%; +div.window-middle { + position:absolute; + left:10px; + top:0px; + width:330px; + height:150px; + background-image: url( "../pictures/items/window-middle.png" ); + +} +div.window-right { + position:absolute; + left:340px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-right.png" ); + background-repeat:none; } -.listMinHeigth{ - height:296px; - overflow-y:scroll; - overflow-x: hidden; - width:100%; +div.window-leftBig { + position:absolute; + left:0px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_left.png" ); + background-repeat:none; +} +div.window-middleBig { + position:absolute; + left:10px; + top:0px; + width:380px; + height:200px; + background-image: url( "../pictures/items/window200_middle.png" ); + } -.lineTitle{ +div.window-rightBig { + position:absolute; + left:390px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_right.png" ); + background-repeat:none; +} -padding-left:10px +div.popupDialContainer { + height:130px; + width:270px; + padding-right:10px; + overflow:auto; } -.productTitle{ - - background-color:#B0C1D5; - font-family:Verdana; - color:White; - font-size:12px; - height:16px; - font-weight:bold; - cursor:default; - - -} -.validationBar table + +.popupTitle { - width:100%; - height:24px ; - padding:0px ; - background-color:#F0F0F0; - border-top:solid 1px #999999 + font-size:14px; + font-weight:bold; + text-decoration:underline; + font-family: helvetica; +} +.popupDial { + position:absolute; + left:0px; + top:0px; + width:400px; + height:200px; + z-index: 20; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -.panelSettings table -{ -border-bottom: #818181 1px solid; -height:220px; -display:none; -width:100% + +.popupDialContent { + margin-top:10px; + padding:10px 0; + background-color:#efefef; + border:1px solid #b8b8b8; } - - - .part td - { - - width:100%; - border-bottom: #818181 1px solid; - } - - .tooltip - { - width:200px; - display:none; - position:absolute; - z-index:1; - background-color:#ffffd0; - padding:2px; - margin:2px; - left:0px; - top:0px; - font-family:Verdana; - font-size:8pt; - cursor:default; - } - - #error_frame { - background-color : #FFD0D0; - padding : 0; - margin : 0; - border-style : solid; - border-color: red; - border-width : 1px; - text-align : left; - vertical-align : middle; - } - - #error_title { - font-family : Verdana,Arial,Helvetica; - font-size : 12px; - font-weight : bold; - color : black; - padding : 0; - margin : 0; - text-align : left; - vertical-align : top; - } - - .message{ - - background-color:#ffff99; - } - div.tab -{ - padding-top: 2%; +.popupDialContent.nameElement { + font-size:10px; + font-family:Verdana; +} - display: none; - -height:275px;# -} \ No newline at end of file +.picturePopup { + vertical-align:top; +} + + + Added: trunk/moodle/mod/liveclassroom/doAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/doAction.php (rev 0) +++ trunk/moodle/mod/liveclassroom/doAction.php 2007-08-01 14:04:16 UTC (rev 193) @@ -0,0 +1,171 @@ +<?php +/****************************************************************************** + * * + * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Samy Hazan * + * * + * Date: September 2006 * + * * + ******************************************************************************/ + +/* $Id: doAction.php 51417 2007-07-17 15:06:10Z thomasr $ */ + +/* This page manage the action create, update, delete for a room */ +require_once("../../config.php"); +require_once("lib.php"); +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); +require_once("lib/common/XmlRoom.php"); +require_once("lib/common/WimbaXml.php"); +if (version_compare(PHP_VERSION,'5','>=')) { + require_once('lib/common/domxml-php4-php5.php'); +} + + +$courseid = optional_param('enc_course_id', 0, PARAM_INT); +$action = required_param('action', PARAM_ALPHA); +$time = required_param('time', PARAM_INT); + +if (!empty ($_POST)) { + while (list ($key, $val) = each($_POST)) { + $list_attributes[$key] = $val; + } +} +while (list ($key, $val) = each($_GET)) { + $list_attributes[$key] = $val; +} + + +$session = new WimbaMoodleSession($list_attributes, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); +$xml = new WimbaXml(); + +if ($session->error == false && $session != NULL) { + + $api = new LCAction($session, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); + $prefix=$api->getPrefix(); + + switch ($action) { + + case "launch" : + $roomId = required_param('id', PARAM_SAFEDIR); + if ($list_attributes["studentView"] == "true") { + $authToken = $api->getAuthokenNormal($session->getCourseId()."_S", $session->getFirstname() , $session->getLastname()); + }else{ + $authToken = $api->getAuthoken(); + } + header('Location:' . $CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?channel=' . $roomId . '&hzA=' . $authToken); + exit; + break; + case "create" : + $id = $api->createRoom($session->getCourseId().rand(), "false"); + $messageAction = "created"; + $messageProduct = "room"; + break; + case "update" : + $roomId = required_param('id', PARAM_SAFEDIR); + $id = $api->createRoom($roomId, "true"); + $messageAction = "updated"; + $messageProduct = "room"; + break; + case "delete" : + if($api->getPrefix()!="") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + else + $roomId = required_param('id', PARAM_SAFEDIR); + + $id = $api->deleteRoom($roomId); + //delte the activity linked to this room + if (! liveclassroom_delete_all_instance_of_room($roomId)) { + notify("Could not delete the activities for the room: $roomId"); + } + $messageAction = "deleted"; + $messageProduct = "room"; + break; + case "openContent" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/carousels.epl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "openReport" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:reports.php?id=' . $roomId . '&hzA=' . $authToken); + exit(); + break; + case "openAdvancedMedia" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/media.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "openAdvancedRoom" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/properties.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "getDialInformation" : + $roomId = required_param('id', PARAM_SAFEDIR); + $select_room = $api->getRoom($roomId); + + + if ($list_attributes["studentView"] == "true" || $session->isInstructor() == false) + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), null, $select_room->getParticipantPin(), $api->getPhoneNumbers()); + else + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), $select_room->getPresenterPin(), $select_room->getParticipantPin(), $api->getPhoneNumbers()); + echo $xml->getXml(); + break; + case "saveSettings": + if($api->getPrefix()!="") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + else + $roomId = required_param('id', PARAM_SAFEDIR); + $id = $api->createRoom($roomId, "true"); + break; + } + + + if ($action == "saveSettings") + { + echo "good"; + exit(); + } + + if (isset ($list_attributes["createWorkflow"]) && $list_attributes["createWorkflow"] == "true") { + +?> + <script> + parent.location.href="<?php echo $CFG->wwwroot . '/course/mod.php?section=0&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom&roomId=' . $id ?>" + </script> + <? + } + else{ + + + header('Location: welcome.php?id=' .$session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction. '&messageProduct=' . $messageProduct); + } +} +else { + header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session'); +} +?> \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-08-01 14:04:16 UTC (rev 193) @@ -21,9 +21,9 @@ * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * - * Author: Hazan Samy * + * Author: Hazan Samy * * * - * Date: October 2006 * + * Date: October 2006 * * * ******************************************************************************/ @@ -31,131 +31,61 @@ /// This page is to generate the list of rooms and archives + + require_once("../../config.php"); require_once("lib.php"); - - +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); +require_once("lib/common/XmlArchive.php"); +require_once("lib/common/XmlOrphanedArchive.php"); +require_once("lib/common/XmlRoom.php"); +require_once("lib/common/WimbaXml.php"); + if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } //TODO: Change this to be using (required|optional)_param -$params['time'] = required_param('time', PARAM_INT); -if(empty($_POST)){ - $params = $_GET; -} -else { - $params = $_POST; -} -$courseid = required_param('enc_course_id', PARAM_INT); -$userid = liveclassroom_get_teacher_userid($courseid); - - -if(isstudent($courseid)) { //Student - $isteacher = 0; +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + } -else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher - $isteacher = 1; +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + } -if(strstr($CFG->release,"1.7")) { // 1.7.* version - if (iscreator()) { // Course Creator - $isteacher = 1; - } - else if (!isteacheredit($courseid)) { // Non-editing Teacher - $isteacher = 0; - } -} - -if (!liveclassroom_init_session($params)) { - error("ExpiredSessionException"); +if(isset($params["error"])){ + $display=$uiManager->setError(get_string ($params["error"], 'liveclassroon')); } - -$xmldoc = domxml_new_doc("1.0"); - -$root = $xmldoc->create_element('root'); - -$root->append_child(liveclassroom_get_session_params($xmldoc,$params)); - -$windows = $xmldoc->create_element('windows'); - -//HEADER BAR -$windows->append_child(liveclassroom_create_headerbar($xmldoc)); - - -//TOOL BAR -$toolbar = $xmldoc->create_element('windowsElement'); -$tbtype = $xmldoc->create_element('type'); -$tbtype->append_child($xmldoc->create_text_node("toolBar")); -$toolbar->append_child($tbtype); - -$tbelementParameters = $xmldoc->create_element("windowsElementParameters"); - -$menubar = $xmldoc->create_element('menuElements'); - -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "")); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",'')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchNew('generateSettings.php',Management,'new','LiveClassroom','MainLecture')", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()','')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php',Management,'update','false')", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "","")); - -$tbelementParameters->append_child($menubar); -$toolbar->append_child($tbelementParameters); - -$windows->append_child($toolbar); - -// MESSAGE BAR -if (isset($params['messageType'])) { - $windows->append_child(liveclassroom_create_message($xmldoc, liveclassroom_get_message($params['messageType']))); +else +{ + + $session=new WimbaMoodleSession($params); + if(isset($params["messageProduct"]) && isset($params["messageAction"])) + $message=get_string("message_" . $params["messageProduct"] . "_start", "liveclassroom")." ".$params["messageProductName"]." ".get_string("message_" . $params["messageAction"] . "_end","liveclassroom"); + $api=new LCAction($session,$CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword,$CFG->dataroot); + + $uiManager=new WimbaUI($session,$api); + if($session->error==false)//good + { + $display=$uiManager->getLCPrincipalView($message); + } + else{ + if($session->error=="session") + $display=$uiManager->setError(get_string ('error_session', 'liveclassroon')); + else if($session->error=="signature") + $display=$uiManager->setError(get_string ('error_signature', 'liveclassroon')); + } } - -// LIST -$list = $xmldoc->create_element('windowsElement'); -$typeWindowsElement = $xmldoc->create_element('type'); -$typeWindowsElement->append_child($xmldoc->create_text_node("list")); -$list->append_child($typeWindowsElement); - -$elementParameters = $xmldoc->create_element('windowsElementParameters'); - -$products = $xmldoc->create_element('products'); - -// LIST PRODUCTS - -$listProducts = $xmldoc->create_element('listProducts'); - -$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'1','toggleimgmain','productType','Lecture rooms')); -$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'2','toggleimgbreakout','productType','Discussion rooms')); - -$products->append_child($listProducts); - -// PRODUCTS CONTENT - - -$products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); - -$elementParameters->append_child($products); - -$list->append_child($elementParameters); - -$windows->append_child($list); - -$root->append_child($windows); - -$xmldoc->append_child($root); - -if(LCAPI_DEBUG) { - $xmldoc->dump_file($CFG->dataroot . "/roomlist.xml", false, true); -} - -$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string - -$finalstring = str_replace("\n", '', $xmlstring); - -echo $xmlstring; -?> \ No newline at end of file +echo $display; +?> Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-08-01 14:04:16 UTC (rev 193) @@ -30,1195 +30,77 @@ /// This page is to generate the settings of a room or archive require_once("../../config.php"); require_once("lib.php"); +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaXml.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } -$courseid = required_param('enc_course_id', PARAM_INT); -$signature = required_param('signature', PARAM_ALPHANUM); -$action = required_param('action', PARAM_ALPHA); - - $MAINLECTURE = 'MainLecture'; - $DISCUSSIONROOM = 'Discussion'; - $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom'; - - if (!liveclassroom_init_session($_GET)) { - error("ExpiredSessionException"); - } - - if($action == 'update') { - $roomId = required_param('id', PARAM_SAFEDIR ); - $room_info = lcapi_get_room_info($roomId); - - if(liveclassroom_is_lecturehall($roomId,$courseid)) { - $isLectureRoom = true; - } - else { - $isLectureRoom = false; - } - session_start(); // session to store the previous types of the room - } - else { - $room_info = array(); - } - $contextDisplay='all'; - - $xmldoc = domxml_new_doc("1.0"); - - $root = $xmldoc->create_element('root'); - - $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET)); - - $windows = $xmldoc->create_element('windows'); +$action = optional_param('action', PARAM_ALPHA); - //HEADER BAR - $windows->append_child(liveclassroom_create_headerbar($xmldoc)); + $currentIdtab= optional_param('idtab', '',PARAM_ALPHA); +$params = array (); +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + +} +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + +} - // CONTEXT BAR - - $contextbar = $xmldoc->create_element('windowsElement'); - $cbtype = $xmldoc->create_element('type'); - $cbtype->append_child($xmldoc->create_text_node("contextBar")); - $contextbar->append_child($cbtype); - $cbelementParameters = $xmldoc->create_element("windowsElementParameters"); - $contextbarinformations = $xmldoc->create_element("contextBarInformations"); - $cbname = $xmldoc->create_element("name"); - if($action=="update") { - $cbname->append_child($xmldoc->create_text_node($room_info[LCAPI_ATTR_LONGNAME])); - } - else $cbname->append_child($xmldoc->create_text_node("New room")); - $contextbarinformations->append_child($cbname); - $cbcontext = $xmldoc->create_element("context"); - $cbcontext->append_child($xmldoc->create_text_node(liveclassroom_get_message("Settings"))); - $contextbarinformations->append_child($cbcontext); - $cbproduct = $xmldoc->create_element("product"); - $cbproduct->append_child($xmldoc->create_text_node(liveclassroom_get_message("Live Classroom"))); - $contextbarinformations->append_child($cbproduct); - - $cbelementParameters->append_child($contextbarinformations); - - $contextbar->append_child($cbelementParameters); - - $windows->append_child($contextbar); - - // SETTINGS - - $settings = $xmldoc->create_element('windowsElement'); - $settingstype = $xmldoc->create_element('type'); - $settingstype->append_child($xmldoc->create_text_node("settings")); - $settings->append_child($settingstype); - - $settingsElementParameters = $xmldoc->create_element("windowsElementParameters"); - - - $panelsSettings = $xmldoc->create_element('panelsSettings'); - - // -------------- ROOM INFO ------------------- - $panelSettings = $xmldoc->create_element('panelSettings'); - // ROOM INFO PANEL INFO +$session=new WimbaMoodleSession($params); +if($session->error==false)//good +{ + if($action == 'update') { + $api=new LCAction($session,$CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword,$CFG->dataroot); + $roomId = required_param('id', PARAM_SAFEDIR ); + $room_info = $api->getRoom($roomId); + if($room_info!=false){ + + $uiManager=new WimbaUI($session,$api,$currentIdtab); + $uiManager->setCurrentProduct("liveclassroom",$room_info); + } + else { + //problem to get the vt resource + $display=$uiManager->setError(get_string ('error_connection_lc', 'liveclassroon')); - $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', liveclassroom_get_message('Room Info'), "1", "block")); - // ROOM INFO CONTENT - $panelContent = $xmldoc->create_element('panelContent'); - - // FIRST LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", - $parameters=array("class" => "alert", "value" => "*") )); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", - $parameters=array("value" => liveclassroom_get_message("Title: ")) )); - $panelLine->append_child($linepart); - - $parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text"); - if($action=="update"){ - $parameters['value'] = $room_info[LCAPI_ATTR_LONGNAME]; - } - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters)); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - // SECOND LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", - $parameters=array("value" => liveclassroom_get_message("Description: ")))); - $panelLine->append_child($linepart); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", - $parameters=array("cols" => "40", "id" => "description", - "value" => $room_info[LCAPI_ATTR_DESCR], - "name" => "description", "rows" => "4") )); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - - if(($room_info[LCAPI_ATTR_ARCHIVE]!=1) || ($roomId == "")) { - // THIRD LINE - $panelLine = $xmldoc->create_element('panelLine'); - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($panelLineStyle); - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", - $parameters=array("value" => liveclassroom_get_message("Type : ")))); - $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", - "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - if(($action=="update") && ($isLectureRoom==true)) - { - $_SESSION['led']='instructor'; - $parameters['checked']=true; - } - else if($action=="new") - { - $parameters['checked']=true; - } - else - { - $parameters['checked']=true; - } - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters)); - $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", - "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters)); - $panelLine->append_child($linepart); - - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", - $parameters=array("for" => "led_instructor", "valign" => "top", "value" => liveclassroom_get_message("Lecture room") ) )); - $panelLine->append_child($linepart); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); - $panelLine->append_child($linepart); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Instructors lead the presentation")))); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - // FOURTH LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>""))); - $panelLine->append_child($linepart); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $x... [truncated message content] |