]> git.mjollnir.org Git - moodle.git/commitdiff
Full XHTML 1.0 compliance. I hope I didn't miss anything.
authordefacer <defacer>
Thu, 9 Sep 2004 10:41:23 +0000 (10:41 +0000)
committerdefacer <defacer>
Thu, 9 Sep 2004 10:41:23 +0000 (10:41 +0000)
calendar/event.php
calendar/event_edit.html
calendar/event_new.html
calendar/event_select.html
calendar/lib.php
calendar/preferences.html
calendar/view.php

index ec1af92eedf5bddae9c40f5dda2aacb37045df55..1df0b46c90b7798a41ac17155b2c08e003145db9 100644 (file)
     list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
 
     echo calendar_filter_controls('event', 'action='.$_REQUEST['action'].'&amp;type='.$_REQUEST['type'].'&amp;id='.$_REQUEST['id']);
-    echo '<p>';
+    echo '<div>';
     echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
     echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
-    echo '</p><p>';
+    echo '</div><div>';
     echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr));
     echo calendar_get_mini($courses, $groups, $users, $mon, $yr);
-    echo '</p><p>';
+    echo '</div><div>';
     echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr));
     echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
-    echo '</p>';
+    echo '</div>';
     print_side_block_end();
     print_spacer(1, 180);
     echo '</td>';
index 359b2cff9b2ef3dcdb8d9c4d1419bb5493504bd4..e8408567b03d6fbda9cb46544ece19c3a5143561 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" action="event.php" name="edit">
-<table cellpadding=5>
+<table cellpadding="5">
   <tr>
     <td style="vertical-align: top; text-align: right;">
       <?php print_string('eventname', 'calendar'); ?>:
@@ -59,7 +59,7 @@
     </td>
   </tr>
   <tr>
-    <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>"></p></td>
+    <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
   </tr>
 </table>
 <p>
index ec22db8cebe07908b27b94ba0b5d2547f2624a61..3c036bec4e7dcef548a38666aed1d09570ab9aaf 100644 (file)
@@ -3,13 +3,13 @@
     $course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
 ?>
 <form method="post" action="event.php" name="new">
-<table cellpadding=5>
+<table cellpadding="5">
   <tr>
     <td style="vertical-align: top; text-align: right;">
       <?php print_string('eventname', 'calendar'); ?>:
     </td>
     <td>
-      <input type="text" name="name" size="67" value="<?php p($form->name); ?>" /> 
+      <input type="text" name="name" size="67" value="<?php p($form->name); ?>" />
       <?php if (isset($err['name'])) formerr($err['name']); ?>
     </td>
   </tr>
@@ -18,9 +18,9 @@
       <?php print_string('eventdescription', 'calendar'); ?>:
     </td>
     <td>
-    <?php 
+    <?php
         print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
-        if (isset($err['description'])) formerr($err['description']); 
+        if (isset($err['description'])) formerr($err['description']);
     ?>
     </td>
   </tr>
@@ -29,9 +29,9 @@
       <?php print_string('eventdate', 'calendar'); ?>:
     </td>
     <td>
-      <?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?> 
-      <?php print_string('eventtime', 'calendar');?> 
-      <?php print_time_selector('starthr', 'startmin', $form->timestart) ?>  
+      <?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?>
+      <?php print_string('eventtime', 'calendar');?>
+      <?php print_time_selector('starthr', 'startmin', $form->timestart) ?>
       <?php if (isset($err['timestart'])) formerr($err['timestart']); ?>
     </td>
   </tr>
       <div>
         <input type="radio" name="duration" value="1" id="duration_yes" <?php if($form->duration == 1) echo 'checked="checked"'; ?>/>
         <label for="duration_yes"><?php print_string('durationuntil', 'calendar'); ?></label>
-        <?php print_date_selector('endday', 'endmon', 'endyr', $form->timestart + $form->timeduration);?> 
-        <?php print_string('eventtime', 'calendar');?> 
-        <?php print_time_selector('endhr', 'endmin', $form->timestart + $form->timeduration) ?>  
+        <?php print_date_selector('endday', 'endmon', 'endyr', $form->timestart + $form->timeduration);?>
+        <?php print_string('eventtime', 'calendar');?>
+        <?php print_time_selector('endhr', 'endmin', $form->timestart + $form->timeduration) ?>
         <?php if (isset($err['timeduration'])) formerr($err['timeduration']); ?>
       </div>
       <div>
         <input type="radio" name="duration" value="2" id="duration_minutes" <?php if($form->duration == 2) echo 'checked="checked"'; ?>/>
         <label for="duration_minutes"><?php print_string('durationminutes', 'calendar'); ?></label>
-        <input type="text" name="minutes" size="3" value="<?php p($form->minutes); ?>" /> 
+        <input type="text" name="minutes" size="3" value="<?php p($form->minutes); ?>" />
         <?php if (isset($err['minutes'])) formerr($err['minutes']); ?>
       </div>
     </td>
@@ -77,7 +77,7 @@
         <label for="repeat_yes">
           <?php print_string('repeatweeksl', 'calendar'); ?>
         </label>
-        <input type="text" name="repeats" size="2" value="<?php p($form->repeats); ?>" /> 
+        <input type="text" name="repeats" size="2" value="<?php p($form->repeats); ?>" />
         <?php print_string('repeatweeksr', 'calendar'); ?>
         <?php if (isset($err['repeats'])) formerr($err['repeats']); ?>
       </div>
@@ -85,7 +85,7 @@
   </tr>
 
   <tr>
-    <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>"></p></td>
+    <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
   </tr>
 </table>
 <p>
index 872c9d51224820af9f2c2ac08a8a99db53bc4c4a..e3c521c12a1b8ed5ab459d7d20c110ab1f274ed3 100644 (file)
@@ -1,37 +1,39 @@
+<form method="post" action="event.php">
 <table class="formtable">
-  <form method="post" action="event.php">
-  <p>
-  <input type="hidden" name="action" value="new" />
-  <input type="hidden" name="timestart" value="<?php echo $form->timestart; ?>" />
-  </p>
   <tr>
-    <td style="vertical-align: top; text-align: right;"><?php print_string('eventkind', 'calendar'); ?>:</td>
-    <td>
-    <?php if(!empty($allowed->user)) { ?><p><input type='radio' name='type' value='user' id='type_user' checked='checked' /><label for='type_user'><?php print_string('typeuser', 'calendar') ?></label></p>
-    <?php } ?>
-    <?php if(!empty($allowed->groups)) { ?><p><input type='radio' name='type' value='group' id='type_group' /><label for='type_group'><?php echo get_string('typegroup', 'calendar').' '.get_string('groupfor'); ?></label>
-      <select name='groupid'>
-        <option value=''></option>
-      <?php foreach($allowed->groups as $group) {?>
-        <option value='<?php echo $group->id; ?>' <?php if($group->id == $groupid) echo 'selected="selected"';?>><?php echo $group->name; ?></option>
-      <?php }?>
-      </select>
-    <?php } ?>
-    <?php if(!empty($allowed->courses)) { ?>
-      <p><input type='radio' name='type' value='course' id='type_course' /><input type="hidden" name="courseid" value="<?php echo($courseid) ?>" /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></p>
-    <?php } ?>
-    <?php if(!empty($allowed->site)) { ?>
-      <p><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></p>
-    <?php } ?>
-    </td>
+  <td style="vertical-align: top; text-align: right;"><?php print_string('eventkind', 'calendar'); ?>:</td>
+  <td>
+  <?php if(!empty($allowed->user)) { ?><div><input type='radio' name='type' value='user' id='type_user' checked='checked' /><label for='type_user'><?php print_string('typeuser', 'calendar') ?></label></div>
+  <?php } ?>
+  <?php if(!empty($allowed->groups)) { ?><div><input type='radio' name='type' value='group' id='type_group' /><label for='type_group'><?php echo get_string('typegroup', 'calendar').' '.get_string('groupfor'); ?></label>
+    <select name='groupid'>
+      <option value=''></option>
+    <?php foreach($allowed->groups as $group) {?>
+      <option value='<?php echo $group->id; ?>' <?php if($group->id == $groupid) echo 'selected="selected"';?>><?php echo $group->name; ?></option>
+    <?php }?>
+    </select>
+    </div>
+  <?php } ?>
+  <?php if(!empty($allowed->courses)) { ?>
+    <div><input type='radio' name='type' value='course' id='type_course' /><input type="hidden" name="courseid" value="<?php echo($courseid) ?>" /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></div>
+  <?php } ?>
+  <?php if(!empty($allowed->site)) { ?>
+    <div><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></div>
+  <?php } ?>
+  </td>
   </tr>
   <tr>
