Moodle
  1. Moodle
  2. MDL-26430

"Save All My Feedback" button does nothing.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.4
    • Component/s: Assignment (2.2)
    • Environment:
      Internet Explorer 6-8, Firefox 4 Beta, Google Chrome
    • Testing Instructions:
      Hide
      1. Create a course with groups enabled
      2. Create an assignment within this course (also with groups)
      3. Enrol students and create groups
      4. Open assignment and proceed to grading
      5. Enable "quick grading"
      6. There should be textareas for grades and dropdown with group selection (but they belong to different forms)
      7. Try to update the grades (save my feedback)

      It worked in Firefox, but did not work in Chrome. Also reported that is was not working in IE

      Show
      Create a course with groups enabled Create an assignment within this course (also with groups) Enrol students and create groups Open assignment and proceed to grading Enable "quick grading" There should be textareas for grades and dropdown with group selection (but they belong to different forms) Try to update the grades (save my feedback) It worked in Firefox, but did not work in Chrome. Also reported that is was not working in IE
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull Master Branch:
      wip-MDL-26430-master
    • Rank:
      16027

      Description

      On the grading page in the assignment, the "Save All My Feedback" button does absolutely nothing when using all browsers except Firefox 3.6.

      I've done some digging and I believe that the issue is caused by the html form being closed in the wrong place. The 'open form' tag that encloses basically the entire page starts too early and so includes the 'select group' dropdown box. Because of this, I think that the outside form block is being closed prematurely by the inner 'select' form. Certainly, using the Chrome 'Inspect Element' option, the browser uses the first close form tag, with the first open form tag. This means that the "Save All My Feedback" button, along with all the grading and comment boxes are no longer associated with any of the submission forms, and thus do nothing when clicked.

      The offending code is in

      display_submissions($message='')

      in mod/assignment/lib.php.

      Moving the section that opens the main form to start after the 'select group' dropdown box [ie. after the call to

      groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/assignment/submissions.php?id=' . $this->cm->id);

      ] solves the problem.

      I have attached a diff file with my changes. The diff is against tonights version of Moodle 2.0.1+.

      In layman's terms, all that needs to be done is to move this code further down and everything seems to work again.
      This is the code that should be moved:

              /// Print quickgrade form around the table
              if ($quickgrade) {
                  $formattrs = array();
                  $formattrs['action'] = new moodle_url('/mod/assignment/submissions.php');
                  $formattrs['id'] = 'fastg';
                  $formattrs['method'] = 'post';
      
                  echo html_writer::start_tag('form', $formattrs);
                  echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'id',      'value'=> $this->cm->id));
                  echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'mode',    'value'=> 'fastgrade'));
                  echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'page',    'value'=> $page));
                  echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=> sesskey()));
              }
      

      I hope this helps everyone,
      Richard

      1. diff.patch
        3 kB
        Richard Klein
      1. bug.jpeg
        136 kB

        Issue Links

          Activity

            People

            • Votes:
              11 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: