public static function LearningPathAccess::checkStepValidation in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/LearningPathAccess.php \Drupal\opigno_learning_path\LearningPathAccess::checkStepValidation()
Returns step user access.
1 call to LearningPathAccess::checkStepValidation()
- LearningPathContent::getAllStepsOnlyModules in src/
LearningPathContent.php - Function for getting group steps without courses, only modules.
File
- src/
LearningPathAccess.php, line 141
Class
- LearningPathAccess
- Class LearningPathAccess.
Namespace
Drupal\opigno_learning_pathCode
public static function checkStepValidation($step, $uid) {
$account = User::load($uid);
switch ($step['typology']) {
case 'Course':
$group = Group::load($step['id']);
return self::triggerHookAccess('status_course_validation_access', $group, $account);
break;
case 'Module':
$module = OpignoModule::load($step['id']);
return self::triggerHookAccess('status_module_validation_access', $module, $account);
break;
}
return TRUE;
}