[Hw4mdl-svn] SF.net SVN: hw4mdl: [138] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
|
From: <sh...@us...> - 2006-12-28 12:50:02
|
Revision: 138
http://svn.sourceforge.net/hw4mdl/?rev=138&view=rev
Author: shazan
Date: 2006-12-28 04:49:53 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10539 : Enabled Students to use the phone is uncheckable
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/view.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -1381,6 +1381,8 @@
else //just the open archive
{
$tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid);
+ add_to_log("", "liveclassroom", "test id", "test", $userid);
+ add_to_log("", "liveclassroom", "test archive", "test", sizeof($tabarchive));
}
if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
@@ -1512,10 +1514,10 @@
$typeOrphanedArchive = $xmldoc->create_element("type");
if(liveclassroom_api_role_user_room($orphanedArchive[1], $studentuserid)=='Student') { //lecture room
- $typeOrphanedArchive->append_child($xmldoc->create_text_node("mainLectureRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("MainLecture"));
}
else{
- $typeOrphanedArchive->append_child($xmldoc->create_text_node("discussionRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("Discussion"));
}
$parametersOrphaned->append_child($typeOrphanedArchive);
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -51,15 +51,12 @@
$courseid = $params['enc_course_id'];
- $userid = liveclassroom_api_get_teacher_user_id($courseid);
- if(isteacher($courseid, $USER->id) ) {
-
- $isteacher = 1;
-
+ $userid = liveclassroom_api_get_teacher_user_id($courseid);
+
+ if(isteacher($courseid, $USER->id) ) {
+ $isteacher = 1;
}
else if (isstudent($courseid) ) {
-
- //$userid = liveclassroom_api_get_student_user_id($courseid);
$isteacher = 0;
}
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -448,15 +448,15 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "checkbox", "value" => "1", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
+ $parameters=array("type" => "checkbox", "value" => "0", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
if($action=='update'){
- if($room_info['hms_simulcast_restricted']==1){
+ if($room_info['hms_simulcast_restricted']==0){
$parameters['checked']=true;
}
else if($room_info['media_type']=="two-way-video"){
$parameters['checked']=false;
}
- else $parameters['checked']=true;
+ //else $parameters['checked']=true;
}
else $parameters['checked']=true;
@@ -499,12 +499,13 @@
$parameters=array("type" => "checkbox", "value" => "1", "id" => "two_way_enabled", "name" => "hms_two_way_enabled") ;
if($action=='update'){
if($room_info['hms_two_way_enabled']==1){
- $parameters['checked']=true;
+ $parameters['checked']=true;
}
else if($room_info['media_type']=="two-way-video"){
$parameters['checked']=false;
- }
- $parameters['checked']=true;
+ }
+
+ //$parameters['checked']=true;
}
else $parameters['checked']=true;
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -71,6 +71,8 @@
else $bool = false;
//Available
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 (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
@@ -81,8 +83,11 @@
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['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
-
+ //print_r($list_attributes);
//Test if the type of room has been changed
if($_SESSION['led']!=$list_attributes['led']) { // Type changed
@@ -95,7 +100,7 @@
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
}
}
-
+ //print_r($list_attributes);
if(!liveclassroom_api_modify_room($_GET['id'],$list_attributes)) {
notice(get_string("roommodificationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
Modified: trunk/moodle/mod/liveclassroom/view.php
===================================================================
--- trunk/moodle/mod/liveclassroom/view.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/view.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -78,25 +78,19 @@
?>
<!--script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch-7892.js'></script-->
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
+
+
<script type="text/javascript">
function startActivity(){
- startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>' )
- location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php echo $course->id; ?>";
-
+ startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>');
+ location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php echo $course->id; ?>";
}
</script>
-<?php
-
-
- if ((isstudent($course->id)) or (isteacher($course->id, $USER->id))) {
-?>
-
-
-<?php
- }
- ?>
- <script>startActivity();</script>
\ No newline at end of file
+
+ <script> startActivity(); </script>
+
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|