[Hw4mdl-svn] SF.net SVN: hw4mdl: [139] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
|
From: <sh...@us...> - 2006-12-28 13:43:26
|
Revision: 139
http://svn.sourceforge.net/hw4mdl/?rev=139&view=rev
Author: shazan
Date: 2006-12-28 05:43:22 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10546 : when a case is unchecked, the option must be written is a "0" and not a 0.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -625,11 +625,13 @@
global $COURSE;
while (list($key, $val) = each($table_attributes)) {
+
if(($key!='class_id')&&(isset($val))&&($val!="")){
+
$list_attributes .= "&".$key."=".$val;
}
}
-
+
$final_list = "&target=$roomid".$list_attributes;
$enc_list = str_replace(" ", "+", $final_list);
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -636,9 +636,7 @@
$panelSettings = $xmldoc->create_element('panelSettings');
// FEATURES PANEL INFO
$panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
-
-
// FEATURES CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -666,6 +664,7 @@
if($room_info['student_wb_enabled']==1) $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 Students to use eBoard") ));
@@ -698,9 +697,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN", "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN","label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -729,9 +728,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "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,"$DISCUSSION","label", $parameters=array("value" => "Enable Archiving") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Archiving") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -760,9 +759,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "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,"$DISCUSSION","label", $parameters=array("value" => "Enable Appshare") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Appshare") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -791,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,"$DISCUSSIONROOM", "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,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -70,10 +70,16 @@
}
else $bool = false;
//Available
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
- if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+
if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
@@ -83,10 +89,18 @@
else if($_GET['action']=='updateRoom') {
//Available
-
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+
+
+
+
//print_r($list_attributes);
//Test if the type of room has been changed
if($_SESSION['led']!=$list_attributes['led']) { // Type changed
@@ -96,6 +110,7 @@
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Student');
}
else {
+
liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Student') ;
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|