Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32053

Quiz: Question bank - table displayed inconsistently

    XMLWordPrintable

    Details

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

      1) create at least two questions.
      2) create a quiz (to demo the functionality on "Editing quiz" page where question bank is displayed)
      3) go to question bank page and click on "Show question text in the question list", check the way the table rows are displayed. The uncheck "Show question text in the question list" and observe the table rows (no zebra stipes)

      Show
      1) create at least two questions. 2) create a quiz (to demo the functionality on "Editing quiz" page where question bank is displayed) 3) go to question bank page and click on "Show question text in the question list", check the way the table rows are displayed. The uncheck "Show question text in the question list" and observe the table rows (no zebra stipes)
    • Workaround:
      Hide

      in question/editlib.php, the class question_bank_view has a protected method get_row_classes() which uses an if-statemanet causing the issue.

      in question/editlib.php:
      change

      if (!empty($this->extrarows))

      { $classes[] = 'r' . ($rowcount % 2); }

      to
      $classes[] = 'r' . ($rowcount % 2);

      and add some css classes to the table header.

      Show
      in question/editlib.php, the class question_bank_view has a protected method get_row_classes() which uses an if-statemanet causing the issue. in question/editlib.php: change if (!empty($this->extrarows)) { $classes[] = 'r' . ($rowcount % 2); } to $classes[] = 'r' . ($rowcount % 2); and add some css classes to the table header.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:

      Description

      In question bank page, when "Show question text in the question list" is checked, it displays the table in zebra stripes (gray, white)format. However when you uncheck "Show question text in the question list", it displays the rows without the zebra stribes.

      There is no zebra stripe format in the way the question bank is displayed in the Edit quiz page.

        Attachments

          Activity

            People

            Assignee:
            mkassaei Mahmoud Kassaei
            Reporter:
            mkassaei Mahmoud Kassaei
            Peer reviewer:
            Tim Hunt
            Integrator:
            Sam Hemelryk
            Tester:
            Rajesh Taneja
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/May/12