Exemple #1
0
 /**
  * Checks if course module has any conditions that may make it unavailable for
  * all or some of the students
  *
  * This function is internal and is only used to create CSS classes for the module name/text
  *
  * @param cm_info $mod
  * @return bool
  */
 protected function is_cm_conditionally_hidden(cm_info $mod)
 {
     global $CFG;
     $conditionalhidden = false;
     if (!empty($CFG->enableavailability)) {
         $info = new \core_availability\info_module($mod);
         $conditionalhidden = !$info->is_available_for_all();
     }
     return $conditionalhidden;
 }