Skip to content
Snippets Groups Projects
Commit d6e6a7ad authored by DELARUELLE Myriam's avatar DELARUELLE Myriam
Browse files

added option to disable activity links to bubbles in the student progress dashboard

parent fe7c3f5f
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,9 @@ class content extends content_base {
$course_data=[];
$course_data['student']=false;
//if user is a student
$format = course_get_format($COURSE);
$formatoptions = $format->get_format_options();
if(!has_capability('course/iena:suivi', $context = \context_course::instance($COURSE->id), $USER->id) &&$infos["progress"]){
$course_data['progress_total']=$infos['progress']->total;
......@@ -103,8 +106,9 @@ class content extends content_base {
}
$course_data['student']=true;
}
$course_data['summary']=$COURSE->summary;
$course_data['enableclickicons']=$formatoptions['enableclickicons'];
return $course_data;
}
......
......@@ -108,4 +108,6 @@ $string['display_status']="Enable status \"Waiting for an evaluation from me\"";
$string['display_groups_help']="Add a column to the table which display the student's group";
$string['display_custom_help']="This option enables the table customization and allows you to add colors to certain activities (just for you), or to define milestones (for all teachers in the course)";
$string['display_details_help']="this option allows you to have the details of an assessment on click: grade, date of evaluation, evaluator, etc.";
$string['display_status_help']="This option adds a new status \"Waiting for an evaluation from me\" which allows you to identify which activities have been completed by the student and require action from the teacher";
\ No newline at end of file
$string['display_status_help']="This option adds a new status \"Waiting for an evaluation from me\" which allows you to identify which activities have been completed by the student and require action from the teacher";
$string['enable_icon_click']="Enable clicks on student progress";
$string['enable_icon_click_help']="By default, students can access directly their activies by clicking on their bubbles in their progress dashboard. You can disable these links so they can't have access to them out of context.";
\ No newline at end of file
......@@ -108,4 +108,6 @@ $string['display_status']="Activer le statut \"En attente d'évaluation de ma pa
$string['display_groups_help']="Cette option ajoute une colonne dans le tableau contenant le nom du groupe de l'étudiant.";
$string['display_custom_help']="Cette option active la personnalisation du tableau et permet d'ajouter des couleurs à certaines activités (personnel), ou de définir des jalons (pour tous les enseignants du cours)";
$string['display_details_help']="Cette option permet à l'enseignant d'avoir les détails d'une évaluation au clic : note, date de l'évaluation, évaluateur...";
$string['display_status_help']="Cette option ajoute un statut 'En attente d'évaluation de ma part qui permet de repérer quelles activités ont été complétées par l'étudiant et nécessite une action de la part de l'enseignant";
\ No newline at end of file
$string['display_status_help']="Cette option ajoute un statut 'En attente d'évaluation de ma part qui permet de repérer quelles activités ont été complétées par l'étudiant et nécessite une action de la part de l'enseignant";
$string['enable_icon_click']="Activer les pastilles cliquables";
$string['enable_icon_click_help']="Par défaut, les étudiants peuvent accéder directement aux activités en cliquant sur leur pastille dans leur interface de progression. Vous pouvez désactiver ces liens pour que les étudiants ne puissent pas accéder aux ressources en dehors d'un certain contexte.";
\ No newline at end of file
......@@ -44,6 +44,10 @@ class format_iena extends format_topics {
'default' => 1,
'type' => PARAM_INT,
);
$courseformatoptions['enableclickicons'] = array(
'default'=> 1,
'type' => PARAM_INT,
);
}
if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {
$choicetab = array();
......@@ -59,6 +63,13 @@ class format_iena extends format_topics {
'element_type' => 'select',
'element_attributes' => array($choicetab),
);
$courseformatoptions['enableclickicons'] = array(
'label' => get_string('enable_icon_click', 'format_iena'),
'element_type' => 'select',
'element_attributes' => array($choicetab),
'help'=> 'enable_icon_click',
'help_component'=>'format_iena',
);
$courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit);
}
return $courseformatoptions;
......
......@@ -809,7 +809,7 @@ th.th-rotate > div > span {
}
.section-progress span.icon-progress::after, .iena-progress-legend span.icon-progress::after{
font-size: small;
line-height: 17px!important;
line-height: 16px!important;
}
......
......@@ -205,10 +205,18 @@
<div class="iena-prog-bubble iena-h-prog-mod-item state-{{completion}}">
<span class="icon-progress"></span>
{{#enableclickicons}}
<a href="{{url}}" class="iena-prog-link">
<span class="popover-module">{{name}}</span>
</a>
{{/enableclickicons}}
{{^enableclickicons}}
<div class="iena-prog-link">
<span class="popover-module">{{name}}</span>
</div>
{{/enableclickicons}}
</div>
{{/modules}}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment