#57 Set the activity as viewed when downloaded
This commit is contained in:
parent
6fffb1a89a
commit
3e638fbeb6
1 changed files with 5 additions and 0 deletions
5
view.php
5
view.php
|
@ -122,6 +122,11 @@ if (empty($action)) {
|
|||
// Insert the record into the database.
|
||||
$DB->insert_record('customcert_issues', $customcertissue);
|
||||
}
|
||||
|
||||
// Set the custom certificate as viewed.
|
||||
$completion = new completion_info($course);
|
||||
$completion->set_module_viewed($cm);
|
||||
|
||||
// Now we want to generate the PDF.
|
||||
$template = new \mod_customcert\template($template);
|
||||
$template->generate_pdf();
|
||||
|
|
Loading…
Reference in a new issue