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

quiz overview report shows no result if the course has too many users

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 1.9.8
    • Quiz
    • Linux centos 64bits, 8 processors , 12GB memory, php 5.3.3, apache 2.2.3, postgres 8.2 (in another server), moodle-1.9.7 (not 1.9.8, but i think this error occurs in any 1.9.x moodle)
    • PostgreSQL
    • MOODLE_19_STABLE
    • Hide

      I have made a little workaround (not serious tested) , in the file mod/quiz/report/overview/report.php, change the lines:

      if (!$students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false)){
      notify(get_string('nostudentsyet'));
      $nostudents = true;
      $studentslist = '';
      } else {
      $studentslist = join(',',array_keys($students));
      }

      to:

      if (empty($currentgroup)){
      $students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','','','',false);
      } else {
      $students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false);
      }
      if (!$studentslist = join(',',array_keys($students))){
      notify(get_string('nostudentsyet'));
      $nostudents = true;
      $studentslist = '';
      } else {
      $studentslist = join(',',array_keys($students));
      }

      and you have to create some groups, now i can see this report (by selecting a group)

      Show
      I have made a little workaround (not serious tested) , in the file mod/quiz/report/overview/report.php, change the lines: if (!$students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false)){ notify(get_string('nostudentsyet')); $nostudents = true; $studentslist = ''; } else { $studentslist = join(',',array_keys($students)); } to: if (empty($currentgroup)){ $students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','','','',false); } else { $students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'','','','',$currentgroup,'',false); } if (!$studentslist = join(',',array_keys($students))){ notify(get_string('nostudentsyet')); $nostudents = true; $studentslist = ''; } else { $studentslist = join(',',array_keys($students)); } and you have to create some groups, now i can see this report (by selecting a group)
    • Hide

      in my course has about 12.000 users, and the quiz has 8.000 attempt more or less

      Show
      in my course has about 12.000 users, and the quiz has 8.000 attempt more or less

      I have a course with 12.000 users, and a quiz with 8.000 attempts more or less, and when i want see the overview report, to manage the users attempts, nothing returns, neither the filters are returned.
      I think the error is in function get_users_by_capability call, because it is invoked without any filters before the user can set them, on first page call (that is ok for small courses).
      The first page call should return the filters form without any results (or graphics).

        1. erro.png
          63 kB
          Carlos Alexandre S. da Fonseca

            timhunt Tim Hunt
            bozohrj Carlos Alexandre S. da Fonseca (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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