-    <td>&nbsp;</td>
-    <td>
-      <p><input type="submit" value=" <?php print_string('ok') ?> ">
-      <input type="button" onclick="document.location.href='view.php?view=upcoming';" value=" <?php print_string('cancel') ?> ">
-      </p>
-    </td>
+  <td>&nbsp;</td>
+  <td>
+    <div>
+    <input type="submit" value=" <?php print_string('ok') ?> " />
+    <input type="button" onclick="document.location.href='view.php?view=upcoming';" value=" <?php print_string('cancel') ?> " />
+    </div>
+  </td>
   </tr>
-  </form>
 </table>
+<p>
+<input type="hidden" name="action" value="new" />
+<input type="hidden" name="timestart" value="<?php echo $form->timestart; ?>" />
+</p>
+</form>
\ No newline at end of file
index 96a3e2e9c0feb14655575f10a76aa9a7348909f8..3b4b9b121188b663df718f7048c7fb0971f435d6 100644 (file)
@@ -223,7 +223,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
             else if(isset($typesbyday[$day]['startuser'])) {
                 $class .= ' cal_event_user';
             }
-            $cell = '<strong><a href="'.$dayhref.'" '.$popup.'">'.$day.'</a></strong>';
+            $cell = '<strong><a href="'.$dayhref.'" '.$popup.'>'.$day.'</a></strong>';
         }
         else {
             $cell = $day;
@@ -348,7 +348,7 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
                 $eventtype = get_string($event->eventtype, $event->modulename);
                 $icon = $CFG->modpixpath.'/'.$event->modulename.'/icon.gif';
 
-                $output[$outkey]->icon = '<img height=16 width=16 src="'.$icon.'" alt="" title="'.$modulename.'" style="vertical-align: middle;" />';
+                $output[$outkey]->icon = '<img height="16" width="16" src="'.$icon.'" alt="" title="'.$modulename.'" style="vertical-align: middle;" />';
                 $output[$outkey]->referer = '<a href="'.$CFG->wwwroot.'/mod/'.$event->modulename.'/view.php?id='.$module->id.'">'.$event->name.'</a>';
                 $output[$outkey]->time = $eventtime;
                 $output[$outkey]->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
@@ -357,7 +357,7 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
 
 
             } else if($event->courseid == 1) {                              // Site event
-                $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/site.gif" alt="" style="vertical-align: middle;" />';
+                $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/site.gif" alt="" style="vertical-align: middle;" />';
                 $output[$outkey]->time = $eventtime;
 
 
@@ -365,20 +365,20 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
             } else if($event->courseid > 1 and !$event->groupid) {          // Course event
                 calendar_get_course_cached($coursecache, $event->courseid);
 
-                $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/course.gif" alt="" style="vertical-align: middle;" />';
+                $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/course.gif" alt="" style="vertical-align: middle;" />';
                 $output[$outkey]->time = $eventtime;
                 $output[$outkey]->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
 
 
 
             } else if ($event->groupid) {                                    // Group event
-                $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/group.gif" alt="" style="vertical-align: middle;" />';
+                $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/group.gif" alt="" style="vertical-align: middle;" />';
                 $output[$outkey]->time = $eventtime;
 
 
 
             } else if($event->userid) {                                      // User event
-                $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/user.gif" alt="" style="vertical-align: middle;" />';
+                $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/user.gif" alt="" style="vertical-align: middle;" />';
                 $output[$outkey]->time = $eventtime;
             }
             ++$processed;
