Minor - Avoid notice if certificate_data is not defined. In this case, the gradebook considers that there is no sub-gradebook and apparently everything works fine

ofaj
Yannick Warnier 9 years ago
parent b247897f03
commit 74642d9eec
  1. 4
      main/inc/lib/certificate.lib.php

@ -160,7 +160,9 @@ class Certificate extends Model
$params['hide_print_button'] = isset($params['hide_print_button']) ? true : false;
$my_category = Category :: load($this->certificate_data['cat_id']);
if (isset($this->certificate_data)) {
$my_category = Category :: load($this->certificate_data['cat_id']);
}
if (isset($my_category[0]) &&
$my_category[0]->is_certificate_available($this->user_id)

Loading…
Cancel
Save