]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 assignment related xhtml strict fixes (client view and fixed quickgrading...
authorskodak <skodak>
Sun, 7 Jan 2007 21:54:39 +0000 (21:54 +0000)
committerskodak <skodak>
Sun, 7 Jan 2007 21:54:39 +0000 (21:54 +0000)
blocks/admin_tree/block_admin_tree.php
lib/weblib.php
mod/assignment/lib.php
mod/assignment/type/upload/assignment.class.php
theme/standard/styles_layout.css

index 78cfe928e6dbe3ba9e42926da31b19b514fbdb28..48b478d2921e5d6e3b0b3f5d002c3ccf1c412bc3 100644 (file)
@@ -179,7 +179,7 @@ class block_admin_tree extends block_base {
 
             $this->content->text .= '//]]>' . "\n";
             $this->content->text .= '</script>' . "\n";
-            $this->content->text .= '<div style="text-align:left">' . "\n";
+            $this->content->text .= '<div class="admintree">' . "\n";
 
             $this->content->text .= $this->tempcontent;
 
index 958a50de1340adac173e3350049b504e034a9ffd..a737e0c23a7985833c57838761d5deae32059404 100644 (file)
@@ -689,7 +689,10 @@ function choose_from_menu ($options, $name, $selected='', $nothing='choose', $sc
     }
 
     if ($id ==='') {
-        $id = 'menu'.str_replace('[]', '', $name); // name may end in [], which would make an invalid id. e.g. numeric question type editing form.
+        $id = 'menu'.$name;
+         // name may contaion [], which would make an invalid id. e.g. numeric question type editing form, assignment quickgrading
+        $id = str_replace('[', '', $id);
+        $id = str_replace(']', '', $id);
     }
 
     $output = '<select id="'.$id.'" name="'. $name .'" '. $attributes .'>' . "\n";
index 381535b71e2d08ef535ba906e277a961afce896f..33c7563f0330ef708d7a1356a0b32bb2d63e2469 100644 (file)
@@ -1148,7 +1148,7 @@ class assignment_base {
                     }
                 ///Print Comment
                     if ($quickgrade){
-                        $comment = '<div id="com'.$auser->id.'"><textarea tabindex="'.$tabindex++.'" name="submissioncomment['.$auser->id.']" id="submissioncomment['.$auser->id.']">'.($auser->submissioncomment).'</textarea></div>';
+                        $comment = '<div id="com'.$auser->id.'"><textarea tabindex="'.$tabindex++.'" name="submissioncomment['.$auser->id.']" id="submissioncomment'.$auser->id.'" rows="2" cols="20">'.($auser->submissioncomment).'</textarea></div>';
                     } else {
                         $comment = '<div id="com'.$auser->id.'">'.shorten_text(strip_tags($auser->submissioncomment),15).'</div>';
                     }
@@ -1163,7 +1163,7 @@ class assignment_base {
                         $grade = '<div id="g'.$auser->id.'">-</div>';
                     }
                     if ($quickgrade){
-                        $comment = '<div id="com'.$auser->id.'"><textarea tabindex="'.$tabindex++.'" name="submissioncomment['.$auser->id.']" id="submissioncomment['.$auser->id.']">'.($auser->submissioncomment).'</textarea></div>';
+                        $comment = '<div id="com'.$auser->id.'"><textarea tabindex="'.$tabindex++.'" name="submissioncomment['.$auser->id.']" id="submissioncomment'.$auser->id.'" rows="2" cols="20">'.($auser->submissioncomment).'</textarea></div>';
                     } else {
                         $comment = '<div id="com'.$auser->id.'">&nbsp;</div>';
                     }
@@ -1193,6 +1193,7 @@ class assignment_base {
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
             echo '<input type="hidden" name="mode" value="fastgrade" />';
             echo '<input type="hidden" name="page" value="'.$page.'" />';
+            echo '</fieldset>';
             echo '<div style="text-align:center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
         }
 
@@ -1200,7 +1201,6 @@ class assignment_base {
 
         if ($quickgrade){
             echo '<div style="text-align:center"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
-            echo '</fieldset>';
             echo '</form>';
         }
         /// End of fast grading form
index f6de3a6677eb4deba3bdd016e8ec58e003e72c61..9b92801d2f953e5d0389c5871c40be105453ca58 100644 (file)
@@ -42,9 +42,9 @@ class assignment_upload extends assignment_base {
             $this->view_feedback();
 
             if ($this->is_finalized($submission)) {
-                print_heading(get_string('submission', 'assignment'), 'center', 3);
+                print_heading(get_string('submission', 'assignment'), '', 3);
             } else {
-                print_heading(get_string('submissiondraft', 'assignment'), 'center', 3);
+                print_heading(get_string('submissiondraft', 'assignment'), '', 3);
             }
 
             if ($filecount and $submission) {
@@ -60,7 +60,7 @@ class assignment_upload extends assignment_base {
             $this->view_upload_form();
 
             if ($this->notes_allowed()) {
-                print_heading(get_string('notes', 'assignment'), 'center', 3);
+                print_heading(get_string('notes', 'assignment'), '', 3);
                 $this->view_notes();
             }
 
@@ -267,8 +267,7 @@ class assignment_upload extends assignment_base {
                     require_once($CFG->libdir.'/filelib.php');
                     $icon = mimeinfo('icon', $file);
                     $ffurl = "$CFG->wwwroot/file.php?file=/$filearea/$file";
-                    $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.
-                            '<a href="'.$ffurl.'" >'.$file.'</a>&nbsp;';
+                    $output .= '<a href="'.$ffurl.'" ><img class="icon" src="'.$CFG->pixpath.'/f/'.$icon.'" alt="'.$icon.'" />'.$file.'</a>&nbsp;';
                 }
             }
         }
@@ -330,14 +329,13 @@ class assignment_upload extends assignment_base {
                         $ffurl   = "$CFG->wwwroot/file.php?file=/$filearea/$file";
 
 
-                        $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'
-                                  .'<a href="'.$ffurl.'" >'.$file.'</a>';
+                        $output .= '<a href="'.$ffurl.'" ><img class="icon" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.$file.'</a>';
 
                         if ($candelete) {
                             $delurl  = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&amp;file=$file&amp;userid={$submission->userid}&amp;mode=$mode&amp;offset=$offset";
 
-                            $output .= '<a title="'.$strdelete.'" href="'.$delurl.'">&nbsp;'
-                                      .'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
+                            $output .= '<a href="'.$delurl.'">&nbsp;'
+                                      .'<img title="'.$strdelete.'" src="'.$CFG->pixpath.'/t/delete.gif" class="smallicon" alt="" /></a> ';
                         }
 
                         $output .= '<br />';
@@ -385,14 +383,13 @@ class assignment_upload extends assignment_base {
 
                     $ffurl   = "$CFG->wwwroot/file.php?file=/$filearea/$file";
 
-                    $output .= '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'
-                              .'<a href="'.$ffurl.'" >'.$file.'</a>';
+                    $output .= '<a href="'.$ffurl.'" ><img class="align" src="'.$CFG->pixpath.'/f/'.$icon.'" alt="'.$icon.'" />'.$file.'</a>';
 
                     if ($candelete) {
                         $delurl  = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&amp;file=$file&amp;userid=$userid&amp;mode=$mode&amp;offset=$offset&amp;action=response";
 
-                        $output .= '<a title="'.$strdelete.'" href="'.$delurl.'">&nbsp;'
-                                  .'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
+                        $output .= '<a href="'.$delurl.'">&nbsp;'
+                                  .'<img title="'.$strdelete.'" src="'.$CFG->pixpath.'/t/delete.gif" class="smallicon" alt=""/></a> ';
                     }
 
                     $output .= '&nbsp;';
@@ -488,7 +485,7 @@ class assignment_upload extends assignment_base {
         /// show notes edit form
         $this->view_header(get_string('notes', 'assignment'));
 
-        print_heading(get_string('notes', 'assignment'), 'center');
+        print_heading(get_string('notes', 'assignment'), '');
 
         $mform->display();
 
index 8e2bf83f11cd45d25a1042711a5b55661514b06d..8f803641f99b740c1967c675c3b736bed85fafbc 100644 (file)
@@ -728,6 +728,9 @@ body#admin-roles-manage table.generalbox {
   padding-top:10px;
 }
 
+.block_admin_tree .admintree {
+  text-align:left;
+}
 
 /***
  *** Blocks