XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0
    • 2.0
    • Questions, Quiz
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      The actual links in the paging when the number of questions is greater than 20 so the paging is working are defined as something like

      http://132.208.141.198/moodle_head_new/moodle_head_new/question/edit.php?qpage=1&cat=1%2C3&courseid=2

      notice the double /moodle_head_new/moodle_head_new/
      this happens because the
      class moodle_paging_bar

      add $CFG->wwwroot to the $pageurl which has been defined

      $thispageurl = new moodle_url();
      so the default path automatically generated is $ME
      line 306 in weblib

                  if ($url === null) {
                      global $ME;
                      $url = $ME;
                  }
                  if (is_string($url)) {
                      $url = parse_url($url);
                  }

      in the example case the value is

      "moodle_head_new/question/edit.php"

      So the $url to create the $paging bar should be different than the one used elsewhere in the showbank.

      A simple HACK replacing in question/editlib.php
      line 1275 $pagingbar = moodle_paging_bar::make($totalnumber, $page, $perpage, $pageurl);

      by
      $pageing_url = new moodle_url('edit.php');
      $r = $pageing_url->params($pageurl->params());
      $pagingbar = moodle_paging_bar::make($totalnumber, $page, $perpage, $pageing_url);
      solve the problem either with the general question showbank and the showbank version visible when editing the quiz.

      This happens as in either case the url goes to either question/edit.php or quiz/edit.php

      These are the only 2 calls to this function.

            timhunt Tim Hunt
            ppichet Pierre Pichet (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.