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

          Richard Klein created issue -
          Richard Klein made changes -
          Field Original Value New Value
          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+. Apply the patch with patch -p1 < diff.patch.

          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
          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
          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.
          Richard Klein made changes -
          Attachment bug.jpeg [ 23053 ]
          Richard Klein made changes -
          Summary Quick grading for an assignment is active, comments and grades are entered, but clicking on the "Save All My Feedback" button does nothing. "Save All My Feedback" button does nothing.
          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.
          Charles Fulton made changes -
          Link This issue is duplicated by MDL-26036 [ MDL-26036 ]
          Tim Hunt made changes -
          Summary "Save All My Feedback" button does nothing. true and false question in Lesson activity does not display properly on the feedback page.
          Labels assignment grading patch triaged
          Fix Version/s STABLE backlog [ 10463 ]
          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.
          Tim Hunt made changes -
          Summary true and false question in Lesson activity does not display properly on the feedback page. "Save All My Feedback" button does nothing.
          Martin Dougiamas made changes -
          Workflow MDL Workflow [ 67792 ] MDL Full Workflow [ 75893 ]
          Richard Klein made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          Affects Version/s 2.0.2 [ 10421 ]
          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.
          Charles Fulton made changes -
          Link This issue has been marked as being related by MDL-27683 [ MDL-27683 ]
          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.
          Michael Blake made changes -
          Labels patch triaged partner patch triaged
          Michael de Raadt made changes -
          Fix Version/s DEV Sprint 2.1 [ 10650 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Assignee moodle.com [ moodle.com ] Marina Glancy [ marina ]
          Affects Version/s 2.0.1 [ 10420 ]
          Michael de Raadt made changes -
          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
          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 {code}display_submissions($message=''){code} 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 {code}groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/assignment/submissions.php?id=' . $this->cm->id);{code} ] 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:
          {code}
                  /// 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()));
                  }
          {code}

          I hope this helps everyone,
          Richard
          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
          Marina Glancy made changes -
          Status Open [ 1 ] Development in progress [ 3 ]
          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
          Marina Glancy made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Pull Master Diff URL https://github.com/marinaglancy/moodle/compare/master...wip-MDL-26430-master
          Pull Master Branch wip-MDL-26430-master
          Pull 2.0 Diff URL https://github.com/marinaglancy/moodle/compare/MOODLE_20_STABLE...wip-MDL-26430-MOODLE_20_STABLE
          Pull 2.0 Branch wip-MDL-26430-MOODLE_20_STABLE
          Pull from Repository git://github.com/marinaglancy/moodle.git
          Testing Instructions In assignment quick grading mode the button "Save All My Feedback" does not work in Chrome. To reproduce the bug groups should be enabled for both the course and the assignment
          Sam Hemelryk made changes -
          Currently in integration Yes
          Sam Hemelryk made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator samhemelryk
          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
          Sam Hemelryk made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Michael de Raadt made changes -
          Tester salvetore
          Marina Glancy made changes -
          Testing Instructions In assignment quick grading mode the button "Save All My Feedback" does not work in Chrome. To reproduce the bug groups should be enabled for both the course and the assignment # 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
          Tester salvetore
          Michael de Raadt made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Tester salvetore
          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.
          Michael de Raadt made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          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.
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Fix Version/s 2.0.4 [ 10652 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes
          Integration date 16/Jun/11
          Eloy Lafuente (stronk7) made changes -
          Fix Version/s DEV Sprint 2.1 [ 10650 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: