Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-8358

Student who did not complete a course received a certificate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.10
    • None
    • 2020121700
    • MOODLE_310_STABLE

      The course certificate does not uses the course completion api to calculate if the course was completed or not.

      $result = $DB->get_field('course_completions', 'timecompleted', ['course' => $course->id, 'userid' => $user->id]);
      $completiondate = $result ? userdate($result, get_string('strftimedatefullshort')) : "";

      In some cases, the course_completion record exist, with empty completion dates, so the student gets a certificate (with empty completion date and empty grades) while he/she should not.

      Perhaps there should be an extra check to see if the course was completed before issuing a certificate?

      $completioninfo = new \completion_info($course);
      if ($completioninfo->is_enabled() && $completioninfo->is_course_complete($user->id)) {
         // issue certificate
      }

       

       

            Unassigned Unassigned
            rdebleu Renaat Debleu
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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