Moodle
  1. Moodle
  2. MDL-28377

wrong/misplaced or unused parameters when calling the function review_form from review_page (mod_quiz_renderer)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.1, 2.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      This bug did not have much visible effect, however, if you really want to test this:
      1. Go to the review page for one of your own quiz previews ...
      2. with JavaScript disabled ...
      3. and verify that you can update the state of the question flags, and that your changes are saved but the Save flags button.

      Show
      This bug did not have much visible effect, however, if you really want to test this: 1. Go to the review page for one of your own quiz previews ... 2. with JavaScript disabled ... 3. and verify that you can update the state of the question flags, and that your changes are saved but the Save flags button.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      18035

      Description

      public function review_page(quiz_attempt $attemptobj, $slots, $page, $showall,$lastpage, mod_quiz_display_options $displayoptions,  $summarydata)
      {
      output = '';
      $output .= $this->header();$output .= $this->review_summary_table($summarydata, $page);
      //Here look the order of parameters!!!!!!!
      //first is $page, after $showall .... $showall again?
      $output .= $this->review_form($page, $showall, $displayoptions,$this->questions($attemptobj, true, $slots, $page, $showall, $displayoptions),$attemptobj, $showall);
      $output .= $this->review_next_navigation($attemptobj, $page, $lastpage);
      $output .= $this->footer();
      return $output;
      }
      
      //Look here
      //$page is not first parameter?
      //$summarydata?
      public function review_form($summarydata, $page, $displayoptions, $content, $attemptobj, $showall) 
      	{
              if ($displayoptions->flags != question_display_options::EDITABLE) {
                  return $content;
              }
      
              $this->page->requires->js_init_call('M.mod_quiz.init_review_form', null, false,
                      quiz_get_js_module());
      
              $output = '';
              $output .= html_writer::start_tag('form', array('action' => $attemptobj->review_url(0,
                      $page, $showall), 'method' => 'post', 'class' => 'questionflagsaveform'));
              $output .= html_writer::start_tag('div');
              $output .= $content;
              $output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey',
                      'value' => sesskey()));
              $output .= html_writer::start_tag('div', array('class' => 'submitbtns'));
              $output .= html_writer::empty_tag('input', array('type' => 'submit',
                      'class' => 'questionflagsavebutton', 'name' => 'savingflags',
                      'value' => get_string('saveflags', 'question')));
              $output .= html_writer::end_tag('div');
              $output .= html_writer::end_tag('div');
              $output .= html_writer::end_tag('form');
      
              return $output;
          }
      

        Activity

        Hide
        rafael reyna camones added a comment -

        Guys how long take review a issue?
        my other issues is keeping dust.

        Show
        rafael reyna camones added a comment - Guys how long take review a issue? my other issues is keeping dust.
        Hide
        Tim Hunt added a comment -

        How long depends on what else has been happening. I have been on holiday for the last week+. Also, the Sydney Moodle Moot is currently happening, which means many other people are not at their desks.

        Show
        Tim Hunt added a comment - How long depends on what else has been happening. I have been on holiday for the last week+. Also, the Sydney Moodle Moot is currently happening, which means many other people are not at their desks.
        Hide
        rafael reyna camones added a comment -

        Hi tim, i apreciate your work with engine, is awesome , i understand that you are busy, but my other issues until now dont get response. that my reason to comment about it.
        other issue:
        http://tracker.moodle.org/browse/MDL-27204
        have a nice day

        Show
        rafael reyna camones added a comment - Hi tim, i apreciate your work with engine, is awesome , i understand that you are busy, but my other issues until now dont get response. that my reason to comment about it. other issue: http://tracker.moodle.org/browse/MDL-27204 have a nice day
        Hide
        Petr Škoda added a comment -

        Integrated, thanks.

        Show
        Petr Škoda added a comment - Integrated, thanks.
        Hide
        Sam Hemelryk added a comment -

        Thanks Tim, test passed

        Show
        Sam Hemelryk added a comment - Thanks Tim, test passed
        Hide
        Petr Škoda added a comment -

        Thanks everybody, this is now part of the weekly build.

        Show
        Petr Škoda added a comment - Thanks everybody, this is now part of the weekly build.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: