[Hw4mdl-svn] SF.net SVN: hw4mdl: [66] trunk/moodle/mod/liveclassroom/mod.html
Brought to you by:
jhlinder,
trollinger
|
From: <sh...@us...> - 2006-09-19 09:48:05
|
Revision: 66
http://svn.sourceforge.net/hw4mdl/?rev=66&view=rev
Author: shazan
Date: 2006-09-19 02:47:52 -0700 (Tue, 19 Sep 2006)
Log Message:
-----------
activity form updated with the weeks and the type directly choose by the widget
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/mod.html
Modified: trunk/moodle/mod/liveclassroom/mod.html
===================================================================
--- trunk/moodle/mod/liveclassroom/mod.html 2006-09-14 15:24:25 UTC (rev 65)
+++ trunk/moodle/mod/liveclassroom/mod.html 2006-09-19 09:47:52 UTC (rev 66)
@@ -26,6 +26,9 @@
if (!isset($form->descrption)) {
$form->descrption = '';
}
+if (!isset($form->section)) {
+ $form->section = '';
+}
if (empty($form->timeopen)) {
$form->timeopen = "";
$form->timerestrict = 0;
@@ -73,13 +76,39 @@
<?php
if($course->format == "weeks"){
- $form->timeopen = $course->startdate + (($form->section - 1) * 608400); ?>
+ //Display the lsit of the weeks
+ $timenow = time();
+ $weekdate = $course->startdate; // this should be 0:00 Monday of that week
+ $weekdate += 7200; // Add two hours to avoid possible DST problems
+ $section = 1;
+ $sectionmenu = array();
+ $weekofseconds = 604800;
+ $course->enddate = $course->startdate + ($weekofseconds * $course->numsections);
+ $k=0;
+ while ($weekdate < $course->enddate) {
+ $nextweekdate = $weekdate + ($weekofseconds);
+ $weekday = userdate($weekdate, '%d %B') ;
+ $endweekday = userdate($weekdate+518400, '%d %B');
+ $list_weeks[$k] = $weekday.' - '.$endweekday;
+ $k++;
+ $section++;
+ $weekdate = $nextweekdate;
+ }
+
+ ?>
<td align="right"><b><?php print_string('weeksformat', 'liveclassroom')?>:</b></td>
<td>
- <?php
- print_date_selector("openday", "openmonth", "openyear", $form->timeopen);
- print_time_selector("openhour", "openminute", $form->timeopen);
- ?>
+ <SELECT name="section">
+ <?php
+ for($i=0;$i<sizeof($list_weeks);$i++) {
+ ?>
+
+ <OPTION <?php if($_GET['section']==$i+1) { echo "selected"; }?> VALUE="<?php p($i+1) ?>"><?php p($list_weeks[$i]) ?></OPTION>
+
+ <?php
+ }
+ ?>
+ </SELECT>
</td>
<?php
}
@@ -94,8 +123,6 @@
</tr>
<?php
}
-
-
?>
</tr>
@@ -117,7 +144,7 @@
for($i=0;$i<sizeof($list_type_rooms);$i++) {
?>
- <OPTION VALUE="<?php p($list_type_rooms[$i]) ?>"><?php p($list_type_rooms[$i]) ?></OPTION>
+ <OPTION <?php if(liveclassroom_get_room_name_from_id($_GET['roomId'])==$list_type_rooms[$i]){ echo "selected"; } ?> VALUE="<?php p($list_type_rooms[$i]) ?>"><?php p($list_type_rooms[$i]) ?></OPTION>
<?php
}
@@ -125,8 +152,6 @@
?>
</SELECT>
</td>
-
-
</tr>
@@ -182,7 +207,7 @@
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
-<input type="hidden" name=section value="<?php p($form->section) ?>" />
+
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|