Skip to content
Browse files

MDL-7861 assignment related xhtml strict fixes (client view and fixed…

… quickgrading/grading) and admin tree CSS styling
  • Loading branch information...
1 parent 490d89e commit a1c91f9a15909567dfe2ead893c380d54ba43da7 skodak committed Jan 7, 2007
View
2 blocks/admin_tree/block_admin_tree.php
@@ -179,7 +179,7 @@ function get_content() {
$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
5 lib/weblib.php
@@ -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
6 mod/assignment/lib.php
@@ -1148,7 +1148,7 @@ function display_submissions() {
}
///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 @@ function display_submissions() {
$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,14 +1193,14 @@ function display_submissions() {
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>';
}
$table->print_html(); /// Print the whole table
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
25 mod/assignment/type/upload/assignment.class.php
@@ -42,9 +42,9 @@ function view() {
$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 @@ function view() {
$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 @@ function print_student_answer($userid, $return=false){
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 @@ function print_user_files($userid=0, $return=false) {
$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 @@ function print_responsefiles($userid, $return=false) {
$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 @@ function upload_notes() {
/// 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
3 theme/standard/styles_layout.css
@@ -728,6 +728,9 @@ body#admin-roles-manage table.generalbox {
padding-top:10px;
}
+.block_admin_tree .admintree {
+ text-align:left;
+}
/***
*** Blocks

0 comments on commit a1c91f9

Please sign in to comment.
Something went wrong with that request. Please try again.