From 206ab18470161543be6a3a8ad93758743a358442 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 3 Aug 2007 11:55:28 +0000 Subject: [PATCH] MDL-9775 Added   inside the
for class="bt" and class="bb", for custom corners theme MDL-10702 Finished fixing the CSS --- lib/custom_corners_lib.php | 8 ++-- lib/weblib.php | 4 +- mod/assignment/lib.php | 89 +++++++++++++++++++++++++------------- 3 files changed, 65 insertions(+), 36 deletions(-) diff --git a/lib/custom_corners_lib.php b/lib/custom_corners_lib.php index 0ceb93e207..5c88c12d13 100755 --- a/lib/custom_corners_lib.php +++ b/lib/custom_corners_lib.php @@ -17,7 +17,7 @@ */ function print_custom_corners_start($clearfix=false, $return=false) { $output = '
'."\n"; - $output .= '
'; + $output .= '
 
'; $output .= "\n"; $output .= '
'; $output .= (!empty($clearfix)) ? '
' : '
'; @@ -38,9 +38,9 @@ function print_custom_corners_start($clearfix=false, $return=false) { function print_custom_corners_end($return=false) { $output = '
'; $output .= "\n"; - $output .= '
'."\n"; + $output .= '
 
'."\n"; $output .= '
'; - + if ($return) { return $output; } else { @@ -48,4 +48,4 @@ function print_custom_corners_end($return=false) { } } -?> \ No newline at end of file +?> diff --git a/lib/weblib.php b/lib/weblib.php index 419db6a822..12f914aad4 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5848,7 +5848,7 @@ function print_side_block_start($heading='', $attributes = array()) { // echo '
'.$heading.'
'; echo '
'; if (!empty($THEME->customcorners)) { - echo '
'; + echo '
 
'; echo '
'; echo '
'; } @@ -5859,7 +5859,7 @@ function print_side_block_start($heading='', $attributes = array()) { echo '
'; } else { if (!empty($THEME->customcorners)) { - echo '
'; + echo '
 
'; } } diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 5bf1043b57..0b9a56a1db 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -1003,14 +1003,17 @@ class assignment_base { $tabindex = 1; //tabindex for quick grading tabbing; Not working for dropdowns yet add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id); - + $navlinks = array(); $navlinks[] = array('name' => $this->strassignments, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($this->assignment->name,true), 'link' => "view.php?a={$this->assignment->id}", 'type' => 'activityinstance'); + $navlinks[] = array('name' => format_string($this->assignment->name,true), + 'link' => "view.php?a={$this->assignment->id}", + 'type' => 'activityinstance'); $navlinks[] = array('name' => $this->strsubmissions, 'link' => '', 'type' => 'title'); $navigation = build_navigation($navlinks); - print_header_simple(format_string($this->assignment->name,true), "", $navigation, '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm)); + print_header_simple(format_string($this->assignment->name,true), "", $navigation, + '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm)); $context = get_context_instance(CONTEXT_MODULE, $cm->id); @@ -1022,7 +1025,14 @@ class assignment_base { $users = get_users_by_capability($context, 'mod/assignment:submit', '', '', '', '', $currentgroup, '', false); $tablecolumns = array('picture', 'fullname', 'grade', 'submissioncomment', 'timemodified', 'timemarked', 'status', ''); - $tableheaders = array('', get_string('fullname'), get_string('grade'), get_string('comment', 'assignment'), get_string('lastmodified').' ('.$course->student.')', get_string('lastmodified').' ('.$course->teacher.')', get_string('status'), get_string('outcomes', 'grades')); + $tableheaders = array('', + get_string('fullname'), + get_string('grade'), + get_string('comment', 'assignment'), + get_string('lastmodified').' ('.$course->student.')', + get_string('lastmodified').' ('.$course->teacher.')', + get_string('status'), + get_string('outcomes', 'grades')); require_once($CFG->libdir.'/tablelib.php'); $table = new flexible_table('mod-assignment-submissions'); @@ -1116,7 +1126,8 @@ class assignment_base { ///attach file or print link to student answer, depending on the type of the assignment. ///Refer to print_student_answer in inherited classes. if ($auser->timemodified > 0) { - $studentmodified = '
'.$this->print_student_answer($auser->id).userdate($auser->timemodified).'
'; + $studentmodified = '
'.$this->print_student_answer($auser->id) + . userdate($auser->timemodified).'
'; } else { $studentmodified = '
 
'; } @@ -1125,24 +1136,30 @@ class assignment_base { $teachermodified = '
'.userdate($auser->timemarked).'
'; if ($quickgrade) { - $grade = '
'.choose_from_menu(make_grades_menu($this->assignment->grade), - 'menu['.$auser->id.']', $auser->grade, get_string('nograde'),'',-1,true,false,$tabindex++).'
'; + $menu = choose_from_menu(make_grades_menu($this->assignment->grade), + 'menu['.$auser->id.']', $auser->grade, + get_string('nograde'),'',-1,true,false,$tabindex++); + $grade = '
'. $menu .'
'; } else { $grade = '
'.$this->display_grade($auser->grade).'
'; } } else { $teachermodified = '
 
'; - if ($quickgrade){ - $grade = '
'.choose_from_menu(make_grades_menu($this->assignment->grade), - 'menu['.$auser->id.']', $auser->grade, get_string('nograde'),'',-1,true,false,$tabindex++).'
'; + if ($quickgrade) { + $menu = choose_from_menu(make_grades_menu($this->assignment->grade), + 'menu['.$auser->id.']', $auser->grade, + get_string('nograde'),'',-1,true,false,$tabindex++); + $grade = '
'.$menu.'
'; } else { $grade = '
'.$this->display_grade($auser->grade).'
'; } } ///Print Comment - if ($quickgrade){ - $comment = '
'; + if ($quickgrade) { + $comment = '
' + . '
'; } else { $comment = '
'.shorten_text(strip_tags($auser->submissioncomment),15).'
'; } @@ -1150,14 +1167,20 @@ class assignment_base { $studentmodified = '
 
'; $teachermodified = '
 
'; $status = '
 
'; - if ($quickgrade){ // allow editing - $grade = '
'.choose_from_menu(make_grades_menu($this->assignment->grade), - 'menu['.$auser->id.']', $auser->grade, get_string('nograde'),'',-1,true,false,$tabindex++).'
'; + + if ($quickgrade) { // allow editing + $menu = choose_from_menu(make_grades_menu($this->assignment->grade), + 'menu['.$auser->id.']', $auser->grade, + get_string('nograde'),'',-1,true,false,$tabindex++); + $grade = '
'.$menu.'
'; } else { $grade = '
-
'; } - if ($quickgrade){ - $comment = '
'; + + if ($quickgrade) { + $comment = '
' + . '
'; } else { $comment = '
 
'; } @@ -1175,24 +1198,30 @@ class assignment_base { $status = get_string('gradeitemlocked', 'grades'); } else { ///No more buttons, we use popups ;-). - $button = link_to_popup_window ('/mod/assignment/submissions.php?id='.$this->cm->id.'&userid='.$auser->id.'&mode=single'.'&offset='.$offset++, - 'grade'.$auser->id, $buttontext, 600, 780, $buttontext, 'none', true, 'button'.$auser->id); - + $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id + . '&userid='.$auser->id.'&mode=single'.'&offset='.$offset++; + $button = link_to_popup_window ($popup_url, 'grade'.$auser->id, $buttontext, 600, 780, + $buttontext, 'none', true, 'button'.$auser->id); + $status = '
'.$button.'
'; } $outcomes = ''; + if ($outcomes_data = grade_get_outcomes($this->course->id, 'mod', 'assignment', $this->assignment->id, $auser->id)) { + foreach($outcomes_data as $n=>$data) { - $outcomes .= '
'; + $outcomes .= '
'; $options = make_grades_menu(-$data->scaleid); + if ($data->locked or !$quickgrade) { $options[0] = get_string('nooutcome', 'grades'); $outcomes .= ':'.$options[$data->grade].''; } else { - $outcomes .= choose_from_menu($options, 'outcome_'.$n.'['.$auser->id.']', $data->grade, get_string('nooutcome', 'grades'), '', 0, true, false, 0, 'outcome_'.$n.'_'.$auser->id); + $outcomes .= choose_from_menu($options, 'outcome_'.$n.'['.$auser->id.']', + $data->grade, get_string('nooutcome', 'grades'), '', 0, true, false, 0, 'outcome_'.$n.'_'.$auser->id); } - echo '
'; + $outcomes .= '
'; } } @@ -1719,12 +1748,12 @@ class assignment_base { * Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information * for the course (see resource). * - * Given a course_module object, this function returns any "extra" information that may be needed + * Given a course_module object, this function returns any "extra" information that may be needed * when printing this activity in a course listing. See get_array_of_activities() in course/lib.php. - * + * * @param $coursemodule object The coursemodule object (record). * @return object An object on information that the coures will know about (most noticeably, an icon). - * + * */ function get_coursemodule_info($coursemodule) { return false; @@ -2088,7 +2117,7 @@ function assignment_grade_handler($eventdata) { if (isset($eventdata->feedback)) { $submission->submissioncomment = addslashes($eventdata->feedback); } - + if (isset($eventdata->feedbackformat)) { $submission->format = (int)$eventdata->feedbackformat; } @@ -2507,12 +2536,12 @@ function assignment_get_all_submissions($assignment, $sort="", $dir="DESC") { * Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information * for the course (see resource). * - * Given a course_module object, this function returns any "extra" information that may be needed + * Given a course_module object, this function returns any "extra" information that may be needed * when printing this activity in a course listing. See get_array_of_activities() in course/lib.php. - * + * * @param $coursemodule object The coursemodule object (record). * @return object An object on information that the coures will know about (most noticeably, an icon). - * + * */ function assignment_get_coursemodule_info($coursemodule) { global $CFG; -- 2.39.5