[Hw4mdl-svn] SF.net SVN: hw4mdl: [119] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-12-22 10:01:23
|
Revision: 119 http://svn.sourceforge.net/hw4mdl/?rev=119&view=rev Author: shazan Date: 2006-12-22 02:01:20 -0800 (Fri, 22 Dec 2006) Log Message: ----------- Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/manageRoomAction.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/welcome.php Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/api.php 2006-12-22 10:01:20 UTC (rev 119) @@ -40,7 +40,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package liveclassroom */ -//error_reporting(E_ALL); + //require_once('System.php'); require_once('lib.php'); Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-22 10:01:20 UTC (rev 119) @@ -52,17 +52,16 @@ $courseid = $params['enc_course_id']; - + $userid = liveclassroom_api_get_teacher_user_id($courseid); if(isteacher($courseid, $USER->id) ) { - $userid = liveclassroom_api_get_teacher_user_id($courseid); + $isteacher = 1; } else if (isstudent($courseid) ) { - $userid = liveclassroom_api_get_student_user_id($courseid); + //$userid = liveclassroom_api_get_student_user_id($courseid); $isteacher = 0; - } if (!liveclassroom_init_session($params)) { @@ -94,7 +93,7 @@ $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken'])); $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', "launchAjaxRequest('generateSettings.php','Management','new','true')", '')); + $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()','')); @@ -135,7 +134,7 @@ // PRODUCTS CONTENT - $products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); + $products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); $elementParameters->append_child($products); Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-22 10:01:20 UTC (rev 119) @@ -28,26 +28,27 @@ ******************************************************************************/ /* $Id$ */ - /// This page is to generate the settings of a room or archive - - require_once("../../config.php"); + // require_once($CFG->dirroot.'/config.php'); + require_once("../../config.php"); require_once("lib.php"); require_once("api.php"); - // Variables needed global $CFG; if (version_compare(PHP_VERSION,'5','>=')) { require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); } - + $courseid = $_GET['enc_course_id']; $signature = $_GET['signature']; $action = $_GET['action']; - - if (!liveclassroom_init_session($_GET)) { + $MAINLECTURE = 'MainLecture'; + $DISCUSSIONROOM = 'Discussion'; + $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom'; + + if (!liveclassroom_init_session($_GET)) { error("ExpiredSessionException"); } @@ -66,18 +67,20 @@ $room_info = array(); } $contextDisplay='all'; + + $xmldoc = domxml_new_doc("1.0"); - $xmldoc = domxml_new_doc("1.0");//new DomDocument(); + $root = $xmldoc->create_element('root'); - $root = $xmldoc->create_element('root'); - $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET)); + $windows = $xmldoc->create_element('windows'); - - // HEADER BAR - + + //HEADER BAR $windows->append_child(liveclassroom_create_headerbar($xmldoc)); + + // CONTEXT BAR $contextbar = $xmldoc->create_element('windowsElement'); @@ -128,7 +131,11 @@ // 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); @@ -138,7 +145,7 @@ $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); @@ -161,7 +168,7 @@ $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); @@ -178,6 +185,10 @@ // 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); @@ -203,7 +214,7 @@ $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); @@ -221,6 +232,9 @@ if(($room_info['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); @@ -229,6 +243,7 @@ $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); @@ -239,7 +254,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") )); $panelLine->append_child($linepart); - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ; + $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; if(($action=="update") && ($isLectureRoom==true)) { $_SESSION['led']='instructor'; @@ -266,12 +281,12 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "mainLectureRoom","input", $parameters)); + $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(\"mainLectureRoom\")") ; + $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)); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters)); $panelLine->append_child($linepart); @@ -290,6 +305,10 @@ // 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); @@ -299,6 +318,7 @@ $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); @@ -314,6 +334,7 @@ $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); @@ -321,24 +342,25 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ; + $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters)); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters)); $panelLine->append_child($linepart); - $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ; + $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; if(($action=="update") && ($isLectureRoom==false)) { $_SESSION['led']='student'; $parameters['checked']=true; + } else { $parameters['checked']=true; } - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters)); + $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_student", "value" => "Discussion room" ) )); @@ -357,14 +379,13 @@ $panelsSettings->append_child($panelSettings); + - - // ----------------- MEDIA ------------------ $panelSettingsM = $xmldoc->create_element('panelSettings'); // MEDIA PANEL INFO - $panelSettingsM->append_child(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none')); + $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none')); // MEDIA CONTENT $panelContentM = $xmldoc->create_element('panelContent'); @@ -372,6 +393,10 @@ // 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); @@ -403,14 +428,19 @@ // 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(" ")); + $panelLineStyle->append_child($xmldoc->create_text_node("subOption")); $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); @@ -447,14 +477,17 @@ // 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(" ")); + $panelLineStyle->append_child($xmldoc->create_text_node("subOption")); $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); @@ -484,6 +517,9 @@ //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); @@ -491,7 +527,7 @@ $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); @@ -520,17 +556,19 @@ // HIDE LINE $panelLine = $xmldoc->create_element('panelLine'); + $panelLineStyle = $xmldoc->create_element('style'); $panelLineStyle->append_child($xmldoc->create_text_node("hide")); $panelLine->append_child($panelLineStyle); $panelLineId = $xmldoc->create_element('id'); $panelLineId->append_child($xmldoc->create_text_node("roomId_row")); $panelLine->append_child($panelLineId); + $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); @@ -556,6 +594,9 @@ //FIFTH 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); @@ -563,6 +604,7 @@ $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")); @@ -592,7 +634,7 @@ $panelSettings = $xmldoc->create_element('panelSettings'); // FEATURES PANEL INFO - $panelSettings->append_child(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none')); + $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none')); @@ -601,6 +643,9 @@ // 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); @@ -608,6 +653,7 @@ $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); @@ -628,6 +674,9 @@ // 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); @@ -635,6 +684,7 @@ $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); @@ -647,15 +697,18 @@ } else $parameters['checked']=true; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'mainLecture', "input", $parameters) ); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'mainLecture',"label", $parameters=array("value" => "Enable Students to use AppShare tool") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN","label", $parameters=array("value" => "Enable Students to use AppShare tool") )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); // 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); @@ -675,20 +728,23 @@ } else $parameters['checked']=true; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) ); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable Archiving") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Archiving") )); $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 = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); $colspan = $xmldoc->create_element('colspan'); @@ -703,15 +759,18 @@ } else $parameters['checked']=true; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) ); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable Appshare") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Appshare") )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); // FIFTH 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); @@ -731,9 +790,9 @@ } else $parameters['checked']=true; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) ); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable On-The-Fly PPT Import") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -746,13 +805,16 @@ // ------------------ CHAT -------------------- // CHAT PANEL INFO $panelSettings = $xmldoc->create_element('panelSettings'); - $panelSettings->append_child(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none')); + $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none')); // CHAT 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); @@ -780,8 +842,11 @@ // 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(" ")); + $panelLineStyle->append_child($xmldoc->create_text_node("subOption")); $panelLine->append_child($panelLineStyle); $linepart = $xmldoc->create_element('panelLinePart'); $style = $xmldoc->create_element('style'); @@ -807,8 +872,11 @@ // 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(" ")); + $panelLineStyle->append_child($xmldoc->create_text_node("subOption")); $panelLine->append_child($panelLineStyle); $linepart = $xmldoc->create_element('panelLinePart'); $style = $xmldoc->create_element('style'); @@ -833,6 +901,9 @@ // 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); @@ -866,6 +937,9 @@ // 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); @@ -893,6 +967,9 @@ // 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); @@ -900,6 +977,7 @@ $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); @@ -912,6 +990,9 @@ // 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); @@ -954,6 +1035,9 @@ $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); @@ -1003,6 +1087,9 @@ // FIFTH 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); @@ -1016,34 +1103,36 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAccess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ; + $parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAcess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ; if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){ $parameters['checked']=true; } $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled guest access") )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); - // SIXTH LINE + // SIXTH LINE - HIDE + $panelLine = $xmldoc->create_element('panelLine'); + $panelLineStyle = $xmldoc->create_element('style'); $panelLineStyle->append_child($xmldoc->create_text_node("hide")); $panelLine->append_child($panelLineStyle); $panelLineId = $xmldoc->create_element('id'); $panelLineId->append_child($xmldoc->create_text_node("launcher_link_row")); - $panelLine->append_child($panelLineId); + $panelLine->append_child($panelLineId); - $linepart = $xmldoc->create_element('panelLinePart'); $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); + $style->append_child($xmldoc->create_text_node(" ")); $linepart->append_child($style); $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); + $colspan->append_child($xmldoc->create_text_node("2")); $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); @@ -1073,13 +1162,17 @@ $windows->append_child($settings); //VALIDATION BAR - $windows->append_child(liveclassroom_create_validationbar($xmldoc)); + if($action == 'update') { + $windows->append_child(liveclassroom_create_validationbar($xmldoc, $roomId)); + } + else $windows->append_child(liveclassroom_create_validationbar($xmldoc, "")); $root->append_child($windows); $xmldoc->append_child($root); + $xmldoc->dump_file("choice.xml", false, true); $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string $finalstring = str_replace("\n", '', $xmlstring); Modified: trunk/moodle/mod/liveclassroom/index.php =================================================================== --- trunk/moodle/mod/liveclassroom/index.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/index.php 2006-12-22 10:01:20 UTC (rev 119) @@ -30,8 +30,8 @@ /* $Id$ */ /// This page lists all the instances of liveclassroom in a particular course -error_reporting(E_ALL); + require_once("../../config.php"); require_once("lib.php"); Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 10:01:20 UTC (rev 119) @@ -37,7 +37,7 @@ $LIVECLASSROOM_TEACHER_SUFFIX = "_T"; //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX $LIVECLASSROOM_STUDENT_SUFFIX = "_S"; //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX - +$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs /** * Validate the data in passed in the configuration page * @param $config - the information from the form mod.html @@ -45,12 +45,9 @@ */ function liveclassroom_process_options ($config) { global $CFG; - global $LIVECLASSROOM_LOGS; - $timenow = time(); - if(empty($config->servername)){ - add_to_log("", "liveclassroom", "URL", "$LIVECLASSROOM_LOGS?type=errorUrlUnavailable&time=$timenow", "URL unavailable"); + add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable"); error(get_string('wrongconfigurationURLunavailable', 'liveclassroom')); } else if (!liveclassroom_api_authenticate($config->servername, @@ -73,22 +70,19 @@ /// (defined by the form in mod.html) this function /// will create a new instance and return the id number /// of the new instance. - global $LIVECLASSROOM_LOGS; - + $liveclassroom->timemodified = time(); # May have to add extra stuff in here # $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - - $timenow = time(); - - + if($result = insert_record("liveclassroom", $liveclassroom)) { - add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" added"); + add_to_log($liveclassroom->course, "liveclassroom", "Add activity", liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added"); + } else { - add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=errorAddInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" has not been added"); + add_to_log($liveclassroom->course, "liveclassroom", "Add activity", liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added"); $result=false; } @@ -101,12 +95,10 @@ /// (defined by the form in mod.html) this function /// will update an existing instance with new data. - global $LIVECLASSROOM_LOGS; - $liveclassroom->timemodified = time(); $liveclassroom->id = $liveclassroom->instance; $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - $timenow = time(); + // Need to update the section @@ -133,7 +125,7 @@ error("Could not update the course module with the correct section"); } - add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=updateInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been updated with success"); + add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success"); return update_record("liveclassroom", $liveclassroom); /* @@ -153,23 +145,20 @@ /// Given an ID of an instance of this module, /// this function will permanently delete the instance /// and any data that depends on it. - global $LIVECLASSROOM_LOGS; - if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) { return false; } $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - $timenow = time(); $result = true; # Delete any dependent records here # if (! delete_records("liveclassroom", "id", $liveclassroom->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." deletion failed"); + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed"); $result = false; } - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been deleted with success"); + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success"); return $result; } @@ -284,8 +273,9 @@ */ function liveclassroom_create_rooms ($course) { - //teacher is the lead of the presentation - liveclassroom_create_room($course->id, "Main classroom", true, liveclassroom_api_give_lectureroom_attributes()); + //teacher is the lead of the presentation + + liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes()); //teachers and students have the same rights liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes()); @@ -494,12 +484,11 @@ /// Given an ID of an instance of this module, /// this function will permanently delete the instance /// and any data that depends on it. - global $LIVECLASSROOM_LOGS; $result = true; if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) { $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - $timenow = time(); + # Delete any dependent records here # foreach($liveclassrooms as $liveclassroom){ @@ -508,18 +497,18 @@ error("Course Module ID was incorrect"); } if (! delete_course_module($cm->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllcm&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&cm=".$cm->id, "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); $result = false; //Delete a course module and any associated data at the course level (events) // notify("Could not delete the $cm->id (coursemodule)"); } if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) { - add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAlldb&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); $result = false; } //delete in the course section too if (! delete_mod_from_section($cm->id, "$cm->section")) { - add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllsection&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&cm=".$cm->id."§ion=".$cm->section, "Delete all activities", "Could not delete the ".$cm->id." from that section"); + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section"); $result = false; //notify("Could not delete the $mod->modulename from that section"); } @@ -527,7 +516,7 @@ } } - add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=deleteAll&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); return $result; } @@ -647,7 +636,7 @@ $validationelement = $xmldoc->create_element("validationElement"); $vtype = $xmldoc->create_element("type"); $vtype->append_child($xmldoc->create_text_node("validationButton")); - $validationelement->append_child($vtype); + $validationelement->append_child($vtype); $vparameters = $xmldoc->create_element("parameters"); @@ -691,7 +680,7 @@ * Uses liveclassroom_create_validation_comment and liveclassroom_create_validation_button * Return a DOM document element which represent the validation bar **/ -function liveclassroom_create_validationbar($xmldoc){ +function liveclassroom_create_validationbar($xmldoc,$roomId){ $headerbar = $xmldoc->create_element('windowsElement'); @@ -722,7 +711,7 @@ } $parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName"); - $actionParameters = array("manageRoomAction.php", "$submit"); + $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId"); $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters)); @@ -871,9 +860,7 @@ * return a string with all the parameters if the signature is ok, false if not (HACKING) */ function liveclassroom_init_session($request){ - - global $LIVECLASSROOM_LOGS; - + if(time() <= ($request['time']+1800)) { $enc_params = array(); @@ -891,7 +878,7 @@ } if(strcmp(md5($signature), $request['signature'])!=0) { - add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize."); + add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize."); error("Signature is not recognize."); return false; @@ -900,7 +887,7 @@ return true; } else { - add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSessionTimeOut", "Init session", "Session has timed out due to inactivity."); + add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity."); error("The session has timed out due to inactivity. Please reload the page to reconnect."); return false; @@ -916,11 +903,15 @@ function liveclassroom_get_url_params($courseid) { global $USER; - +/* + //For moodle 1.7 + if(strstr($CFG->release,"1.6")) // 1.6.* version + else if(strstr($CFG->release,"1.7")) // 1.7.* version +*/ if (isstudent($courseid)) { $role='Student'; } - else if (isteacher($courseid, $USER->id)) { + else if (isteacher($courseid, $USER->id) || isteacheredit($courseid)) { $role='Instructor'; } $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role); @@ -960,6 +951,8 @@ } $lcServerUrl = $xmldoc->create_element("lcServerUrl"); $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername)); + $vtServerUrl = $xmldoc->create_element("vtServerUrl"); + $vtServerUrl->append_child($xmldoc->create_text_node("")); $signature = $xmldoc->create_element("signature"); $signature->append_child($xmldoc->create_text_node($sessionParams['signature'])); @@ -971,6 +964,7 @@ $information->append_child($courseId); $information->append_child($authToken); $information->append_child($lcServerUrl); + $information->append_child($vtServerUrl); $information->append_child($signature); return $information; @@ -1068,4 +1062,22 @@ return $return; } +/* +* Send info to the logs system +* @param $type : type of the log +* @param $parameters : string with the parameters needed +* return a string which is the link to the logs file +*/ +function liveclassroom_send_logs($type,$parameters) { + + global $LIVECLASSROOM_LOGS; + + + $link = $LIVECLASSROOM_LOGS."?type=$type"; + $link .= "&$parameters"; + $link .= "&time=".time(); + + return $link; +} + ?> Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-22 10:01:20 UTC (rev 119) @@ -52,6 +52,8 @@ session_start(); // to get the previous type of the room + add_to_log($COURSE->id, "liveclassroom", "Modify Room", "gaga", $_GET['id']); + if(!empty($_POST)) { while (list($key, $val) = each($_POST)) { $list_attributes[$key] = $val; @@ -78,6 +80,7 @@ } else if($_GET['action']=='updateRoom') { //Available + if (!isset($list_attributes['preview'])) $list_attributes['preview']=1; //Test if the type of room has been changed @@ -113,6 +116,7 @@ if (! liveclassroom_delete_all_instance_of_room($_GET['id'])) { notify("Could not delete the instances of the room"); } + //delete the room on the server liveclassroom_api_delete_room($_GET['id']); Modified: trunk/moodle/mod/liveclassroom/mod.html =================================================================== --- trunk/moodle/mod/liveclassroom/mod.html 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/mod.html 2006-12-22 10:01:20 UTC (rev 119) @@ -2,9 +2,13 @@ <!-- It is used from /course/mod.php. The whole instance is available as $form. --> <?php -//error_reporting(E_ALL); + require_once($CFG->dirroot.'/calendar/lib.php'); include_once($CFG->dirroot.'/mod/liveclassroom/lib.php'); + require_once($CFG->dirroot.'/version.php'); + + + $id = optional_param('id', 0, PARAM_INT); require_once("../config.php"); @@ -12,7 +16,7 @@ require_login($course->id); if (!isteacher($course->id, $USER->id)) { //to Be sure - error("You need to be a teacher in this course to c reate an instance"); + error("You need to be a teacher in this course to create an instance"); } // Check if the rooms exist on the server @@ -166,7 +170,7 @@ </tr> <tr valign="top"> - <td align="right"><font color="red">*</font><font class="fontCurrent"><?php print_string("name") ?> :</font></td> + <td align="right"><font color="red">*</font><font class="fontCurrent"><?php print_string('name', 'liveclassroom') ?> :</font></td> <td align="left"> <input type="text" name="name" size="30" <?php if(isset($action) && $action=="update") echo "value=$liveclassroom->name"; ?> > @@ -239,8 +243,8 @@ if (!$thissection = get_record('course_sections', 'course',$course->id, 'section', $section)) { notify('Error getting course_sections!'); } - $desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id); - $descTxt = txt($desc); + $desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id); + $descTxt = txt($desc); $minidesc = substr($descTxt, 0, 20); if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) ) { Modified: trunk/moodle/mod/liveclassroom/welcome.php =================================================================== --- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-21 10:16:12 UTC (rev 118) +++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 10:01:20 UTC (rev 119) @@ -29,7 +29,7 @@ /* $Id$ */ -/// This page is to display the widget - Rooms and archives list +/// This page is to display the tyes - Rooms and archives list @@ -39,7 +39,7 @@ $id = optional_param('id', 0, PARAM_INT); $course = optional_param('course', 0, PARAM_INT); - $roomname = optional_param('idroomname', 0, PARAM_TEXT); +// $roomname = optional_param('idroomname', 0, PARAM_TEXT); global $CFG; @@ -83,7 +83,7 @@ <script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script> - <script language="javascript" src="js/Ajax.js"></script> + <script language="javascript" src="js/ajax.js"></script> <script language="javascript" src="js/xmldom.js"></script> <script language="javascript" src="js/verifForm.js"></script> <script language="javascript" src="js/constants.js"></script> @@ -102,7 +102,7 @@ if(currentId!="") { - if( (typeSelect=="mainLectureRoom") || (typeSelect == "discussionRoom") ) { + if( (typeSelect=="MainLecture") || (typeSelect == "Discussion") ) { var complete_url=url+'?roomId='+currentId+'&id=<?php p($id) ?>§ion=0&sesskey=<?php echo sesskey(); ?>&'+param; window.open(complete_url,"_top"); @@ -127,14 +127,14 @@ if(currentId!="") { - if (confirm("Are you sure you want to delete this room")) { - if (confirm("Are you really sure you want to delete this room")) { + + if (confirm("Are you really sure you want to delete this room ?")) { var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ; location.href = complete_url //var w = window.open(complete_url, '_top'); // w.focus(); } - } + } @@ -174,7 +174,7 @@ { ?> - DisplayFirstPage(); + DisplayFirstPage("generateListRooms.php"); <?php } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |