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

Unknown column 'reviewer.userid' in 'where clause' in h5pactivity

XMLWordPrintable

      On accessing a H5P Module we get the following error:

       

      Debug-Info:  Unknown column 'reviewer.userid' in 'where clause'
      SELECT COUNT
      FROM mdl_user u JOIN mdl_user_enrolments ej1_ue ON ej1_ue.userid = u.id
      JOIN mdl_enrol ej1_e ON (ej1_e.id = ej1_ue.enrolid AND ej1_e.courseid = ?)
      JOIN (SELECT DISTINCT userid
      FROM mdl_role_assignments
      WHERE contextid IN (1,839,891,894)
      AND roleid IN (6,5,11,4,3,1)
      ) ra ON ra.userid = u.id
      LEFT
      JOIN mdl_h5pactivity_attempts ha ON ha.userid = u.id
      WHERE 1 = 1 AND u.deleted = 0 AND u.id <> ? AND u.deleted = 0 AND reviewer.userid IS NULL AND ha.h5pactivityid = ? AND ha.completion = ?
      [array (
      0 => '14',
      1 => '1',
      2 => '12',
      3 => 1,
      )]
      Error code: dmlreadexception

       

      I can not give any repruduction instructions. It only appears on one system. So we only can guess it has something to do with that systems settings.

       

      What i could find out is that the core function the H5P aktivity used to generate the reveiwersjoin didnt return a join(in function get_active_users_join):

       // But excluding all reviewattempts users converting a capabilities join into left join.
      $reviewersjoin = get_with_capability_join($context, 'mod/h5pactivity:reviewattempts', 'u.id');

      That missing join leads to the error above. But we could not figure out why the join is missing.

            pholden Paul Holden
            b.wolf82 Benjamin Wolf
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 46 minutes
                1h 46m

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