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

Allow to set 0 for the setting "Comments displayed per page" to display all comments

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.4
    • Fix Version/s: None
    • Component/s: Comments, Reports
    • Labels:
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      When "Comments displayed per page" is set to 0, a coding error appears at the bottom of the Comments report.

      Coding error detected, it must be fixed by a programmer: paging_bar requires a perpage value.

      Debug info:
      Error code: codingerror
      Stack trace:
      line 2412 of /lib/outputcomponents.php: coding_exception thrown
      line 2931 of /lib/outputrenderers.php: call to paging_bar->prepare()
      line 191 of /lib/outputrenderers.php: call to core_renderer->render_paging_bar()
      line 2919 of /lib/outputrenderers.php: call to renderer_base->render()
      line 185 of /comment/locallib.php: call to core_renderer->paging_bar()
      line 88 of /comment/index.php: call to comment_manager->print_comments()

      STEPS TO REPLICATE
      1. Create an assignment in a course.
      2. As a student in the course make a submission to the assignment.
      3. Add two submission comments to the submission.
      4. As a site admin, go to Front Page Settings > Edit Settings.
      5. Set "Comments displayed per page" to 0 and save changes.
      6. Go to Site Administration > Reports > Comments.

      OBSERVED BEHAVIOR:
      At the bottom of page the following error is displayed, "Coding error detected, it must be fixed by a programmer: paging_bar requires a perpage value."

      EXPECTED BEHAVIOR:
      The Comments report displays all comments without paging and without errors.

      REPLICATION LOCATIONS
      Replicated in 3.0.4.

      ADDITIONAL INVESTIGATION NOTES
      The Comments block in a course does not appear to be negatively impacted by having "Comments displayed per page" set to 0. All comments are displayed without paging and without any errors.

      USER IMPACT
      Only administrator users with access to the Comments report are impacted. All comments are displayed despite the error.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brian.winstead Brian Winstead
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: