[Hw4mdl-svn] SF.net SVN: hw4mdl: [111] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-12-15 15:23:00
|
Revision: 111 http://svn.sourceforge.net/hw4mdl/?rev=111&view=rev Author: shazan Date: 2006-12-15 07:22:58 -0800 (Fri, 15 Dec 2006) Log Message: ----------- add activity & configuration forms prettier Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/config.html trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/liveclassroom/welcome.php Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/api.php 2006-12-15 15:22:58 UTC (rev 111) @@ -46,7 +46,7 @@ $LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix(); -$LIVECLASSROOM_API_ADMIN = 'admin/api/api.pl?'; +$LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?'; $LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP'; $LIVECLASSROOM_API_FUNCTION_CREATE_USER = 'function=createUser'; $LIVECLASSROOM_API_FUNCTION_MODIFY_USER = 'function=modifyUser'; Modified: trunk/moodle/mod/liveclassroom/config.html =================================================================== --- trunk/moodle/mod/liveclassroom/config.html 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/config.html 2006-12-15 15:22:58 UTC (rev 111) @@ -12,7 +12,7 @@ </tr> <tr valign="top"> - <td align="right"><?php print_string('servername', 'liveclassroom')?>:</td> + <td align="right"><?php print_string('servername', 'liveclassroom')?> :</td> <td> <input name="servername" type="text" size="30" value="<?php p($CFG->liveclassroom_servername) ?>" /> </td> @@ -21,25 +21,39 @@ </td> </tr> <tr valign="top"> - <td align="right"><?php print_string('adminusername', 'liveclassroom')?>:</td> + <td align="right"><?php print_string('adminusername', 'liveclassroom')?> :</td> <td> - <input name="adminusername" type="text" size="20" value="<?php p($CFG->liveclassroom_adminusername) ?>" /> + <input name="adminusername" type="text" size="30" value="<?php p($CFG->liveclassroom_adminusername) ?>" /> </td> <td> <?php print_string("configadminusername", "liveclassroom") ?> </td> </tr> <tr valign="top"> - <td align="right"><?php print_string('adminpassword', 'liveclassroom')?>:</td> + <td align="right"><?php print_string('adminpassword', 'liveclassroom')?> :</td> <td> - <input name="adminpassword" type="text" size="20" value="<?php p($CFG->liveclassroom_adminpassword) ?>" /> + <input name="adminpassword" type="text" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" /> </td> <td> <?php print_string("configadminpassword", "liveclassroom") ?> </td> </tr> - <tr> +<td><br /></td> +</tr> +<tr valign="top"> + <td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td> + <td> + <?php print_string("lcversionnumber", "liveclassroom") ?> + </td> +</tr> +<tr valign="top"> + <td align="right"><?php print_string('integrationversion', 'liveclassroom')?> :</td> + <td> + <?php print_string("integrationversionnumber", "liveclassroom") ?> + </td> +</tr> +<tr> <td colspan="3" align="center"> <input type="submit" value="<?php print_string("savechanges") ?>" /></td> </tr> Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 15:22:58 UTC (rev 111) @@ -30,10 +30,8 @@ /* $Id$ */ /// This page is to generate the list of rooms and archives - error_reporting(E_ALL); - - - + + require_once("../../config.php"); require_once("lib.php"); require_once("api.php"); @@ -72,7 +70,7 @@ } - $xmldoc = domxml_new_doc("1.0");// new DomDocument(); + $xmldoc = domxml_new_doc("1.0"); $root = $xmldoc->create_element('root'); @@ -135,11 +133,9 @@ $products->append_child($listProducts); // PRODUCTS CONTENT -// $productContent = $xmldoc->create_element('productsContent'); + $products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); - -// $products->append_child($productContent); $elementParameters->append_child($products); @@ -151,7 +147,7 @@ $xmldoc->append_child($root); - $xmlstring = $xmldoc->dump_mem(true); //saveXML(); // Xml datas into a string + $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string $finalstring = str_replace("\n", '', $xmlstring); echo $xmlstring; Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 15:22:58 UTC (rev 111) @@ -38,7 +38,7 @@ // Variables needed global $CFG; - if (version_compare(PHP_VERSION,'5','>=')) { + if (version_compare(PHP_VERSION,'5','>=')) { require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); } Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-15 15:22:58 UTC (rev 111) @@ -36,13 +36,8 @@ //Suffixes used when creting the profiles account on the LC server $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 -/* - if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); - } - -*/ + /** * Validate the data in passed in the configuration page * @param $config - the information from the form mod.html @@ -943,7 +938,8 @@ function liveclassroom_get_session_params($xmldoc, $sessionParams) { // General Information - + global $CFG; + $information = $xmldoc->create_element("information"); $firstName = $xmldoc->create_element("firstName"); @@ -959,9 +955,11 @@ $courseId = $xmldoc->create_element("courseId"); $courseId->append_child($xmldoc->create_text_node($sessionParams['enc_course_id'])); if ($sessionParams['authToken'] != null) { - $authToken = $xmldoc->create_element("authToken"); - $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken'])); - } + $authToken = $xmldoc->create_element("authToken"); + $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken'])); + } + $lcServerUrl = $xmldoc->create_element("lcServerUrl"); + $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername)); $signature = $xmldoc->create_element("signature"); $signature->append_child($xmldoc->create_text_node($sessionParams['signature'])); @@ -972,6 +970,7 @@ $information->append_child($timeOfLoad); $information->append_child($courseId); $information->append_child($authToken); + $information->append_child($lcServerUrl); $information->append_child($signature); return $information; Modified: trunk/moodle/mod/liveclassroom/mod.html =================================================================== --- trunk/moodle/mod/liveclassroom/mod.html 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/mod.html 2006-12-15 15:22:58 UTC (rev 111) @@ -57,7 +57,6 @@ } // $section = get_record("course_sections", "id", $cmLiveclass->section ); - // $sectionId = $section->section; $sectionId = $_GET['sr']; $liveclassroom = get_record("liveclassroom", "id", $cmLiveclass->instance ); $action = "update"; @@ -67,40 +66,47 @@ <style> .headerBar { -padding-left:5px ; +padding-left:50px ; width:100%; +height:32px; +background-image:url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/headerbar.png"); -background-image:url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/headerbar.png"); -height:32px; border-bottom:solid 1px Black; } + .fontCurrent { font-family:Verdana; font-size:10px; } -a:link + +a.list:link { + color : #0000FF ; text-decoration : underline ; } -a:hover +a.list:hover { color : #0000FF ; - text-decoration : underline ; + text-decoration : none ; } -a:visited +a.list:visited { color : #0000FF ; text-decoration : underline ; } -a:active +a.list:active { color : #0000FF ; text-decoration : none ; } +.content +{ + margin:-5px; +} </style> <script type="text/javascript"> @@ -134,20 +140,26 @@ } </script> +<div class="content"> <form name="form" method="post" action="mod.php"> <center> +<table border="1" width="800"> +<tr><td> +<table border="0" width="100%" cellpadding="0" cellspacing="0" margin="0"> + <tr class="headerBar"> + <td align="left"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"></td> + <td align='right'></td> + </tr> +</table> + +<table border="0" width="100%" cellpadding="5" cellspacing="0" > -<table width="800" cellpadding="5" cellspacing="0" margin="0"> -<tr class="headerBar"> - <td align="left"><img height="32px" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"></td> - <td align='right'></td> -</tr> <tr> - <td><br></td> + <td><br></td><td></td> </tr> <tr valign="top"> @@ -165,7 +177,7 @@ //Display the list of the weeks ?> - <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('weeksformat', 'liveclassroom')?> :</a></font></td> + <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('weeksformat', 'liveclassroom')?> :</a></font></td> <td align="left"> <SELECT name="section"> <?php @@ -213,7 +225,7 @@ <tr valign="top"> - <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('topicformat', 'liveclassroom') ?> :</a></font></td> + <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('topicformat', 'liveclassroom') ?> :</a></font></td> <td align="left"> @@ -251,7 +263,7 @@ </tr> <tr valign="top"> - <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"><?php print_string('liveclassroomtype', 'liveclassroom')?> :</a></font></td> + <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"><?php print_string('liveclassroomtype', 'liveclassroom')?> :</a></font></td> <td align="left"> @@ -309,33 +321,27 @@ <td><br></td> </tr> -<tr > - <td colspan=2 > - <table width=100% cellpadding="0" style="border-top:#818181 1px solid; border-bottom:#818181 1px solid; background-color:#F0F0F0;"> - <tr> - <td align=left width=70% > +<tr style="border-top:1px solid; background-color:#F0F0F0;"> + <td align=left > <font color="red">*</font><font class="fontCurrent"><?php print_string('requiredfields', 'liveclassroom')?></font> - </td> - <td align=center width=15%> + </td> + <td align=right > <img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/buttons/general-cancel.png" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>'"> <?php if(isset($action) && $action=="update") $pictureUrl="$CFG->wwwroot/mod/liveclassroom/pictures/buttons/general-saveall.png"; else $pictureUrl="$CFG->wwwroot/mod/liveclassroom/pictures/buttons/general-create.png"; ?> <input type="image" src="<?php echo $pictureUrl;?>" onclick="return validate()" > - - <!-- <input type="reset" value="<?php print_string("cancel") ?>" onclick="self.location.href='view.php?id=<?php p($id)?>'" > - general-empty.png - <input type="submit" value="<?php print_string("add") ?>" />--> + </td> - - </tr> - </table> - </td> + </tr> + </table> + +</td></tr></table> <!-- These hidden variables are always the same --> <input type="hidden" name=course value="<?php p($form->course) ?>" /> <input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" /> @@ -347,4 +353,6 @@ </center> </form> + +</div> <script> TestNoRoom(); </script> \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/view.php =================================================================== --- trunk/moodle/mod/liveclassroom/view.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/view.php 2006-12-15 15:22:58 UTC (rev 111) @@ -62,158 +62,41 @@ } } - require_login($course->id); + require_login($course->id); - // add_to_log($course->id, "liveclassroom", "view", "view.php?id=$cm->id", "$liveclassroom->id"); - - // Create the session for this user if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) { error ("Cannot create session"); } -/// Print the page header - if ($course->category) { - $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; - } + $classid = $liveclassroom->type; - $strliveclassrooms = get_string("modulenameplural", "liveclassroom"); - $strliveclassroom = get_string("modulename", "liveclassroom"); - print_header("$course->shortname: $liveclassroom->name", "$course->fullname", - "$navigation <A HREF=index.php?id=$course->id>$strliveclassrooms</A> -> $liveclassroom->name", - "", "", true, update_module_button($cm->id, $course->id, $strliveclassroom), - navmenu($course, $cm)); - - -/* GROUP LATER !!!!!!!!!!!!! - -/// Check to see if groups are being used here - if ($groupmode = groupmode($course, $cm)) { // Groups are being used - $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id"); - } else { - $currentgroup = 0; - } - - if ($currentgroup) { - $groupselect = " AND groupid = '$currentgroup'"; - $groupparam = "&groupid=$currentgroup"; - } else { - $groupselect = ""; - $groupparam = ""; - } - -*//* - -// if groups are being used, get the groupid and create the LC into moodle linked to this group. - print mygroupid($course->id); - if ($groupmode = groupmode($course, $cm)) { - print $groupmode; - $test = mygroupid($course->id); - $liveclassroom->groupid = mygroupid($course->id); - - update_record("liveclassroom",$liveclassroom); - - } -*/ - /// Print the main part of the page ?> <!--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 doOpenAdmin(url) { - var w = window.open(url, 'lc_admin_popup', 'scrollbars=yes, resizable=yes, width=800, height=500'); - w.focus(); + + 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; ?>"; + } </script> <?php - $classid = $liveclassroom->type; + if ((isstudent($course->id)) or (isteacher($course->id, $USER->id))) { ?> - <body onload="javascript:startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>' )"> - </body> + <?php } ?> - <table style="background-color: #ffffff !important; border-left : 1px solid #999; border-right : 1px solid #999; border-top : 1px solid #999;border-bottom : 1px solid #999;" width="100%" cellspacing="0" cellpadding="0" border="0" align="center" summary="layout"> - <tr style="background-color:#EEEEEE; font-weight:normal; color:black;"> - <td width="70%"> - <table cellpadding="2" border="0" align="center" width="100%" valign="top" > - <tr style="background-color:#EEEEEE; font-weight:normal; color:black;"> - <td valign="top"> - <strong><font size="+1"><?php p(get_string('linksfor', 'liveclassroom'))?> <em><?php p($course->fullname)?></em>.</font> - </strong> - - </td> - </tr> - <tr ><td style="border-bottom: 1px solid #999;"><span class='fnt0'></span> - </td></tr> - - - - -<?php - if ( (isteacher($course->id, $USER->id))|| (isstudent($course->id)) ) { -?> - <tr> - <td> - <a href="javascript:startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>')"> - - <?php p(get_string("accessroomsstudent", 'liveclassroom')) ?> - </a> - </td> - </tr> - -<?php -} -?> - - <tr > - <td> - <em><font size="-1"> - <?php echo get_string ('wizard.text.1', 'liveclassroom') ?> - <a href="javascript:startWizard()" target="_self" class="external"><?php echo get_string('wizard.text.2', 'liveclassroom') ?></a> - <?php echo get_string ('wizard.text.3', 'liveclassroom') ?> - </font></em> - </td> - </tr> - </table> - </td> - <td align="right" width="30%" valign="top" style="border-left:1px solid #999;"> - <table cellpadding="2" valign="top" align="center" width="100%" border="0"> - <tr style="background-color:#EEEEEE; font-weight:normal; color:black;"> - <td> </td> - <td valign="top"> - <a href="javascript:startWizard()" title="<?php echo get_string('runwizard', 'liveclassroom') ?>" > - <img src="<?php p($CFG->liveclassroom_servername) ?>/images/wizard_logo.gif" border="0" title="<?php echo get_string('runwizard', 'liveclassroom') ?>" alt="<?php echo get_string('runwizard', 'liveclassroom') ?>"></a><br> - <em><font size="-1"> - <?php echo get_string('wizard.text2.1', 'liveclassroom')?> <a href="javascript:startWizard()" target="_self" class="external"><?php echo get_string('wizard.text2.2', 'liveclassroom')?></a> <?php echo get_string('wizard.text2.3', 'liveclassroom')?> - </font></em> - </td> - </tr> - </table> - </td> - </tr> - - </table> -</td> - </tr> - - <tr style="background-color:#EEEEEE; font-weight:normal; color:black;"><td style="border-right:1px solid #999;"> </td><td> </td></tr> - - </table> - - - -<?PHP -/// Finish the page - print_footer($course); - -?> + <script>startActivity();</script> \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/welcome.php =================================================================== --- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-15 11:04:39 UTC (rev 110) +++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-15 15:22:58 UTC (rev 111) @@ -48,24 +48,16 @@ } require_login($course->id); - if (!liveclassroom_init_session($_GET)) { error("ExpiredSessionException"); } - - - //session_start(); /// Get all required strings $strliveclassrooms = get_string("modulenameplural", "liveclassroom"); $strliveclassroom = get_string("modulename", "liveclassroom"); -/* - if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) { - error ("Cannot create session"); - } -*/ + /// Print the header if ($course->category) { @@ -161,7 +153,7 @@ <?php if(isset($_GET['addnew'])) { - ?> //alert("yep"); + ?> showPopup() var parameters=""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |