Moodle
  1. Moodle
  2. MDL-20938

Wrong Colspan in Gradebook in Edit-Mode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.6
    • Fix Version/s: 1.9.7
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      If you activate edit mode in the grade book, the "Controls"-Field has a wrong colpsan (colspan='1' if no idnumber is shown, colspan='2' otherwise), see screenshots 2)(with cell boundaries highlighted).

      /cvsroot/moodle/moodle/grade/report/grader/lib.php
      lines 1300 following:
      $colspan = '';
      if ($showuseridnumber)

      { $colspan = 'colspan="2"'; }

      if (!$fixedstudents)

      { $iconshtml .= '<th class="header c0 controls" scope="row" '.$colspan.'>'.$this->get_lang_string('controls','grades').'</th>'; }

      should be:
      $colspan = 'colspan="2"';
      if ($showuseridnumber) { $colspan = 'colspan="3"'; }

      if (!$fixedstudents) { $iconshtml .= '<th class="header c0 controls" scope="row" '.$colspan.'>'.$this->get_lang_string('controls','grades').'</th>'; }

      I assume, a column was introduced and the code is old code.
      Similar lines (similar error??) are at lines 1173 and 1263.
      Screenshot 3) shows the right cell boundaries.

        Gliffy Diagrams

        1. lib.php.patch
          0.7 kB
          Martin Schuhmann
        1. 2_Grades- View_boundaries.png
          6 kB
        2. 3_Grades- View_boundaries_ok.png
          4 kB
        3. garder_avgs_ko.png
          10 kB
        4. garder_avgs_ok.png
          18 kB

          Issue Links

            Activity

            Hide
            Patrick Pollet added a comment -

            Indeed the very same error and verys same fix near ligne 1173 in generating the average lnes. They are alos misaligned by one cell missing .
            See attachments.

            Cheers

            Show
            Patrick Pollet added a comment - Indeed the very same error and verys same fix near ligne 1173 in generating the average lnes. They are alos misaligned by one cell missing . See attachments. Cheers
            Hide
            Patrick Pollet added a comment -

            Misaligned average lines (by group and global)

            Show
            Patrick Pollet added a comment - Misaligned average lines (by group and global)
            Hide
            Patrick Pollet added a comment -

            fixed by adding 1 to colspan ...

            Show
            Patrick Pollet added a comment - fixed by adding 1 to colspan ...
            Hide
            Petr Skoda added a comment -

            fix committed, thanks a lot

            Show
            Petr Skoda added a comment - fix committed, thanks a lot
            Hide
            Andrew Davis added a comment -

            closing.

            Show
            Andrew Davis added a comment - closing.
            Hide
            Paul-Andre Chasse added a comment -

            The same error near line 1173 was not committed in 1.9.7 version.

            Show
            Paul-Andre Chasse added a comment - The same error near line 1173 was not committed in 1.9.7 version.
            Hide
            Andrew Davis added a comment -

            That's odd. The instance near line 1173 was actually fixed as part of MDL-20667 It was fixed in 1.9.8

            Show
            Andrew Davis added a comment - That's odd. The instance near line 1173 was actually fixed as part of MDL-20667 It was fixed in 1.9.8
            Hide
            Petr Skoda added a comment -

            it "will" be fixed in 1.9.8, it is in latest 1.9.7+ weeklies and CVS only

            Show
            Petr Skoda added a comment - it "will" be fixed in 1.9.8, it is in latest 1.9.7+ weeklies and CVS only

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: