Skip to content
Snippets Groups Projects
Commit 48e496db authored by Thomas Fradet's avatar Thomas Fradet
Browse files

indentation to reflect levels in competency framework

parent 40a6f1d7
No related branches found
No related tags found
No related merge requests found
......@@ -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>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment