course_competency.php 17.5 KB
Newer Older
Thomas Fradet's avatar
Thomas Fradet committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php 

require_once('../../config.php');

global $USER, $COURSE;

$courseid = required_param('courseid', PARAM_INT);
$studentid = required_param('studentid', PARAM_INT);
$competencyid = required_param('competencyid', PARAM_INT);

$url = new moodle_url('/blocks/competency_iena/course_competency.php', array('courseid' => $courseid, 'studentid' => $studentid, 'competencyid' => $competencyid));
$PAGE->set_url($url);

require_login($courseid, false, NULL);

$PAGE->set_pagelayout('course');
$PAGE->set_title(get_string('title_plugin', 'block_competency_iena'));
$PAGE->set_heading($OUTPUT->heading($COURSE->fullname, 2, 'headingblock header outline'));
19
$PAGE->requires->js("/blocks/competency_iena/js/dropdown.js");
Thomas Fradet's avatar
Thomas Fradet committed
20
$PAGE->requires->js("/blocks/competency_iena/js/cpt-stud-course.js");
21

Thomas Fradet's avatar
Thomas Fradet committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* <<< GESTION DROITS D'ACCÈS >>> */

$context = context_course::instance($courseid);

/* Check if studentid is a course participant */
$is_enrolled = is_enrolled($context, $studentid, '', true);

/* Check if the user is teacher */
$is_teacher = false; 
if (has_capability('moodle/course:update', $context, $USER->id)) {
	$is_teacher = true;
}

/* Redirect student if he try accèss another student data */
if ( $is_teacher === false && $studentid != $USER->id ) {
	$link = $CFG->wwwroot . '/blocks/competency_iena/course_competency.php?courseid=' . $courseid . '&studentid=' . $USER->id . '&competencyid=' . $competencyid;
	header("Location: {$link}");
	exit;
}

echo $OUTPUT->header();

44
45
46

/* <<< REVIEW DATA >>> */

Thomas Fradet's avatar
Thomas Fradet committed
47
48
49
50
51
$sql_rev = "SELECT * FROM {competency_usercomp} 
WHERE userid = ? AND competencyid = ? AND status = ?";
$reviews_data = $DB->get_records_sql($sql_rev, [$studentid, $competencyid, 1]);
$review_asked = count($reviews_data) > 0 ? true : false;

52
53
54

/* <<< POST >>> */

Thomas Fradet's avatar
Thomas Fradet committed
55
56
/* POST EVALUATION */

57
if ( isset($_POST['grade']) ) {
Thomas Fradet's avatar
Thomas Fradet committed
58
	$note = $_POST['note'];
Thomas Fradet's avatar
Thomas Fradet committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
	\core_competency\api::grade_competency_in_course($courseid, $studentid, $competencyid, $_POST['grade'], $note);
	if ( $review_asked ) {
		\core_competency\api::user_competency_start_review($studentid, $competencyid);
		\core_competency\api::user_competency_stop_review($studentid, $competencyid);
		/* Refresh review data */
		$reviews_data = $DB->get_records_sql($sql_rev, [$studentid, $competencyid, 1]);
		$review_asked = count($reviews_data) > 0 ? true : false;
	}
}

/* POST REVIEW */

if ( isset($_POST['review']) ) {
	if ( $_POST['review'] == 'request' ) {
		\core_competency\api::user_competency_request_review($studentid, $competencyid);
	} elseif ( $_POST['review'] == 'cancel' ) {
		\core_competency\api::user_competency_cancel_review_request($studentid, $competencyid);
	}
	/* Refresh review data */
	$reviews_data = $DB->get_records_sql($sql_rev, [$studentid, $competencyid, 1]);
	$review_asked = count($reviews_data) > 0 ? true : false;
}


83
84
/* <<< HELPERS >>> */

Thomas Fradet's avatar
Thomas Fradet committed
85
86
87
88
89
90
91
92
93
function _html($el, $str, $class = "") {
	$class = " class='" . $class . "'";
	echo "<" . $el . $class . ">" . $str . "</" . $el . ">";
}

function _modal_builder($id, $title, $body) {
	return "<div class='modal fade' id='{$id}' tabindex='-1' role='dialog' aria-labelledby='exampleModalScrollableTitle' aria-hidden='true'><div class='modal-dialog modal-dialog-scrollable' role='document'><div class='modal-content'><div class='modal-header'><h5 class='modal-title' id='exampleModalScrollableTitle'>{$title}</h5><button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button></div><div class='modal-body'>{$body}</div></div></div></div>";
}

94

Thomas Fradet's avatar
Thomas Fradet committed
95
96
97
98
99
100
/* <<< GESTION ERREUR ACCÈS >>> */

if ( $is_enrolled === false ) {
	_html("p", "L'étudiant demandé n'est pas inscrit dans ce cours.", "alert alert-warning");
}

101

Thomas Fradet's avatar
Thomas Fradet committed
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/* <<< DATA >>> */

/* Student USER object */
$student = user_get_users_by_id([$studentid])[$studentid];

/* All students */
/* Only if is teacher because it's to load stud list to switch : teacher feature */
$students = NULL;
if ( $is_teacher ) {
	$students = get_enrolled_users($context);
}

/* Course modules linked to this competency */
$cm_ids = \core_competency\api::list_course_modules_using_competency($competencyid, $courseid);

/* Competency */
$u_c_cpt = \core_competency\api::get_user_competency_in_course($courseid, $studentid, $competencyid);
$cpt = new \core_competency\competency($competencyid);
$cpt_scale = $cpt->get_scale()->scale_items;
$eval = "-"; /* current eval string */
if ( $u_c_cpt->get('grade') != null ) {
	$eval = $cpt_scale[$u_c_cpt->get('grade') - 1];
}
$proficiency = $u_c_cpt->get('proficiency') == 1 ? "Oui" : "Non";
126
$proficiency_class = $u_c_cpt->get('proficiency') == 1 ? "success" : "secondary";
Thomas Fradet's avatar
Thomas Fradet committed
127
128
129
130
131

/* All course competencies */
$course_cpts = \core_competency\course_competency::list_competencies($COURSE->id);


132
/* <<< PAGE >>> */
Thomas Fradet's avatar
Thomas Fradet committed
133
134

/* STUDENT NAME */
135
136

_html("h2", $student->firstname . " " . $student->lastname, "h3' style='margin-bottom: 0.3rem;'");
Thomas Fradet's avatar
Thomas Fradet committed
137
138

/* SWITCH STUDENT FORM */
139

Thomas Fradet's avatar
Thomas Fradet committed
140
if ( $is_teacher && $students != NULL && count($students) != 0 ) {
141
	echo "<form action='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php' id='change_student' class='form-inline m-b-1' autocomplete='off' style='display: block;height: 1.5rem;'>";
Thomas Fradet's avatar
Thomas Fradet committed
142
143
144
	echo "<input type='text' hidden name='courseid' value='{$courseid}'>";
	echo "<input type='text' hidden name='competencyid' value='{$competencyid}'>";
	echo "<span hidden id='studentid'>{$studentid}</span>";
145
146
147
148
149

	echo "<div id='student_dropdown' class='iena-dropdown' style='z-index: 10;'>";
	echo "<input type='text' hidden name='studentid' id='studentid_sel' class='iena-drop-input-value' value=''>";
	echo "<input type='text' value='' class='form-control iena-drop-input' style='font-size: .7rem; line-height: 1; width: 300px;' placeholder='{$student->firstname} {$student->lastname}'><button class='btn btn-secondary' id='prevStud' style='font-size: .8rem;line-height: 1.09; margin-left: 0.5rem;'>Précédent</button><button class='btn btn-secondary' id='nextStud' style='font-size: .8rem;line-height: 1.09; margin-left: 0.5rem;'>Suivant</button>";
	echo "<div class='iena-droplist' id='student_list'>";
Thomas Fradet's avatar
Thomas Fradet committed
150
	foreach ($students as $stud) {
151
		echo "<a href='#' data-value='{$stud->id}' class='iena-drop-item' style='display: none;'>{$stud->firstname} {$stud->lastname}</a>";
Thomas Fradet's avatar
Thomas Fradet committed
152
	}
153
154
155
	echo "</div>";
	echo "</div>";
	
Thomas Fradet's avatar
Thomas Fradet committed
156
157
158
	echo "</form>";
}

159
/* INFO ABOUT COMPETENCIES, FRAMEWORK AND CURRENT GRADE */
Thomas Fradet's avatar
Thomas Fradet committed
160

161
_html('h2', $cpt->get('shortname'), "h3' style='margin-bottom: 0.3rem;'");
Thomas Fradet's avatar
Thomas Fradet committed
162

163
/* COMPETENCY TREE PATH */
Thomas Fradet's avatar
Thomas Fradet committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

/* Competency tree parents path from current to framework */
$cptid = $competencyid;
$parent_cpts = array();
while ($cptid > 0) {
	$tmp_cpt = new \core_competency\competency($cptid);
	array_unshift($parent_cpts, ['id' => $tmp_cpt->get('id'), 'shortname' => $tmp_cpt->get('shortname'), 'description' => $tmp_cpt->get('description')]);
	$cptid = $tmp_cpt->get('parentid');
}
/* Framework infos */
$cpt_path_link = "<a href='#' data-toggle='modal' data-target='#modalref'>{$cpt->get_framework()->get('shortname')}</a>" . _modal_builder('modalref', $cpt->get_framework()->get('shortname'), $cpt->get_framework()->get('description'));
/* Each competency info */
foreach ($parent_cpts as $parent_cpt) {
	$cpt_path_link .= " / <a href='#' data-toggle='modal' data-target='#modal{$parent_cpt['id']}'>{$parent_cpt['shortname']}</a>" . _modal_builder("modal{$parent_cpt['id']}", $parent_cpt['shortname'], $parent_cpt['description']);
}
echo "<div style='margin-bottom: 0.7rem;'>" . $cpt_path_link . "</div>";

181
182
/* SWITCH COMPETENCY FORM */

183
echo "<form action='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php' id='change_cpt_form' class='form-inline m-b-1' autocomplete='off' style='display: block;height: 1.5rem;'>";
184
185
186
echo "<input type='text' hidden name='courseid' value='{$courseid}'>";
echo "<input type='text' hidden name='studentid' value='{$studentid}'>";
echo "<span hidden id='competencyid'>{$competencyid}</span>";
187
188
189
190
191

echo "<div id='student_dropdown' class='iena-dropdown' style='z-index: 1;'>";
echo "<input type='text' hidden name='competencyid' id='competencyid_sel' class='iena-drop-input-value' value=''>";
echo "<input type='text' value='' class='form-control iena-drop-input' style='font-size: .7rem; line-height: 1; width: 300px;' placeholder='{$cpt->get('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>";
echo "<div class='iena-droplist' id='competency_list'>";
192
foreach ($course_cpts as $course_cpt) {
193
	echo "<a href='#' data-value='{$course_cpt->get('id')}' class='iena-drop-item' style='display: none;'>{$course_cpt->get('shortname')}</a>";
194
}
195
196
197
echo "</div>";
echo "</div>";

198
199
200
201
echo "</form>";
/* END switch competency form */

/* EVALUATION INFOS AND ACTIONS */
Thomas Fradet's avatar
Thomas Fradet committed
202

203
204
205
206
207
echo "<div class='row'>";
/* Proficiency info */
echo "<div class='col-12 col-lg-3'>";
echo "<div class='alert alert-{$proficiency_class}'>";
echo "<h3 class='h4'>Validé</h3>";
Thomas Fradet's avatar
Thomas Fradet committed
208
echo "<p class='m-b-0 btn p-l-0' style='cursor: text;'>{$proficiency}</p>";
209
210
211
212
213
214
echo "</div>";
echo "</div>";
/* Grade info */
echo "<div class='col-12 col-lg-3'>";
echo "<div class='alert alert-{$proficiency_class}'>";
echo "<h3 class='h4'>Évaluation</h3>";
Thomas Fradet's avatar
Thomas Fradet committed
215
echo "<p class='m-b-0 btn p-l-0' style='cursor: text;'>{$eval}</p>";
216
217
218
219
220
221
222
223
echo "</div>";
echo "</div>";
/* Review and grade ASK and ACTION */
$review_class = $review_asked ? "info" : "secondary";
$review_msg = $review_asked ? "Évaluation demandée" : "Aucune évaluation demandée";
echo "<div class='col-12 col-lg-6'>";
echo "<div class='alert alert-{$review_class}'>";
echo "<h3 class='h4'>{$review_msg}</h3>";
Thomas Fradet's avatar
Thomas Fradet committed
224
if ( $review_asked ) {
225
	/* Request review and cancel buttons */
Thomas Fradet's avatar
Thomas Fradet committed
226
	if ( $USER->id == $studentid ) {
227
228
		/* Student cancel his own review */
		echo "<form method='post' action='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php?courseid={$courseid}&studentid={$studentid}&competencyid={$competencyid}' style='display: inline; margin-right: 1rem;'>";
Thomas Fradet's avatar
Thomas Fradet committed
229
230
231
232
233
234
235
		echo "<input hidden style='display: none;' type='text' name='review' value='cancel'>";
		echo "<button type='submit' class='btn btn-secondary'>Annuler la demande</button>";
		echo "</form>";
	}
} else {
	if ( $USER->id == $studentid ) {
		/* Student ask review */
236
		echo "<form method='post' action='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php?courseid={$courseid}&studentid={$studentid}&competencyid={$competencyid}' style='display: inline; margin-right: 1rem;'>";
Thomas Fradet's avatar
Thomas Fradet committed
237
238
239
240
241
		echo "<input hidden style='display: none;' type='text' name='review' value='request'>";
		echo "<button type='submit' class='btn btn-primary'>Demande d'évaluation</button>";
		echo "</form>";
	}
}
242
243
244
245
246
247
248
249
250
251
252
253
if ( $is_teacher ) {
	/* Evaluation button and modal */
	echo "<a href='#' data-toggle='modal' data-target='#modaleval' class='btn btn-primary'>Évaluer</a>";
	$eval_modale_echo = "";
	$eval_modale_echo .= "<form method='post' action='{$CFG->wwwroot}/blocks/competency_iena/course_competency.php?courseid={$courseid}&studentid={$studentid}&competencyid={$competencyid}'><div class='form-group'><div class='form-group'><label>Évaluation</label><select name='grade' class='form-control'>";
	foreach ($cpt_scale as $key => $item) {
		$grade = $key + 1;
		$selected = "";
		if ( $item == $eval ) {
			$selected = " selected";
		}
		$eval_modale_echo .= "<option value='{$grade}'{$selected}>{$item}</option>";
Thomas Fradet's avatar
Thomas Fradet committed
254
	}
255
256
	$eval_modale_echo .= "</select></div><div class='form-group'><textarea name='note' class='form-control' placeholder=\"Commentaire d'évaluation\"></textarea></div><button type='submit' class='btn btn-primary'>Évaluer</button></form></div>";
	echo _modal_builder("modaleval", "Évaluation", $eval_modale_echo);
Thomas Fradet's avatar
Thomas Fradet committed
257
}
258
259
260
echo "</div>"; /* END review and grade ASK and ACTION - col */
echo "</div>"; /* END review and grade ASK and ACTION - alert */
echo "</div>"; /* END evaluation info and actions row */
Thomas Fradet's avatar
Thomas Fradet committed
261

Thomas Fradet's avatar
Thomas Fradet committed
262
/* GRADES AND EVIDENCES HISTORY CHART AND LIST */
Thomas Fradet's avatar
Thomas Fradet committed
263

Thomas Fradet's avatar
Thomas Fradet committed
264
/* Utilisation des renderer du /admin/tool/lp/class/output pour obtenir toutes les données d'historique construites et organisées */
Thomas Fradet's avatar
Thomas Fradet committed
265
/* /admin/tool/lp/user_competency.php?id= */ 
Thomas Fradet's avatar
Thomas Fradet committed
266
267
268
269
270
271
272
273

$tool_lp_renderer = $PAGE->get_renderer('tool_lp');

$user_competency = \core_competency\api::get_user_competency($studentid, $competencyid);
$user_cpt_all_data = new \tool_lp\output\user_competency_summary($user_competency);
$user_cpt_all_data = $user_cpt_all_data->export_for_template($tool_lp_renderer);
$all_evidences = $user_cpt_all_data->evidence;

Thomas Fradet's avatar
Thomas Fradet committed
274
275
276
277
278
279
280
281
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 = $user_cpt_course_data->export_for_template($tool_lp_renderer);
	$course_evidences = $user_cpt_course_data->usercompetencysummary->evidence;
	$course_evidences_ids = array();
	foreach ($course_evidences as $course_evidence) {
		$course_evidences_ids[] = $course_evidence->id;
Thomas Fradet's avatar
Thomas Fradet committed
282
	}
Thomas Fradet's avatar
Thomas Fradet committed
283
284
285
286
287
288
289
290
291
292
293
294
295
296

	/* CHART EVALUATION HISTORY */

	$labels = array();
	$series_data_all = array();
	$series_data_course = array();
	$series_data_other = array();
	foreach ($all_evidences as $key => $ev) {
		if ( isset($ev->grade) ) {
			$labels[] = userdate($ev->timemodified, "%d/%m/%y");
			$series_data_all[] = $ev->grade;
			if ( in_array($ev->id, $course_evidences_ids) ) {
				$series_data_course[] = $ev->grade;
				$series_data_other[] = 0;
Thomas Fradet's avatar
Thomas Fradet committed
297
			} else {
Thomas Fradet's avatar
Thomas Fradet committed
298
299
				$series_data_course[] = 0;
				$series_data_other[] = $ev->grade;
Thomas Fradet's avatar
Thomas Fradet committed
300
301
302
			}
		}
	}
Thomas Fradet's avatar
Thomas Fradet committed
303
304
305
306

	echo "<div class='alert alert-secondary'>";
	/* $chart = new core\chart_line(); */
	$chart = new core\chart_bar();
Thomas Fradet's avatar
Thomas Fradet committed
307
308
309
	$axis_labels = $cpt_scale;
	array_unshift($axis_labels, "");
	$chart->get_yaxis(0, true)->set_labels($axis_labels);
