MDL-7861 assignment related xhtml strict fixes (client view and fixed quickgrading/grading) and admin tree CSS styling

This commit is contained in:
skodak 2007-01-07 21:54:39 +00:00
parent 490d89e591
commit a1c91f9a15
5 changed files with 22 additions and 19 deletions

View 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;

View 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";

View 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

View 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();

View File

@ -728,6 +728,9 @@ body#admin-roles-manage table.generalbox {
padding-top:10px;
}
.block_admin_tree .admintree {
text-align:left;
}
/***
*** Blocks