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

SQL error in course_module_competency::count_competencies

XMLWordPrintable

      Debug info: Unknown column 'coursecomp.cmid' in 'where clause'
      SELECT COUNT(comp.id)
                        FROM mdl_competency_modulecomp coursemodulecomp
                        JOIN mdl_competency comp
                          ON coursecomp.competencyid = comp.id
                       WHERE coursecomp.cmid = ? 
      [array (
        0 => '126',
      )]
      Error code: dmlreadexception
      
      

      There is an error in SQL we should replace this code

      $sql = 'SELECT COUNT(comp.id)
                        FROM {' . self::TABLE . '} coursemodulecomp
                        JOIN {' . competency::TABLE . '} comp
                          ON coursecomp.competencyid = comp.id
                       WHERE coursecomp.cmid = ? ';
      

      By this code

      $sql = 'SELECT COUNT(comp.id)
                        FROM {' . self::TABLE . '} coursemodulecomp
                        JOIN {' . competency::TABLE . '} comp
                          ON coursemodulecomp.competencyid = comp.id
                       WHERE coursemodulecomp.cmid = ? ';
      

            damyon Damyon Wiese
            taboubii Issam Taboubi
            Luca Bösch Luca Bösch
            Adrian Greeve Adrian Greeve
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h

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