MDL-53272 search: Catch missing record exceptions

This commit is contained in:
David Monllao
2016-04-04 15:36:59 +08:00
parent aeccf4bd94
commit 54abd66aca
+1 -1
View File
@@ -124,8 +124,8 @@ abstract class base_activity extends base_mod {
public function check_access($id) {
global $DB;
$activity = $this->get_activity($id);
try {
$activity = $this->get_activity($id);
$cminfo = $this->get_cm($this->get_module_name(), $activity->id, $activity->course);
$cminfo->get_course_module_record();
} catch (\dml_missing_record_exception $ex) {