Skip to content
Snippets Groups Projects
Commit a318a0ff authored by Myriam Delaruelle's avatar Myriam Delaruelle
Browse files

Ajout d'un message quand il n'y a pas d'historique dans le cours OU hors cours

parent 101b903d
Branches
No related tags found
No related merge requests found
...@@ -223,7 +223,8 @@ foreach($all_evidences as $evidence){ ...@@ -223,7 +223,8 @@ foreach($all_evidences as $evidence){
$evidence->description=new lang_string($evidence->descidentifier, $evidence->desccomponent, $evidence->desca); $evidence->description=new lang_string($evidence->descidentifier, $evidence->desccomponent, $evidence->desca);
} }
//$all_evidences=$tool_lp_renderer->render_user_competency_summary($user_cpt_all_data); //$all_evidences=$tool_lp_renderer->render_user_competency_summary($user_cpt_all_data);
$is_evidence_course=true;
$is_evidence_other=true;
if ( count($all_evidences) != 0 ) { if ( count($all_evidences) != 0 ) {
$user_cpt_course_data = new \tool_lp\output\user_competency_summary_in_course($studentid, $competencyid, $courseid); $user_cpt_course_data = new \tool_lp\output\user_competency_summary_in_course($studentid, $competencyid, $courseid);
...@@ -242,6 +243,7 @@ if ( count($all_evidences) != 0 ) { ...@@ -242,6 +243,7 @@ if ( count($all_evidences) != 0 ) {
$series_data_all = array(); $series_data_all = array();
$series_data_course = array(); $series_data_course = array();
$series_data_other = array(); $series_data_other = array();
foreach ($all_evidences as $key => $ev) { foreach ($all_evidences as $key => $ev) {
//partie chart //partie chart
if ( isset($ev->grade) ) { if ( isset($ev->grade) ) {
...@@ -260,15 +262,18 @@ if ( count($all_evidences) != 0 ) { ...@@ -260,15 +262,18 @@ if ( count($all_evidences) != 0 ) {
/* mark difference between this course evidences in html for JS filter with tabs */ /* mark difference between this course evidences in html for JS filter with tabs */
if ( in_array($ev->id, $course_evidences_ids) ) { if ( in_array($ev->id, $course_evidences_ids) ) {
$ev->is_course_evidence = " data-evidenceorigin=course"; $ev->is_course_evidence = " data-evidenceorigin=course";
$is_evidence_course=false;
} else { } else {
$ev->is_course_evidence = " data-evidenceorigin=other"; $ev->is_course_evidence = " data-evidenceorigin=other";
$is_evidence_other=false;
} }
if ( $ev->action === "0" ) { if ( $ev->action === "0" ) {
$ev->grade_make_proficient = ' list-group-item-light'; $ev->grade_make_proficient = ' list-group-item-light';
} else { } else {
/* proficient or not depending of rating in scale (set in framework by creator) */ /* proficient or not depending of rating in scale (set in framework by creator) */
$scale_rules = $cpt->get_scale(); $scale_rules = $cpt->get_scale();
$ev->gradename=$scale_rules->scale_items[$ev->grade]; $ev->gradename=$scale_rules->scale_items[$ev->grade-1];
if($cpt->get_proficiency_of_grade($ev->grade)==1){ if($cpt->get_proficiency_of_grade($ev->grade)==1){
$ev->grade_make_proficient = ' list-group-item-success'; $ev->grade_make_proficient = ' list-group-item-success';
...@@ -357,7 +362,8 @@ $data['count_all_evidences']=count($all_evidences); ...@@ -357,7 +362,8 @@ $data['count_all_evidences']=count($all_evidences);
if(isset($chart)){ if(isset($chart)){
$data['chart']=$OUTPUT->render($chart); $data['chart']=$OUTPUT->render($chart);
} }
$data['is_evidence_course']=$is_evidence_course;
$data['is_evidence_other']=$is_evidence_other;
$data['count_cm_ids']=count($cm_ids); $data['count_cm_ids']=count($cm_ids);
if(isset($modules)){ if(isset($modules)){
... ...
......
...@@ -7,13 +7,27 @@ ...@@ -7,13 +7,27 @@
active_tab.setAttribute('class', 'nav-link active'); active_tab.setAttribute('class', 'nav-link active');
} }
function filter(type) { function filter(type) {
var list_items = document.querySelectorAll('[data-evidenceorigin]'); var list_items = document.querySelectorAll('[data-evidenceorigin]');
for ( var j = 0; j < list_items.length; j++ ) { for ( var j = 0; j < list_items.length; j++ ) {
if ( type.indexOf(list_items[j].dataset.evidenceorigin) != -1 ) { if ( type.indexOf(list_items[j].dataset.evidenceorigin) != -1 ) {
if(list_items[j].dataset.evidencemessage == "courseonly" && type == 'course and other'){
list_items[j].style.display = 'none';
}
else{
list_items[j].style.display = ''; list_items[j].style.display = '';
}
} else { } else {
list_items[j].style.display = 'none'; list_items[j].style.display = 'none';
} }
} }
} }
window.addEventListener('load', function() { window.addEventListener('load', function() {
...@@ -24,5 +38,6 @@ ...@@ -24,5 +38,6 @@
document.getElementById('other_history_tab').addEventListener('click', function (e) { e.preventDefault(); active_tabs(e.target); filter('other'); }); document.getElementById('other_history_tab').addEventListener('click', function (e) { e.preventDefault(); active_tabs(e.target); filter('other'); });
} }
}) })
})(); })();
\ No newline at end of file
...@@ -81,6 +81,16 @@ ...@@ -81,6 +81,16 @@
text-decoration: none!important; text-decoration: none!important;
} }
.iena-history .list-group-item{
border: 1px solid lightgray;
border-top: none;
}
.iena-history .list-group-item.otheronly p{
margin-top: 20px;;
}
.review-badge { .review-badge {
border-radius: 0.15rem; border-radius: 0.15rem;
padding: 0.12rem 0.35rem; padding: 0.12rem 0.35rem;
... ...
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<div id='student_dropdown' class='iena-dropdown' style='z-index: 10;'> <div id='student_dropdown' class='iena-dropdown' style='z-index: 10;'>
<input type='text' hidden name='studentid' id='studentid_sel' class='iena-drop-input-value' value=''> <input type='text' hidden name='studentid' id='studentid_sel' class='iena-drop-input-value' value=''>
<div class="form-group" style="margin-bottom:0"> <div class="form-group" style="margin-bottom:0">
<label for="exampleInputEmail1">Etudiant</label> <label for="exampleInputEmail1"><b>Etudiant</b></label>
<div class="form-inline "><input type='text' value='' class='form-control iena-drop-input' style=' width: 300px;' placeholder='{{student.firstname}} {{student.lastname}}'> <div class="form-inline "><input type='text' value='' class='form-control iena-drop-input' style=' width: 45%px;' placeholder='{{student.firstname}} {{student.lastname}}'>
<button class='btn btn-secondary' id='prevStud' style=' margin-left: 0.5rem;'>Précédent</button><button class='btn btn-secondary' id='nextStud' style=' margin-left: 0.5rem;'>Suivant</button></div> <button class='btn btn-secondary' id='prevStud' style=' margin-left: 0.5rem;'>Précédent</button><button class='btn btn-secondary' id='nextStud' style=' margin-left: 0.5rem;'>Suivant</button></div>
</div> </div>
<div class='iena-droplist' id='student_list'> <div class='iena-droplist' id='student_list'>
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<div id='student_dropdown' class='iena-dropdown' style='z-index: 1;'> <div id='student_dropdown' class='iena-dropdown' style='z-index: 1;'>
<input type='text' hidden name='competencyid' id='competencyid_sel' class='iena-drop-input-value' value=''> <input type='text' hidden name='competencyid' id='competencyid_sel' class='iena-drop-input-value' value=''>
<div class="form-group" style="margin-bottom:0"> <div class="form-group" style="margin-bottom:0">
<label for="exampleInputEmail1">Compétence</label> <label for="exampleInputEmail1"><b>Compétence</b></label>
<div class="form-inline"> <div class="form-inline">
<input type='text' value='' class='form-control iena-drop-input' style='font-size: .7rem; line-height: 1; width: 300px;' placeholder='{{cpt.shortname}}' autocomplete='nope'><button class='btn btn-secondary' id='prevCpt' style='font-size: .8rem;line-height: 1.09; margin-left: 0.5rem;'>Précédent</button><button class='btn btn-secondary' id='nextCpt' style='font-size: .8rem;line-height: 1.09; margin-left: 0.5rem;'>Suivant</button> <input type='text' value='' class='form-control iena-drop-input' style=' width: 60%;' placeholder='{{cpt.shortname}}' autocomplete='nope'><button class='btn btn-secondary' id='prevCpt' style=' margin-left: 0.5rem;'>Précédent</button><button class='btn btn-secondary' id='nextCpt' style=' margin-left: 0.5rem;'>Suivant</button>
</div> </div>
</div> </div>
<div class='iena-droplist' id='competency_list'> <div class='iena-droplist' id='competency_list'>
...@@ -167,15 +167,21 @@ ...@@ -167,15 +167,21 @@
<p class='mb-1 font-weight-light'><em>{{description}}</em></p> <p class='mb-1 font-weight-light'><em>{{description}}</em></p>
</li> </li>
{{/is_course_evidence}} {{/is_course_evidence}}
{{^is_course_evidence}}
<li> {{#is_evidence_course}}
<li class='list-group-item courseonly' data-evidenceorigin='course' data-evidencemessage="courseonly">
<p>La compétence n'a pas été évaluée dans ce contexte.</p> <p>La compétence n'a pas été évaluée dans ce contexte.</p>
</li> </li>
{{/is_course_evidence}} {{/is_evidence_course}}
{{#is_evidence_other}}
<li class='list-group-item otheronly' data-evidenceorigin='other' data-evidencemessage="courseonly" style="display: none;">
<p>La compétence n'a pas été évaluée dans ce contexte.</p>
</li>
{{/is_evidence_other}}
{{/all_evidences}} {{/all_evidences}}
{{^all_evidences}} {{^all_evidences}}
<li><p><i>La compétence n'a pas encore été évaluée.</i></p></li> <li class='list-group-item'><p><i>La compétence n'a pas encore été évaluée.</i></p></li>
{{/all_evidences}} {{/all_evidences}}
</ul> </ul>
</div> </div>
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment