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

Fix single view for sections

parent e3278bde
No related branches found
No related tags found
No related merge requests found
...@@ -48,18 +48,20 @@ class content extends content_base { ...@@ -48,18 +48,20 @@ class content extends content_base {
global $CFG, $COURSE, $USER; global $CFG, $COURSE, $USER;
$data=parent::export_for_template($output); $data=parent::export_for_template($output);
//$section_entity = new course_format_iena_sections();
//Single section
// return false if completion disabled (site or course) if(!$data->hasnavigation){
$completion=new course_format_iena_completion(); $completion=new course_format_iena_completion();
$cpl = $completion->get_completion_by_sections($data->sections); $cpl = $completion->get_completion_by_sections($data->sections);
/* Passer le calcul de complétion de la classe course_format_iena_completion à part à la vue qui fait le header permet de ne pas récupérer deux fois les mêmes informations. */ /* Passer le calcul de complétion de la classe course_format_iena_completion à part à la vue qui fait le header permet de ne pas récupérer deux fois les mêmes informations. */
//$header = new view_course_header($nameSections, $idSections, $course, $cpl); //$header = new view_course_header($nameSections, $idSections, $course, $cpl);
$progress= $this->create_view($cpl); $progress= $this->create_view($cpl);
foreach ($progress as $key => $value) { foreach ($progress as $key => $value) {
$data->$key=$value; $data->$key=$value;
}
} }
//$data->progress=(object)$progress; //$data->progress=(object)$progress;
//$data->student=$progress['student']; //$data->student=$progress['student'];
//$data->summary=$progress['summary']; //$data->summary=$progress['summary'];
...@@ -129,4 +131,8 @@ class content extends content_base { ...@@ -129,4 +131,8 @@ class content extends content_base {
]; ];
return $this->get_data($infos); return $this->get_data($infos);
} }
} }
...@@ -983,6 +983,8 @@ tbody th{ ...@@ -983,6 +983,8 @@ tbody th{
font-size: medium; font-size: medium;
font-size: large; font-size: large;
font-weight: 900; font-weight: 900;
position: relative;
top: 2px;
} }
.iena-icon-distance::after{ .iena-icon-distance::after{
...@@ -992,6 +994,8 @@ tbody th{ ...@@ -992,6 +994,8 @@ tbody th{
font-size: medium; font-size: medium;
font-size: large; font-size: large;
font-weight: 950; font-weight: 950;
position: relative;
top: 2px;
} }
......
...@@ -286,9 +286,9 @@ ...@@ -286,9 +286,9 @@
{{/sectionnavigation}} {{/sectionnavigation}}
<ul class="{{format}}"> <ul class="{{format}}">
{{#singlesection}} {{#singlesection}}
{{$ format_iena/content/section }} {{$ format_iena/courseformat/content/section }}
{{> format_iena/content/section }} {{> format_iena/courseformat/content/section }}
{{/ format_iena/content/section }} {{/ format_iena/courseformat/content/section }}
{{/singlesection}} {{/singlesection}}
</ul> </ul>
{{#sectionselector}} {{#sectionselector}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment