MDL-71252 completion: Avoid showing the 'Mark as done' button

The following activites will be applied:
 - Label
 - File (Force download/Open/In pop-up)
 - URL (Open/In pop-up)
This commit is contained in:
Huong Nguyen
2021-04-26 14:25:31 +07:00
parent fe04d078a4
commit d3dc55b4d5
15 changed files with 539 additions and 10 deletions
@@ -138,6 +138,17 @@ abstract class activity_custom_completion {
return $descriptions[$rule];
}
/**
* Show the manual completion or not regardless of the course's showcompletionconditions setting.
* Returns false by default for plugins that don't need to override the course's showcompletionconditions setting.
* Activity plugins that need to always show manual completion need to override this function.
*
* @return bool
*/
public function manual_completion_always_shown(): bool {
return false;
}
/**
* Fetches the module's custom completion class implementation if it's available.
*