index 35abd8b5c81b3c510be5ae97d9fcf439866b2eda..1dfc6c038972f4456d8aa08313316a47a58ff8a4 100644 (file)
@@ -2,14 +2,14 @@
 
 <table cellpadding="9" cellspacing="0">
 <tr valign="top">
-       <td nowrap="nowrap" align="right"><p><?php print_string('pref_timeformat', 'calendar')?>:</td>
+       <td nowrap="nowrap" align="right"><?php print_string('pref_timeformat', 'calendar')?>:</td>
        <td>
-    <?php 
+    <?php
         $options = NULL;
         $options['0']  = get_string('default', 'calendar');
         $options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
         $options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
-        choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", ""); 
+        choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", "");
     ?>
     </td>
     <td>
@@ -18,9 +18,9 @@
 </tr>
 
 <tr valign="top">
-       <td nowrap="nowrap" align="right"><p><?php print_string('pref_startwday', 'calendar')?>:</td>
+       <td nowrap="nowrap" align="right"><?php print_string('pref_startwday', 'calendar')?>:</td>
        <td>
-    <?php 
+    <?php
         $options = NULL;
         $options[0] = get_string('sunday', 'calendar');
         $options[1] = get_string('monday', 'calendar');
 </tr>
 
 <tr valign="top">
-       <td nowrap="nowrap" align="right"><p><?php print_string('pref_maxevents', 'calendar')?>:</td>
+       <td nowrap="nowrap" align="right"><?php print_string('pref_maxevents', 'calendar')?>:</td>
        <td>
-    <?php 
+    <?php
         $options = NULL;
         for ($i=1; $i<=20; $i++) {
             $options[$i] = $i;
         }
-        choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", ""); 
+        choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", "");
     ?>
     </td>
     <td>
 </tr>
 
 <tr valign="top">
-       <td nowrap="nowrap" align="right"><p><?php print_string('pref_lookahead', 'calendar')?>:</td>
+       <td nowrap="nowrap" align="right"><?php print_string('pref_lookahead', 'calendar')?>:</td>
        <td>
-    <?php 
+    <?php
         $options = NULL;
         for ($i=1; $i<=200; $i++) {
             $options[$i] = $i;
         }
-        choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", ""); 
+        choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", "");
     ?>
     </td>
     <td>
@@ -71,7 +71,7 @@
 
 <tr>
     <td colspan="3" align="center">
-       <input type="submit" value="<?php print_string("savechanges") ?>"></td>
+       <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
 </tr>
 </table>
 
index a46a5b6765a49534ea0298cd5244dabf256b6a32..e57d524d204bf8fcc4a2bcb9d429d80c0ba764d9 100644 (file)
     list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
     $getvars = 'cal_d='.$day.'&amp;cal_m='.$mon.'&amp;cal_y='.$yr; // For filtering
     echo calendar_filter_controls($_GET['view'], $getvars);
-    echo '<p>';
+    echo '<div style="margin: 10px 0px;">';
     echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
     echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
-    echo '</p><p>';
+    echo '</div><div style="margin: 10px 0px;">';
     echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr));
     echo calendar_get_mini($courses, $groups, $users, $mon, $yr);
-    echo '</p><p>';
+    echo '</div><div style="margin: 10px 0px;">';
     echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr));
     echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
-    echo '</p>';
+    echo '</div>';
     print_side_block_end();
     print_spacer(1, 180);
     echo '</td>';
@@ -213,7 +213,7 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
     }
 
     print_side_block_start($text, array('class' => 'mycalendar'));
-    echo '<p>'.calendar_top_controls('day', array('d' => $d, 'm' => $m, 'y' => $y)).'</p>';
+    echo '<div>'.calendar_top_controls('day', array('d' => $d, 'm' => $m, 'y' => $y)).'</div>';
 
     if (empty($events)) {
         // There is nothing to display today.
@@ -505,7 +505,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
         echo "</tr>\n";
     }
 
-    echo '<tbody></table><br />';
+    echo '</tbody></table><br />';
     print_side_block_end();
 }