Thomas Fradet's avatar
Thomas Fradet committed
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
	$series_all = new core\chart_series("Complet", array_reverse($series_data_all));
	$series_course = new core\chart_series('Dans ce cours', array_reverse($series_data_course));
	$series_other = new core\chart_series('Hors de ce cours', array_reverse($series_data_other));
	// $chart->add_series($series_all);
	$chart->add_series($series_course);
	$chart->add_series($series_other);
	$chart->set_labels(array_reverse($labels));
	echo $OUTPUT->render($chart);
	echo "</div>";

	/* LIST COMPLETE HISTORY (evaluation and other evidences) */

	echo "<div class='row'>";
	echo "<div class='col-12'>";
	echo "<h2 class='h3'>Historique</h2><ul class='nav nav-tabs' id='hist-tabs'>
	<li class='nav-item'>
	<a class='nav-link active' href='#' id='all_history_tab'>Complet</a>
	</li>
	<li class='nav-item'>
	<a class='nav-link' href='#' id='course_history_tab'>Dans ce cours</a>
	</li>
	<li class='nav-item'>
	<a class='nav-link' href='#' id='other_history_tab'>Hors de ce cours</a>
	</li>
	</ul>";
	echo "<ul class='list-group' style='max-height: 40vh; overflow: scroll;'>";
	foreach ($all_evidences as $key => $ev) {
		/* mark difference between this course evidences in html for JS filter with tabs */
		if ( in_array($ev->id, $course_evidences_ids) ) {
			$is_course_evidence = " data-evidenceorigin='course'";
		} else {
			$is_course_evidence = " data-evidenceorigin='other'";
Thomas Fradet's avatar
Thomas Fradet committed
342
		}
Thomas Fradet's avatar
Thomas Fradet committed
343
344
345
346
347
348
349
350
		if ( $ev->action === "0" ) {
			$grade_make_proficient = ' list-group-item-light';
		} else { 
			/* proficient or not depending of rating in scale (set in framework by creator) */
			$scale_rules = json_decode($user_cpt_all_data->competency->scaleconfiguration);
			foreach ($scale_rules as $scale_rule) {
				if ( isset($scale_rule->proficient) && $scale_rule->id == $ev->grade && $scale_rule->proficient == 1 ) {
					$grade_make_proficient = ' list-group-item-success';
Thomas Fradet's avatar
Thomas Fradet committed
351
					break;
Thomas Fradet's avatar
Thomas Fradet committed
352
353
354
				} else {
					$grade_make_proficient = '';
				}
Thomas Fradet's avatar
Thomas Fradet committed
355
356
			}
		}
Thomas Fradet's avatar
Thomas Fradet committed
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
		$date = date("d/m/y – H:i", $ev->timemodified);
		echo "<li class='list-group-item{$grade_make_proficient}'{$is_course_evidence}>
		<div class='d-flex w-100 justify-content-between'>";
		if ( isset($ev->gradename) ) {
			echo "<h5 class='mb-1' style='font-weight: 600;'>$ev->gradename ({$ev->id})</h5>";
		}
		echo "<small>{$date}</small>
		</div>
		<p class='mb-1 font-weight-light'><em>{$ev->description}</em></p>";
		if ( isset($ev->note) && $ev->note != "" ) {
			echo "<p class='mb-1' style='font-weight: 500;'>{$ev->note}</p>";
		}
		if ( isset($ev->actionuser) ) {
			echo "<small>Évalué par : <a target='_blank' href='{$ev->actionuser->profileurl}'>{$ev->actionuser->fullname}</a></small>";
		}
		echo "</li>";
Thomas Fradet's avatar
Thomas Fradet committed
373
	}
Thomas Fradet's avatar
Thomas Fradet committed
374
375
376
377
378
	echo "</ul>";
	echo "</div>"; /* evidences list col */
	echo "</div>"; /* evidences list row */

} /* END IF count all evidences (course and outside) == 0 */
Thomas Fradet's avatar
Thomas Fradet committed
379
380

echo "<pre>";
Thomas Fradet's avatar
Thomas Fradet committed
381
// print_r($all_evidences);
Thomas Fradet's avatar
Thomas Fradet committed
382
383
384
385
386
387
388
389
390
391
echo "</pre>";

/* 

TODO : 

Remonter ces données en haut et commenter les données préalablement récupérées d'une autre manière devenues superflues avec celles-ci. Ca réduira l'impact du chargement de la page. Et ça sera plus propre et plus concis. Quand-même garder les éléments en commentaire au cas où les exporteurs sautent dans les prochaines versions de MOODLE. 

*/

392
393
/* LINKED MODULES */

Thomas Fradet's avatar
Thomas Fradet committed
394
_html("h3", "Lié à cette compétence");
395
396
397
398
if ( count($cm_ids) !== 0 ) {
	$modinfo = get_fast_modinfo($courseid);
	echo "<div class='list-group'>";
	foreach ($cm_ids as $cm_id) {
399
400
401
402
403
404
		$url = $modinfo->cms[$cm_id]->url->out();
		$is_assign = strpos($url, '/mod/assign') !== false;
		if ($is_teacher && $is_assign) {
			$url = $url . "&rownum=0&action=grader&userid=" . $studentid;
		}
		echo "<a href='{$url}' target='_blank' class='list-group-item list-group-item-action'><img src='$CFG->wwwroot/theme/image.php/boost/{$modinfo->cms[$cm_id]->modname}/1/icon>' style='height: 1.3rem;'><span class='align-middle'> {$modinfo->cms[$cm_id]->name}</span></a>";
405
406
407
408
409
410
411
412
	}
	echo "</div>";
} else {
	_html("p", "Aucune ressource ou activité n'est liée à cette compétence dans ce cours. ", "alert alert-secondary");
}


echo $OUTPUT->footer();
Thomas Fradet's avatar
Thomas Fradet committed
413
414

?>