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

          Hide
          Richard Klein added a comment -

          Google Chrome Element Inspector showing the problem.

          Show
          Richard Klein added a comment - Google Chrome Element Inspector showing the problem.
          Hide
          Charles Fulton added a comment -

          I can now reproduce this bug, which has been reported and unreproduced elsewhere I think. The key is that you have to have groups enabled for both the course and the assignment or quick-grading works just as expected. I didn't have groups turned on in my test environment.

          Show
          Charles Fulton added a comment - I can now reproduce this bug, which has been reported and unreproduced elsewhere I think. The key is that you have to have groups enabled for both the course and the assignment or quick-grading works just as expected. I didn't have groups turned on in my test environment.
          Hide
          Charles Fulton added a comment -

          MDL-26036 is the older issue, but this bug can be reproduced.

          Show
          Charles Fulton added a comment - MDL-26036 is the older issue, but this bug can be reproduced.
          Hide
          Tim Hunt added a comment -

          Changing summary back to what it was before. I did not change it, honestly. JIRA must be developing an mind of its own (or possibly something weird is going on with my web-browser auto-complete). Sorry.

          Show
          Tim Hunt added a comment - Changing summary back to what it was before. I did not change it, honestly. JIRA must be developing an mind of its own (or possibly something weird is going on with my web-browser auto-complete). Sorry.
          Hide
          Chris Follin added a comment -

          We ran into this issue internally. I could not reproduce this issue in Firefox 3.6.17 for Mac but was able to reproduce it in Chrome 11 for Mac. Applying Richard's patch from Feb 16 resolves the issue in Chrome and Firefox continues to work. Thank you, Richard, for the patch.

          Show
          Chris Follin added a comment - We ran into this issue internally. I could not reproduce this issue in Firefox 3.6.17 for Mac but was able to reproduce it in Chrome 11 for Mac. Applying Richard's patch from Feb 16 resolves the issue in Chrome and Firefox continues to work. Thank you, Richard, for the patch.
          Hide
          Michael Blake added a comment -

          Please give this issue priority as it is causing problems on a MP site.

          Show
          Michael Blake added a comment - Please give this issue priority as it is causing problems on a MP site.
          Hide
          Marina Glancy added a comment -

          affects all versions: 1.9, 2.0 and master

          Show
          Marina Glancy added a comment - affects all versions: 1.9, 2.0 and master
          Hide
          Marina Glancy added a comment -

          Affected versions 2.0 and master. Bug is not reproduced in 1.9

          Show
          Marina Glancy added a comment - Affected versions 2.0 and master. Bug is not reproduced in 1.9
          Hide
          Sam Hemelryk added a comment -

          Thanks Marina, this has been integrated now.

          However could you please improve the testing instructions for this bug so that the testers have a list of steps to work through to test things are working in the desired way.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Marina, this has been integrated now. However could you please improve the testing instructions for this bug so that the testers have a list of steps to work through to test things are working in the desired way. Cheers Sam
          Hide
          Michael de Raadt added a comment -

          I was successful in adding "quick feedback" marks and comments in FF, Chrome and IE9 as admin and teacher.

          Show
          Michael de Raadt added a comment - I was successful in adding "quick feedback" marks and comments in FF, Chrome and IE9 as admin and teacher.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And now this is part of the best Moodle weeklies ever, thanks!

          Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - And now this is part of the best Moodle weeklies ever, thanks! Closing.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: