]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10392 updated links to edit_grade form, corrected the loop for table rows, which...
authornicolasconnault <nicolasconnault>
Wed, 11 Jul 2007 07:30:04 +0000 (07:30 +0000)
committernicolasconnault <nicolasconnault>
Wed, 11 Jul 2007 07:30:04 +0000 (07:30 +0000)
MDL-10211  Removed showfeedback preference
MDL-10286 Changed tooltip so that it surrounds the grade in a span when edit mode is off, and surrounds the edit icon otherwise
MDL-10287 Deleted edit_feedback and edit_feedback files and links to this form
MDL-10368 Removed show/hide feedback toggle

grade/report/grader/edit_feedback.php [deleted file]
grade/report/grader/edit_feedback_form.php [deleted file]
grade/report/grader/index.php
grade/report/grader/preferences_form.php
grade/report/grader/settings.php
lang/en_utf8/grades.php
lib/gradelib.php

diff --git a/grade/report/grader/edit_feedback.php b/grade/report/grader/edit_feedback.php
deleted file mode 100644 (file)
index 24ea345..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php  //$Id$
-
-require_once '../../../config.php';
-require_once $CFG->libdir.'/gradelib.php';
-require_once 'edit_feedback_form.php';
-
-$courseid = required_param('courseid', PARAM_INT);
-$id       = optional_param('id', 0, PARAM_INT);
-$action   = optional_param('action', 'view', PARAM_ALPHA);
-
-if (!$course = get_record('course', 'id', $courseid)) {
-    print_error('nocourseid');
-}
-
-require_login($course);
-
-$context = get_context_instance(CONTEXT_COURSE, $course->id);
-require_capability('gradereport/grader:manage', $context);
-
-// default return url
-$returnurl = $CFG->wwwroot.'/grade/report.php?report=grader&amp;id='.$course->id;
-
-$mform = new edit_feedback_form();
-if ($grade_text = get_record('grade_grades_text', 'gradeid', $id)) {
-    $mform->set_data($grade_text);
-} else {
-    $mform->set_data(array('courseid'=>$course->id, 'id' => $id));
-}
-
-if ($mform->is_cancelled()) {
-    redirect($returnurl);
-
-} else if ($data = $mform->get_data()) {
-    $data->gradeid = $data->id;
-    unset($data->id);
-
-    $grade_text = new grade_grades_text(array('gradeid'=>$id));
-    grade_grades_text::set_properties($grade_text, $data);
-    if (empty($grade_text->id)) {
-        $grade_text->insert();
-
-    } else {
-        $grade_text->update();
-    }
-
-    redirect($returnurl, get_string('feedbacksaved', 'grades'), 1);
-}
-
-// Get extra data related to this feedback
-$query = "SELECT a.id AS userid, a.firstname, a.lastname,
-                 b.id AS itemid, b.itemname, b.grademin, b.grademax, b.iteminstance, b.itemmodule, b.scaleid,
-                 c.finalgrade
-            FROM {$CFG->prefix}user a,
-                 {$CFG->prefix}grade_items b,
-                 {$CFG->prefix}grade_grades c
-           WHERE c.id = $id
-             AND b.id = c.itemid
-             AND a.id = c.userid";
-
-$extra_info = get_record_sql($query) ;
-$extra_info->grademin = round($extra_info->grademin);
-$extra_info->grademax = round($extra_info->grademax);
-$extra_info->finalgrade = round($extra_info->finalgrade);
-
-if (!empty($extra_info->itemmodule) && !empty($extra_info->iteminstance)) {
-    $extra_info->course_module = get_coursemodule_from_instance($extra_info->itemmodule, $extra_info->iteminstance, $courseid);
-}
-
-$stronascaleof   = get_string('onascaleof', 'grades', $extra_info);
-$strgrades       = get_string('grades');
-$strgrade        = get_string('grade');
-$strgraderreport = get_string('graderreport', 'grades');
-$strfeedback     = get_string('feedback', 'grades');
-$strfeedbackedit = get_string('feedbackedit', 'grades');
-$strfeedbackview = get_string('feedbackview', 'grades');
-$strfeedbackadd  = get_string('feedbackadd', 'grades');
-$strstudent      = get_string('student', 'grades');
-$strgradeitem    = get_string('gradeitem', 'grades');
-
-$feedback = null;
-$heading = ${"strfeedback$action"};
-if (!empty($action) && $action == 'view' && !empty($grade_text->feedback)) {
-    $feedback = "<p><strong>$strfeedback</strong>:</p><p>$grade_text->feedback</p>";
-}
-
-$nav = array(array('name'=>$strgrades,'link'=>$CFG->wwwroot.'/grade/index.php?id='.$courseid, 'type'=>'misc'),
-             array('name'=>$strgraderreport, 'link'=>$CFG->wwwroot.'/grade/report.php?id='.$courseid.'&amp;report=grader', 'type'=>'misc'),
-             array('name'=>$heading, 'link'=>'', 'type'=>'misc'));
-
-$navigation = build_navigation($nav);
-
-/*********** BEGIN OUTPUT *************/
-
-print_header_simple($strgrades . ': ' . $strgraderreport . ': ' . $heading,
-    ': ' . $heading , $navigation, '', '', true, '', navmenu($course));
-
-print_heading($heading);
-
-print_simple_box_start("center");
-
-// Student name and link
-echo "<p><strong>$strstudent:</strong> <a href=\"" . $CFG->wwwroot . '/user/view.php?id='
-     . $extra_info->userid . '">' . fullname($extra_info) . "</a></p>";
-
-// Grade item name and link
-if (!empty($extra_info->course_module) && !empty($extra_info->itemmodule)) {
-    echo "<p><strong>$strgradeitem:</strong> <a href=\"" . $CFG->wwwroot . '/mod/' . $extra_info->itemmodule
-         . '/view.php?id=' . $extra_info->course_module->id . "&amp;courseid=$courseid\">$extra_info->itemname</a></p>";
-}
-
-// Final grade and link to scale if applicable
-if (!empty($extra_info->finalgrade)) {
-    $openlink = '';
-    $closelink = '';
-
-    if (!empty($extra_info->scaleid)) {
-        $openlink = '<a href="' . $CFG->wwwroot . '/course/scales.php?id=' . $courseid . '&amp;scaleid='
-                  . $extra_info->scaleid . '">';
-        $closelink = '</a>';
-    }
-    echo "<p><strong>$strgrade:</strong> " . $extra_info->finalgrade . "$openlink $stronascaleof $closelink</p>";
-}
-
-// Form if in edit or add modes
-if ($action != 'view') {
-    $mform->display();
-} else { // Feedback string and Back button if in View mode
-    echo $feedback;
-    echo "<button onclick=\"window.location='" . $CFG->wwwroot . "/grade/report.php?report=grader&amp;id=$courseid';\">"
-         . get_string('back') . '</button>';
-}
-
-print_simple_box_end();
-
-print_footer($course);
-die;
diff --git a/grade/report/grader/edit_feedback_form.php b/grade/report/grader/edit_feedback_form.php
deleted file mode 100644 (file)
index dbd54c5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php  //$Id$
-
-require_once $CFG->libdir.'/formslib.php';
-
-class edit_feedback_form extends moodleform {
-    function definition() {
-        global $CFG, $USER;
-        $mform =& $this->_form;
-
-        $feedbackformat = get_user_preferences('grade_report_feedbackformat', $CFG->grade_report_feedbackformat);
-
-        // visible elements
-        // User preference determines the format
-        if ($CFG->htmleditor && $USER->htmleditor && $feedbackformat == GRADER_REPORT_FEEDBACK_FORMAT_HTML) {
-            $mform->addElement('htmleditor', 'feedback', get_string('feedback', 'grades'),
-                array('rows'=> '15', 'course' => optional_param('courseid', PARAM_INT), 'cols'=>'45'));
-        } else {
-            $mform->addElement('textarea', 'feedback', get_string('feedback', 'grades'));
-        }
-
-        //TODO: add other elements
-
-        // hidden params
-        $mform->addElement('hidden', 'id', 0);
-        $mform->setType('gradeid', PARAM_INT);
-
-        $mform->addElement('hidden', 'courseid', 0);
-        $mform->setType('courseid', PARAM_INT);
-
-//-------------------------------------------------------------------------------
-        // buttons
-        $this->add_action_buttons();
-    }
-}
-
-?>
index 7ce5fc91c7fc40364d1a6a30b65f5e545c233e0c..98d7bc5cd792922f33ecba41ce84f32c04bb08f1 100644 (file)
@@ -154,7 +154,6 @@ $showgrandtotals      = get_user_preferences('grade_report_showgrandtotals', $CF
 $showgroups           = get_user_preferences('grade_report_showgroups', $CFG->grade_report_showgroups);
 $aggregation_position = get_user_preferences('grade_report_aggregationposition', $CFG->grade_report_aggregationposition);
 $showscales           = get_user_preferences('grade_report_showscales', $CFG->grade_report_showscales);
-$showfeedback         = get_user_preferences('grade_report_showfeedback', $CFG->grade_report_showfeedback);
 $quickgrading         = get_user_preferences('grade_report_quickgrading', $CFG->grade_report_quickgrading);
 $quickfeedback        = get_user_preferences('grade_report_quickfeedback', $CFG->grade_report_quickfeedback);
 
@@ -166,6 +165,7 @@ if ($perpageurl = optional_param('perpage', 0, PARAM_INT)) {
 // Prepare language strings
 $strsortasc  = get_string('sortasc', 'grades');
 $strsortdesc = get_string('sortdesc', 'grades');
+$strfeedback = get_string("feedback");
 
 // base url for sorting by first/last name
 $baseurl = 'report.php?id='.$courseid.'&amp;perpage='.$perpage.'&amp;report=grader&amp;page='.$page;
@@ -413,7 +413,6 @@ if ($USER->gradeediting) {
     grader_report_print_toggle('calculations', $baseurl);
 }
 
-grader_report_print_toggle('feedback', $baseurl);
 grader_report_print_toggle('grandtotals', $baseurl);
 grader_report_print_toggle('groups', $baseurl);
 grader_report_print_toggle('scales', $baseurl);
@@ -539,6 +538,15 @@ foreach ($users as $userid => $user) {
             $studentshtml .= '<td>';
         }
 
+        // Do not show any icons if no grade (no record in DB to match)
+        if (!empty($grade->id)) {
+            // emulate grade element
+            $grade->courseid = $course->id;
+            $grade->grade_item = $item; // this may speedup is_hidden() and other grade_grades methods
+            $element = array ('eid'=>'g'.$grade->id, 'object'=>$grade, 'type'=>'grade');
+            $studentshtml .= grade_get_icons($element, $gtree);
+        }
+
 
         // if in editting mode, we need to print either a text box
         // or a drop down (for scales)
@@ -582,33 +590,20 @@ foreach ($users as $userid => $user) {
                 }
             }
 
-            // Prepare icons for when quickgrading or quickfeedback are switched off
-            $icons_html = '<div class="grade_icons">';
-
-            // If quickgrading is off, print an edit icon
-            if (!$quickgrading) {
-                $icons_html .= grade_get_icons($element, $gtree, array('edit'));
-            }
 
             // If quickfeedback is on, print an input element
-            if ($showfeedback && $quickfeedback) {
+            if ($quickfeedback) {
                 $studentshtml .= '<input size="6" type="text" name="feedback_'.$userid.'_'.$item->id.'" value="'. s($grade->feedback) . '"/>';
-
-            } else if ($showfeedback) { // If quickfeedback is off but showfeedback is on, print an edit feedback icon
-                if (empty($grade->feedback)) {
-                    $icons_html .= grade_get_icons($element, $gtree, array('add_feedback'));
-                } else {
-                    $icons_html .= grade_get_icons($element, $gtree, array('edit_feedback'));
-                }
             }
 
-            $icons_html .= '</div>';
-
-            if (!$quickfeedback || !$quickgrading) {
-                $studentshtml .= $icons_html;
+            $studentshtml .= '<div class="grade_icons">' . grade_get_icons($element, $gtree, array('edit')) . '</div>';
+        } else {
+            // If feedback present, surround grade with feedback tooltip
+            if (!empty($grade->feedback)) {
+                $studentshtml .= '<span onmouseover="return overlib(\''.$grade->feedback.'\', CAPTION, \''
+                        . $strfeedback.'\');" onmouseout="return nd();">';
             }
 
-        } else {
             // finalgrades[$userid][$itemid] could be null because of the outer join
             // in this case it's different than a 0
             if ($item->scaleid) {
@@ -631,15 +626,9 @@ foreach ($users as $userid => $user) {
                     $studentshtml .=  get_grade_clean($gradeval);
                 }
             }
-        }
-
-        // Do not show any icons if no grade (no record in DB to match)
-        if (!empty($grade->id)) {
-            // emulate grade element
-            $grade->courseid = $course->id;
-            $grade->grade_item = $item; // this may speedup is_hidden() and other grade_grades methods
-            $element = array ('eid'=>'g'.$grade->id, 'object'=>$grade, 'type'=>'grade');
-            $studentshtml .= grade_get_icons($element, $gtree);
+            if (!empty($grade->feedback)) {
+                $studentshtml .= '</span>';
+            }
         }
 
         if (!empty($gradeserror[$item->id][$userid])) {
index 172cd30c510a4edcffe17342d6deba02529d9298..b57e31adb5b42765b4ec88d2166b290166853ed8 100644 (file)
@@ -26,7 +26,6 @@ class grader_report_preferences_form extends moodleform {
                              'showgrandtotals'        => 'advcheckbox',
                              'showgroups'             => 'advcheckbox',
                              'showlocks'              => 'advcheckbox',
-                             'showfeedback'           => 'advcheckbox',
                              'showscales'             => 'advcheckbox',
                              'quickgrading'           => 'advcheckbox',
                              'quickfeedback'          => 'advcheckbox',
index 57f99069519feba7919ac4bac7a72206909b23ff..650751da815c94b5350e5f391bc0127bb73e9dd7 100644 (file)
@@ -4,42 +4,56 @@
 $settings->add(new admin_setting_configselect('grade_report_aggregationposition', get_string('aggregationposition', 'grades'),
                                           get_string('configaggregationposition', 'grades'), false,
                                           array(get_string('left', 'grades'), get_string('right', 'grades'))));
+
 $settings->add(new admin_setting_configselect('grade_report_aggregationview', get_string('aggregationview', 'grades'),
                                           get_string('configaggregationview', 'grades'), false,
                                           array(get_string('full', 'grades'), get_string('compact', 'grades'))));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_bulkcheckboxes', get_string('bulkcheckboxes', 'grades'),
                                             get_string('configbulkcheckboxes', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_enableajax', get_string('enableajax', 'grades'),
                                             get_string('configenableajax', 'grades'), 0));
+
 $settings->add(new admin_setting_configselect('grade_report_gradedisplaytype', get_string('gradedisplaytype', 'grades'),
                                           get_string('configgradedisplaytype', 'grades'), false,
                                           array(get_string('raw', 'grades'), get_string('percentage', 'grades'))));
+
 $settings->add(new admin_setting_configselect('grade_report_grandtotalsdisplaytype', get_string('grandtotalsdisplaytype', 'grades'),
                                           get_string('configgrandtotalsdisplaytype', 'grades'), false,
                                           array(get_string('raw', 'grades'), get_string('percentage', 'grades'))));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showcalculations', get_string('showcalculations', 'grades'),
                                             get_string('configshowcalculations', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
                                             get_string('configshoweyecons', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showgroups', get_string('showgroups', 'grades'),
                                             get_string('configshowgroups', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showgrandtotals', get_string('showgrandtotals', 'grades'),
                                             get_string('configshowgrandtotals', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showlocks', get_string('showlocks', 'grades'),
                                             get_string('configshowlocks', 'grades'), 0));
-$settings->add(new admin_setting_configcheckbox('grade_report_showfeedback', get_string('showfeedback', 'grades'),
-                                            get_string('configshowfeedback', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_showscales', get_string('showscales', 'grades'),
                                             get_string('configshowscales', 'grades'), 0));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_quickgrading', get_string('quickgrading', 'grades'),
                                             get_string('configquickgrading', 'grades'), 1));
+
 $settings->add(new admin_setting_configcheckbox('grade_report_quickfeedback', get_string('quickfeedback', 'grades'),
                                             get_string('configquickfeedback', 'grades'), 1));
+
 $settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
                                         get_string('configstudentsperpage', 'grades'), 20));
+
 $settings->add(new admin_setting_configselect('grade_report_feedbackformat', get_string('feedbackformat', 'grades'),
                                           get_string('configfeedbackformat', 'grades'), false,
                                           array(get_string('text', 'grades'), get_string('html', 'grades'))));
+
 $settings->add(new admin_setting_configselect('grade_report_decimalpoints', get_string('decimalpoints', 'grades'),
                                           get_string('configdecimalpoints', 'grades'), 2,
                                           array( '0' => '0',
index ff032688b3ec909d08ad27d17dd478fb9c7afd51..08909f8f7057156b6fc63e65bee28df338a0385a 100644 (file)
@@ -36,12 +36,12 @@ $string['configdecimalpoints'] = 'The number of decimal points to display for ea
 $string['configenableajax'] = 'Adds a layer of AJAX functionality to the grader report, simplifying and speeding up common operations. Depends on Javascript being switched on at the user\'s browser level.';
 $string['configfeedbackformat'] = 'The format of feedback notes attached to grades. This also determines the interface element used to enter such feedback (htmleditor for HTML format).';
 $string['configgradedisplaytype'] = 'Grades can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
-$string['configgrandtotalsdisplaytype'] = 'Grand totals can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
+$string['configgrandtotalsdisplaytype'] = 'Column totals can be shown as raw grades or as percentages (in reference to the minimum and maximum grades).';
 $string['configquickfeedback'] = 'Quick Feedback adds a text input element in each grade cell on the grader report, allowing you to edit many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
 $string['configquickgrading'] = 'Quick Grading adds a text input element in each grade cell on the grader report, allowing you to edit the feedback for many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.';
 $string['configshowcalculations'] = 'Whether to show calculator icons near each grade item and category, tooltips over calculated items and a visual indicator that a column is calculated.';
-$string['configshoweyecons'] = 'Whether to show an eye-con near each grade (controlling its visibility to the user).';
-$string['configshowgrandtotals'] = 'Show grand totals in the grader report.';
+$string['configshoweyecons'] = 'Whether to show a show/hide icon near each grade (controlling its visibility to the user).';
+$string['configshowgrandtotals'] = 'Show column totals in the grader report.';
 $string['configshowgroups'] = 'Show group totals and means in the grader report.';
 $string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade.';
 $string['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.';
@@ -118,11 +118,11 @@ $string['gradereports'] = 'Grades report';
 $string['graderreport'] = 'Grader report';
 $string['gradetype'] = 'Grade type';
 $string['gradeweighthelp'] = 'Grade Weight Help';
-$string['grandtotalsdisplaytype'] = 'Grand totals display type';
+$string['grandtotalsdisplaytype'] = 'Column totals display type';
 $string['hideadvanced'] = 'Hide Advanced Features';
 $string['hidecalculations'] = 'Hide calculations';
 $string['hidecategory'] = 'Hidden';
-$string['hideeyecons'] = 'Hide eyecons';
+$string['hideeyecons'] = 'Hide show/hide icons';
 $string['hidegrandtotals'] = 'Hide grandtotals';
 $string['hidegroups'] = 'Hide groups';
 $string['hidelocks'] = 'Hide locks';
@@ -211,8 +211,8 @@ $string['settings'] = 'Settings';
 $string['setweights'] = 'Set Weights';
 $string['showallstudents'] = 'Show All Students';
 $string['showcalculations'] = 'Show calculations';
-$string['showeyecons'] = 'Show eye-cons';
-$string['showgrandtotals'] = 'Show grand totals';
+$string['showeyecons'] = 'Show show/hide icons';
+$string['showgrandtotals'] = 'Show column totals';
 $string['showgroups'] = 'Show groups';
 $string['showlocks'] = 'Show locks';
 $string['showfeedback'] = 'Show feedback';
index 73da1e8b1857405fc4b8dd7c233c6c323e4ded1a..7a2b18a0bef220a39f7a0ac8bda15ab1dd62d294 100644 (file)
@@ -721,9 +721,7 @@ function grade_get_icons($element, $tree, $icons=null, $limit=true) {
 
 
     // Load language strings
-    $straddfeedback    = get_string("addfeedback", 'grades');
     $stredit           = get_string("edit");
-    $streditfeedback   = get_string("editfeedback", 'grades');
     $streditcalculation= get_string("editcalculation", 'grades');
     $strfeedback       = get_string("feedback");
     $strmove           = get_string("move");
@@ -757,7 +755,6 @@ function grade_get_icons($element, $tree, $icons=null, $limit=true) {
     $aggregationview  = get_user_preferences('grade_report_aggregationview', $CFG->grade_report_aggregationview);
     $showeyecons      = get_user_preferences('grade_report_showeyecons', $CFG->grade_report_showeyecons);
     $showlocks        = get_user_preferences('grade_report_showlocks', $CFG->grade_report_showlocks);
-    $showfeedback     = get_user_preferences('grade_report_showfeedback', $CFG->grade_report_showfeedback);
     $showcalculations = get_user_preferences('grade_report_showcalculations', $CFG->grade_report_showcalculations);
 
     // Prepare image strings
@@ -768,32 +765,21 @@ function grade_get_icons($element, $tree, $icons=null, $limit=true) {
     $edit_item_icon = '<a href="report/grader/edit_item.php?courseid='.$object->courseid.'&amp;id='.$object->id.'">'
                     . '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
                     . $stredit.'" title="'.$stredit.'" /></a>'. "\n";
+    $overlib = '';
+    if (!empty($object->feedback)) {
+        $overlib = 'onmouseover="return overlib(\''.$object->feedback.'\', CAPTION, \''
+                     . $strfeedback.'\');" onmouseout="return nd();"';
+    }
 
     $edit_grade_icon = '<a href="report/grader/edit_grade.php?courseid='.$object->courseid.'&amp;id='.$object->id.'">'
-                     . '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'
-                     . $stredit.'" title="'.$stredit.'" /></a>'. "\n";
+                     . '<img ' . $overlib . ' src="'.$CFG->pixpath.'/t/edit.gif"'
+                     . 'class="iconsmall" alt="' . $stredit.'" title="'.$stredit.'" /></a>'. "\n";
+
 
     $edit_calculation_icon = '<a href="report/grader/edit_calculation.php?courseid='.$object->courseid.'&amp;id='.$object->id.'">'
                            . '<img src="'.$CFG->pixpath.'/t/calc.gif" class="iconsmall" alt="'
                            . $streditcalculation.'" title="'.$streditcalculation.'" /></a>'. "\n";
 
-    $add_feedback_icon = '<a href="report/grader/edit_feedback.php?id=' . $object->id
-                       . "&amp;action=add&amp;courseid=$object->courseid\">\n"
-                       . '<img src="'.$CFG->pixpath.'/t/feedback_add.gif" class="iconsmall" alt="'.$straddfeedback.'" '
-                       . 'title="'.$straddfeedback.'" /></a>'. "\n";
-
-    $edit_feedback_icon = '<a href="report/grader/edit_feedback.php?id=' . $object->id
-                        . "&amp;action=edit&amp;courseid=$object->courseid\">\n"
-                        . '<img src="'.$CFG->pixpath.'/t/feedback.gif" class="iconsmall" alt="'.$streditfeedback.'" '
-                        . 'title="'.$streditfeedback.'" onmouseover="return overlib(\''.$object->feedback.'\', CAPTION, \''
-                        . $strfeedback.'\');" onmouseout="return nd();" /></a>'. "\n";
-
-    $view_feedback_icon = '<a href="report/grader/edit_feedback.php?id=' . $object->id
-                        . "&amp;action=view&amp;courseid=$object->courseid\">\n"
-                        . '<img onmouseover="return overlib(\''.$object->feedback.'\', CAPTION, \''
-                        . $strfeedback.'\');" onmouseout="return nd();" '
-                        . 'src="'.$CFG->pixpath.'/t/feedback.gif" class="iconsmall" alt="" /></a>'. "\n";
-
     // Prepare Hide/Show icon state
     $hide_show = 'hide';
     if ($object->is_hidden()) {
@@ -812,6 +798,7 @@ function grade_get_icons($element, $tree, $icons=null, $limit=true) {
     }
 
     // Print lock/unlock icon
+
     $lock_unlock_icon = '<a href="report.php?report=grader&amp;target='.$eid
                       . "&amp;action=$lock_unlock$tree->commonvars\">\n"
                       . '<img src="'.$CFG->pixpath.'/t/'.$lock_unlock.'.gif" class="iconsmall" alt="'
@@ -878,12 +865,6 @@ function grade_get_icons($element, $tree, $icons=null, $limit=true) {
             $html .= $contract_expand_icon;
         }
     } else { // Editing mode is off
-        if ($showfeedback) {
-            // Display view feedback icon
-            if (!empty($object->feedback)) {
-                $html .= $view_feedback_icon;
-            }
-        }
     }
 
     return $html . '</div>';