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

Student who did not complete a course received a certificate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.10
    • Fix Version/s: None
    • Labels:
      None
    • Plugin Version:
      2020121700
    • Affected Branches:
      MOODLE_310_STABLE

      Description

      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
      }

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rdebleu Renaat Debleu
            Participants:
            Component watchers:
            Emilio Lozano, Marina Glancy, Mikel Martín Corrales
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: