diff --git a/competency_iena_competencies_2.php b/competency_iena_competencies_2.php index ef3ff423d41d621b4bc913dd163af4f7f1b13111..b883f819e3ee0f86144ef241a94e5f0e0e7fe755 100644 --- a/competency_iena_competencies_2.php +++ b/competency_iena_competencies_2.php @@ -124,6 +124,9 @@ if ($count_course_cpts === 0) { foreach ($user_course_competencies as $user_course_competency) { // Crée un obj cpt à partir de l'ID. Attention, id de compétence et course_competency sont différents. $cpt = new \core_competency\competency($user_course_competency->get('competencyid')); + /* Visuel indentation to reflect levels in cpt framework */ + $cpt_level_in_framework = substr_count($cpt->get('path'), '/') - 1; /* start at 1 */ + $level_indentation = $cpt_level_in_framework * 1.5; // Récupère les chaines de caractère de l'échelle d'évaluation $cpt_scale = $cpt->get_scale()->scale_items; $eval = "-"; @@ -133,9 +136,9 @@ if ($count_course_cpts === 0) { $proficient_class = $user_course_competency->get('proficiency') == 1 ? " list-group-item-success" : ""; $proficient_str = $user_course_competency->get('proficiency') == 1 ? "Oui" : "Non"; echo " - <a href='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php?courseid={$courseid}&studentid={$studentid}&competencyid={$cpt->get('id')}' class='list-group-item list-group-item-action{$proficient_class}'> + <a href='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php?courseid={$courseid}&studentid={$studentid}&competencyid={$cpt->get('id')}' class='list-group-item list-group-item-action{$proficient_class}' style='padding-left: {$level_indentation}rem;'> <div class='d-flex w-100 justify-content-between'> - <h3 class='mb-1 iena-cpt-action-title h4'>{$cpt->get('shortname')}</h3>"; + <h3 class='mb-1 iena-cpt-action-title h5'>{$cpt->get('shortname')}</h3>"; foreach ($reviews_data as $review) { if ( $review->competencyid == $cpt->get('id') ) { echo "<div><small class='review-badge'>Évaluation demandée</small></div>"; @@ -143,8 +146,7 @@ if ($count_course_cpts === 0) { } } echo "</div> - <p class='small' style='margin-bottom: 0;'>Évaluation : <em>{$eval}</em> / Acquis : {$proficient_str}</p> - <!--<small class=''>Acquis : {$proficient_str}</small>--> + <p class='small' style='margin-bottom: 0;'>Évaluation : {$eval} / Acquis : {$proficient_str}</p> </a>"; } echo "</div>";