Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1-bobologie-1
  • 2-bobologie-2
  • 3-permutation-de-sections
  • activity-filter
  • clean_tracking_table
  • dev
  • devm4
  • devm42
  • ergonomie_tableau
  • fix_cpts
  • groupes_select
  • interface_admin
  • m4-bugfix-retractable
  • master
  • moodle4.2
  • moodle4.3
  • moodle4.4
  • optimizing
  • pastilles_cliquables
  • refonte_format
  • search_student
  • v3.x
  • v3.11.01
  • v3.11.02
  • v3.5.4plus.01
  • v3.7.01
  • v3.7.02
  • v4.0
  • v4.2
  • v4.2.01
  • v4.3
  • v4.4
32 results

Target

Select target project
  • iena/course-format
1 result
Select Git revision
  • 1-bobologie-1
  • 2-bobologie-2
  • 3-permutation-de-sections
  • activity-filter
  • clean_tracking_table
  • dev
  • devm4
  • devm42
  • ergonomie_tableau
  • fix_cpts
  • groupes_select
  • interface_admin
  • m4-bugfix-retractable
  • master
  • moodle4.2
  • moodle4.3
  • moodle4.4
  • optimizing
  • pastilles_cliquables
  • refonte_format
  • search_student
  • v3.x
  • v3.11.01
  • v3.11.02
  • v3.5.4plus.01
  • v3.7.01
  • v3.7.02
  • v4.0
  • v4.2
  • v4.2.01
  • v4.3
  • v4.4
32 results
Show changes
This diff is collapsed.
<?php
/**
* Created by PhpStorm.
* User: softia
* Date: 06/03/18
* Time: 10:20
*/
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
*
* @package format_iena
* @category format
* @copyright 2018 Softia/Université lorraine
* @author vrignaud camille
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../../../config.php');
global $COURSE, $DB, $USER, $CFG;
$courseID = required_param('courseid', PARAM_INT);
$url = new moodle_url('/course/format/iena/send_message_post.php', array('courseid' => $courseID));
$PAGE->set_pagelayout('course');
$PAGE->set_url($url);
if (!has_capability('course/iena:suivi', $context = context_course::instance($courseID), $USER->id)) {
$link = $CFG->wwwroot . '/course/view.php?id=' . $courseID;
header("Location: {$link}");
exit;
}
$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
require_login($course, false, NULL);
if ($_POST) {
$messageContent = $_POST['summary']['text'];
$usersid = explode(",", $_POST["usersid"]);
// $messageContent .= "<br>". get_string('course', 'format_iena') . " : " . $course->fullname;
$messageContent .= "<br>". get_string('course', 'format_iena') . " : <a href='" . $CFG->wwwroot . "/course/view.php?id=" . $course->id . "'>" . $course->fullname . "</a>";
$messageContent .= "<br> ". get_string('prof', 'format_iena') . " : " . $USER->firstname . " " . $USER->lastname;
$brutMessageContent = $course->fullname . " " . $_POST['summary']['text'];
$course_ctx = context_course::instance($courseID);
$students = get_enrolled_users($course_ctx);
// sending a notification to each students
foreach ($usersid as $userID) {
foreach ($students as $student) {
if ($student->id == $userID) {
$message = new \core\message\message();
$message->courseid = $course->id;
$message->component = 'moodle';
$message->name = 'instantmessage';
$message->userfrom = $USER;
$message->notification = '0';
$message->fullmessageformat = FORMAT_HTML;
$message->subject = "Rappel : " . $course->fullname;
$message->smallmessage = $messageContent;
$message->fullmessage = $brutMessageContent;
$message->fullmessagehtml = $messageContent;
$message->userto = $student;
$messageid = message_send($message);
break;
}
}
}
$link = $CFG->wwwroot . '/course/view.php?id=' . $courseID;
header("Location: {$link}");
exit;
// $message = new \core\message\message();
// $message->component = 'moodle';
// $message->name = 'instantmessage';
// $message->userfrom = $USER;
// $message->userto = $USER;
// $message->subject = 'message subject 1';
// $message->fullmessage = 'message body';
// $message->fullmessageformat = FORMAT_MARKDOWN;
// $message->fullmessagehtml = '<p>message body</p>';
// $message->smallmessage = 'small message';
// $message->notification = '0';
// $message->contexturl = 'http://GalaxyFarFarAway.com';
// $message->contexturlname = 'Context name';
// $message->replyto = "random@example.com";
// $content = array('*' => array('header' => ' test ', 'footer' => ' test ')); // Extra content for specific processor
// $message->set_additional_content('email', $content);
// $message->courseid = $COURSE->id; // This is required in recent versions, use it from 3.2 on https://tracker.moodle.org/browse/MDL-47162
// $messageid = message_send($message);
}
$dataSection = $DB->get_record('format_iena', array('id_section' => $sectionId), '*');
$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
// require_login($course, false, NULL);
echo $OUTPUT->header();
echo $OUTPUT->footer();
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: softia
* Date: 06/03/18
* Time: 10:20
*/
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
*
* @package format_iena
* @category format
* @copyright 2018 Softia/Université lorraine
* @author vrignaud camille
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../../../config.php');
global $COURSE, $DB, $USER, $CFG;
$courseID = required_param('courseid', PARAM_INT);
$url = new moodle_url('/course/format/iena/send_message.php', array('courseid' => $courseID));
$PAGE->set_pagelayout('course');
$PAGE->set_url($url);
if (!has_capability('course/iena:suivi', $context = context_course::instance($courseID), $USER->id)) {
$link = $CFG->wwwroot . '/course/view.php?id=' . $courseID;
header("Location: {$link}");
exit;
}
$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
require_login($course, false, NULL);
/*if (isset($_POST['action'])) {
$messageContent = $_POST['summary']['text'];
$usersid = explode(",", $_POST["usersid"]);
// $messageContent .= "<br>". get_string('course', 'format_iena') . " : " . $course->fullname;
$messageContent .= "<br>". get_string('course', 'format_iena') . " : <a href='" . $CFG->wwwroot . "/course/view.php?id=" . $course->id . "'>" . $course->fullname . "</a>";
$messageContent .= "<br> ". get_string('prof', 'format_iena') . " : " . $USER->firstname . " " . $USER->lastname;
$brutMessageContent = $course->fullname . " " . $_POST['summary']['text'];
$course_ctx = context_course::instance($courseID);
$students = get_enrolled_users($course_ctx);
// sending a notification to each students
foreach ($usersid as $userID) {
foreach ($students as $student) {
if ($student->id == $userID) {
$message = new \core\message\message();
$message->courseid = $course->id;
$message->component = 'moodle';
$message->name = 'instantmessage';
$message->userfrom = $USER;
$message->notification = '0';
$message->fullmessageformat = FORMAT_HTML;
$message->subject = "Rappel : " . $course->fullname;
$message->smallmessage = $messageContent;
$message->fullmessage = $brutMessageContent;
$message->fullmessagehtml = $messageContent;
$message->userto = $student;
$messageid = message_send($message);
break;
}
}
}
$link = $CFG->wwwroot . '/course/view.php?id=' . $courseID;
header("Location: {$link}");
exit;
}*/
//$dataSection = $DB->get_record('format_iena', array('id_section' => $sectionId), '*');
//$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
// require_login($course, false, NULL);
$students="";
$back_url=$CFG->wwwroot . '/course/view.php?id=' . $courseID;
if(isset($_POST["students"])){
$students=$_POST["students"];
}
if(isset($_POST["back_url"])){
$back_url=$_POST["back_url"];
}
$data=new stdClass();
$nb = $students != "" ? count( explode(",", $students) ) : 0;
require_once('entity/course_format_iena_message.php');
$send_message = new course_format_iena_message(null, array('back_url'=>$back_url, 'students'=>$students));
if ( $nb == 0 ) {
$data->nb_results=0;
} else {
$data->nb_results=$nb;
$data->users_id=$students;
$courseID = required_param('courseid', PARAM_INT);
$data->link_cancel= $CFG->wwwroot . "/course/view.php?id=" . $courseID;;
$data->form=$send_message->render();
}
//if form is cancelled, we go back to the table. Else, we send the message and then go back to the table, with a success or failure message.
if($send_message->is_cancelled()){
$back_url=$CFG->wwwroot . '/course/format/iena/suivi_unit.php'.$back_url;
header("Location: {$back_url}");
}
else if ($fromform = $send_message->get_data()) {
$back_url=$CFG->wwwroot . '/course/format/iena/suivi_unit.php'.$back_url;
try{
$messageContent = $fromform->summary['text'];
$usersid = explode(",", $fromform->students);
$messageContent .= "<br>". get_string('course', 'format_iena') . " : <a href='" . $CFG->wwwroot . "/course/view.php?id=" . $course->id . "'>" . $course->fullname . "</a>";
$messageContent .= "<br> ". get_string('prof', 'format_iena') . " : " . $USER->firstname . " " . $USER->lastname;
$brutMessageContent = $course->fullname . " " . $_POST['summary']['text'];
$course_ctx = context_course::instance($courseID);
$students = get_enrolled_users($course_ctx);
// sending a notification to each students
foreach ($usersid as $userID) {
foreach ($students as $student) {
if ($student->id == $userID) {
$message = new \core\message\message();
$message->courseid = $course->id;
$message->component = 'moodle';
$message->name = 'instantmessage';
$message->userfrom = $USER;
$message->notification = '0';
$message->fullmessageformat = FORMAT_HTML;
$message->subject = "Rappel : " . $course->fullname;
$message->smallmessage = $messageContent;
$message->fullmessage = $brutMessageContent;
$message->fullmessagehtml = $messageContent;
$message->userto = $student;
$messageid = message_send($message);
break;
}
}
}
$back_url.="&msg_success=true";
}
catch(Exception $e){
$back_url.="&msg_failure=true";
}
header("Location: {$back_url}");
}
else{
echo $OUTPUT->header();
$renderer = $PAGE->get_renderer('format_iena');
$renderer->display_message($data);
echo $OUTPUT->footer();
}
//echo $view_param_section->get_content($course, $dataSection);
......@@ -60,7 +60,10 @@ ul.iena-editing .voir-plus {
}
.iena-editing h3.sectionname {
margin: 1rem 0;
/*margin: 1rem 0;*/
margin: 0;
padding:0 10px;
background: transparent;
}
/*
......@@ -94,6 +97,7 @@ ul.nav.navbar-nav.ml-auto {
padding-bottom: 1.3rem;
padding-top: 1%;
clear: both;
border-bottom: none!important;
}
.iena-section > .card.card_block {
......@@ -101,18 +105,24 @@ ul.nav.navbar-nav.ml-auto {
}
.set_height {
min-height: 3rem;
line-height: 1.7rem;
/*min-height: 3rem;*/
line-height: 2.4rem;
}
.heading-iena {
background: #666;
background: #D6D6D6;
padding: 0rem;
color: white;
float: left;
width: 100%
}
.heading-iena .right.side{
margin-top: 0;
padding: 0 6px 0;
text-align: right;
width: auto;
}
.iena-heading_title {
background: #2d2d2d;
padding: 0rem;
......@@ -152,20 +162,38 @@ ul.nav.navbar-nav.ml-auto {
.titre_section {
float: left;
padding-top: 1rem;
padding-left: 0.8rem;
/*padding-left: 0.8rem;*/
padding-right: 1rem;
font-size: 1.4rem;
color: #1a1a1a;
font-weight: 100;
/*font-weight: bold;*/
}
.titre_section p {
margin-bottom: 0;
display: inline-block;
padding-left: 0.5rem;
}
.titre_section .label_item.sect-date{
display: inline-block;
border-left: none;
}
.nb_pers {
text-align: center;
background: #d68d01;
float: left;
min-width: 4rem;
padding: 1rem 0.7rem;
font-size: 1rem;
background: #009186;
float: right;
min-width: 4rem;
padding: .6rem .6rem;
font-size: 14px ;
border-radius: 5px;
margin-top: 0.35rem;
line-height: 0.5rem;
margin-right: .4rem;
margin-left: .4rem;
}
.nb_pers a {
color: white;
......@@ -180,17 +208,20 @@ ul.nav.navbar-nav.ml-auto {
}
.label_item.sect-date {
color: #fafafa;
border: 1px solid #fafafa;
border-radius: .15rem;
/* margin: 0.9rem; */
margin: 0.9rem 0.2rem 0.9rem 0.2rem;
/* margin-right: 0; */
padding: .05rem .6rem;
float: left;
font-weight: 700;
background-color: #666;
font-size: 0.85rem;
/* color: #fafafa; */
/* border: 1px solid #fafafa; */
border-right: 1px solid white;
border-left: 1px solid white;
border-radius: .15rem;
/* margin: .9rem .2rem .9rem .2rem; */
padding: .05rem .6rem;
float: left;
font-weight: 700;
/* background-color: #666; */
font-size: .85rem;
line-height: 2.4rem;
color: #666;
font-weight: 400;
}
.iena-description {
......@@ -273,8 +304,10 @@ ul.nav.navbar-nav.ml-auto {
/* Bottom header */
.iena-course-header-bottom {
margin-bottom: 1.6rem;
.iena-course-header > .iena-course-header-bottom {
margin-bottom: 40px;
background: #eaeaea;
padding: 15px;
}
/* Toggler */
......@@ -296,6 +329,33 @@ ul.nav.navbar-nav.ml-auto {
/* Progress detail */
.iena-progress-header .iena-progress-label, .iena-progress-header .progress-wrapper{
display: inline-block;
}
.iena-progress-header .progress{
width: 200px;
background-color:white;
}
.iena-progress-header{
background-color: #eaeaea;
padding: 10px;
margin-bottom: 20px;
}
.progress-wrapper{
vertical-align: 8%;
}
.iena-h-prog-sect{
margin-left: 5px!important;
padding-left: 20px;
margin-top: 7px;
border-left: 1px solid lightgrey;
}
.iena-h-prog-sect h2 {
margin-bottom: 1rem;
}
......@@ -304,30 +364,62 @@ ul.nav.navbar-nav.ml-auto {
clear: both;
}
.iena-progress-legend #caption-iena{
margin-top: 10px;
}
.iena-progress-legend #caption-iena .caption-status{
margin-right: 0;
display: block;
margin-bottom: 5px;
cursor: default!important;
}
.iena-progress-legend #caption-iena .caption-status .pointer-help{
width: 1rem;
height: 1rem;
vertical-align: middle;
border-radius: 10px;
}
.iena-progress-legend #caption-iena .caption-status .pointer-help .icon-progress{
line-height: 17px;
}
/* Section progression block */
/* Section progression name and % */
.btn-outline-success.iena-h-prog-name {
color: #009085;
border-color: #009085;
border-radius: 0.15rem;
max-width: 300px;
overflow: hidden;
position: relative;
margin-bottom: 0.5rem;
float: left;
clear: left;
min-width: 300px;
text-align: left;
border-color: #009085;
border-radius: .15rem;
max-width: 300px;
display: block;
/* overflow: hidden; */
/* position: relative; */
/* margin-bottom: .5rem; */
/* float: left; */
/* clear: left; */
min-width: 300px;
text-align: left;
}
.iena-h-prog-name{
display: block;
font-size: initial;
}
.btn-outline-success.iena-h-prog-name:before {
content:'';
/*content:'';
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
background:linear-gradient(90deg, rgba(255, 255, 255, 0) 245px, rgba(255, 255, 255, 1) 289px);
*/
}
.btn-outline-success.iena-h-prog-name:hover,
.btn-outline-success.iena-h-prog-name:active {
......@@ -345,16 +437,82 @@ ul.nav.navbar-nav.ml-auto {
border-color: #009085 !important;
}
.details-progress{
padding-left: 0!important;
}
.details-progress .section-progress{
margin-bottom: 0.5rem;
}
.details-progress .section-progress .progress-wrapper{
width: 300px;
display: inline-block;
}
.details-progress .section-progress .progress-wrapper .progress{
height: 0.5rem;
}
.details-progress .section-progress .progress-wrapper .iena-prog-label{
font-size: small;
}
.details-progress:target::before{
display: none!important;
}
.details-progress:before{
display: none!important;
}
/* Represent a course module link as a bullet */
.iena-h-prog-mod-item {
border-radius: 1.5rem;
float: left;
min-width: 1.5rem;
min-height: 1.5rem;
position: relative;
margin-left: 0.25rem;
margin-top: 0.4rem;
display: inline-block;
line-height: 36px;
vertical-align: top;
/* float: left; */
min-width: 1.5rem;
display: inline-block;
/* height: 24px; */
/* width: 24px; */
height: 1.5rem;
position: relative;
margin-left: .25rem;
margin: auto;
text-align: center;
/* margin-top: .4rem;*/
}
.section-progress .iena-h-prog-mod-item{
height: 1rem;
width: 1rem;
min-width: 1rem;
}
.section-progress .iena-prog-bubble .icon-progress{
line-height: 17px;
}
.iena-prog-bubble .icon-progress{
line-height: 24px;
}
.iena-prog-link{
display: block;
display: block;
width: 100%;
height: 100%;
position: absolute;
/* float: right; */
top: 0;
}
/* .iena-h-prog-mod-item.iena-g-prog-done {
background-color: #009085;
border-color: 1px solid red;
......@@ -380,26 +538,26 @@ ul.nav.navbar-nav.ml-auto {
}
/* Course module name in a bubble */
.iena-h-prog-mod-item span {
.iena-h-prog-mod-item span.popover-module {
display: none;
position: absolute;
top: -3rem;
left: -85px;
background-color: #333;
color: #fafafa;
padding: 0 15px;
padding: 0 5px;
width: 200px;
height: 2.5rem;
line-height: 2.5rem;
border-radius: 0.15rem;
font-size: 1rem;
font-size: 0.9rem;
text-align: center;
overflow: hidden;
}
.iena-h-prog-mod-item:hover span {
.iena-h-prog-mod-item:hover span.popover-module {
display: inline;
}
.iena-h-prog-mod-item span:before {
.iena-h-prog-mod-item span.popover-module:before {
content:'';
width:100%;
height:100%;
......@@ -418,5 +576,312 @@ ul.nav.navbar-nav.ml-auto {
}
#summary-wrapper{
padding-left: 1px;
display: block;
max-height: 7rem;
height: auto;
overflow: hidden;
margin-bottom: 5px;
}
/*#title-summary-iena #summary-collapse.collapse:not(.show) {
display: block;
max-height: 7rem;
height: auto;
overflow: hidden;
}
#title-summary-iena #summary-collapse.collapsing {
height: auto;
max-height: 100rem;
-webkit-transition: max-height .35s ease;
-o-transition: max-height .35s ease;
transition: max-height .35s ease;
transition: max-height 1s ease;
}*/;
#days-text{
margin:0 20px 0 5px;
}
/*################################# CSS TABLEAU DE SUIVI ##########################################*/
/* Permet la rotation des entêtes du tableau */
th.th-rotate {
/* Something you can count on */
height: 140px;
white-space: nowrap;
position: sticky;
top:0;
background: white;
}
th.th-rotate > div {
transform:
/* Magic Numbers */
translate(18px, 53px)
/* 45 is really 360 - 45 */
rotate(315deg);
width: 30px;
}
th.th-rotate > div > span {
border-bottom: 1px solid #ccc;
padding: 5px 10px;
padding-bottom: 2px;
width: 180px;
display: block;
}
/* Change la couleur une ligne sur deux dans le tableau */
#table-body tr:nth-child(even) { background: #fafafa; }
#table-body tr:nth-child(odd) { background: #eee; }
#table-body tr{
border-bottom: 1px solid white;
}
/* Colorie la cellule en fonction de l'achèvement */
/*.state-0 { background-color: rgba(0, 143, 132, 0.23); }
.state-1 { background-color: #009085; }
.state-2 { background-color: #009085; }
.state-3 { background-color: rgba(214, 141, 1, 0.4); }*/
.state-0 { background-color: #CECECE; }
.state-1 { background-color: #40ACA3; }
.state-2 { background-color: #40ACA3; }
.state-3 { background-color: #F3A41C};
.state-0 span.icon-progress, .state-1 span.icon-progress, .state-2 span.icon-progress, .state-3 span.icon-progress{
content: "";
display: block;
color: white;
}
.state-1 span.icon-progress::after{
content: "\f1db";
font-family: FontAwesome; width: 100%; display: inline-block;text-align: center;
color: white;
font-size: x-large;
vertical-align: text-bottom;
line-height: 19px;
}
.state-2 span.icon-progress::after{
content: "\f05d";
font-family: FontAwesome; width: 100%; display: inline-block; text-align: center;
color: white;
font-size: x-large;
vertical-align: text-bottom;
line-height: 19px;
}
.state-3 span.icon-progress::after{
content: "\f1db";
font-family: FontAwesome; width: 100%; display: inline-block; text-align: center;
color: white;
font-size: x-large;
vertical-align: text-bottom;
line-height: 19px;
}
.section-progress span.icon-progress::after, .iena-progress-legend span.icon-progress::after{
font-size: small;
}
#first-column-head, #iena-select-all {
vertical-align: bottom;
padding-bottom: 0.5rem;
}
.pointer-help {
cursor: default!important;
}
.stud_perc {
min-width: 45px;
display: inline-block;
}
#table-body td {
border-right: 1px solid #eee;
}
/* Scroll de la table */
#table-body {
display: table-row-group;
/*overflow-y:scroll;*/
/*overflow: auto;
margin-right: 10rem;
height: 300px;
height: 50vh; */
}
#suivi thead {
display: table-header-group;
/*overflow-x:scroll;*/
height: 143px;
}
#suivi thead tr th:nth-child(1) {
/*width:20em;
min-width:20em;*/
}
#suivi thead tr th {
min-width:32px;
}
#suivi tbody tr th {
width:20em;
min-width:20em;
word-break: break-word;
}
#suivi tbody tr td {
min-width:32px;
}
#suivi input[type="checkbox"] {
margin: 5px;
font-size: 1rem;
}
.mb1 { margin-bottom: 1rem; }
.mt1 { margin-top: 1rem; }
#suivi .first-column-iena{
width: 2em;
min-width: 2em;
left: 0;
}
#suivi .second-column-iena{
width: 3em;
min-width: 3em;
left:2em;
text-align: center;
}
#suivi .third-column-iena{
width: 15em;
min-width: 15em;
padding-left: 6px;
left: 10em;
}
#suivi .actions-column-iena{
width: 5em;
min-width: 5em;
left: 5em;
text-align: center;
}
tbody th{
font-weight: normal;
}
#suivi thead .first-column-iena, #suivi thead .second-column-iena, #suivi thead .third-column-iena,#suivi thead .actions-column-iena{
vertical-align: bottom;
padding-bottom: .5rem;
}
#caption-iena .caption-status{
display: inline-block;
margin-right: 20px;
}
#caption-iena .caption-status .pointer-help{
width: 32px;
height: 25px;
margin-right: 2px;
display: inline-block;
vertical-align: bottom;
}
#caption-iena .caption-status .pointer-help .icon-progress{
line-height: 26px;
}
#caption-iena .caption-status .caption-title{
display: inline-block;
}
#caption-iena{
margin-top: 20px;
margin-bottom: 40px;
}
#caption-iena .icon-progress::after{
line-height: 24px;
}
.iena-icon-distance, .iena-icon-presence{
content: "";
display: block;
color: white;
}
.iena-icon-presence::after{
content: "\f0c0";
font-family: FontAwesome; width: 100%; display: inline-block;text-align: center;
color: black;
font-size: large;
}
.iena-icon-distance::after{
content: "\f108";
font-family: FontAwesome; width: 100%; display: inline-block;text-align: center;
color: black;
font-size: large;
}
.iena-caption-sections > .iena-caption-icons, .iena-caption-sections > .iena-caption-icons > * {
display: inline-block;
margin-right: 7px;
}
.iena-caption-sections > .iena-caption-icons{
margin-right: 20px;
}
.table-wrapper{
position: relative;
overflow: auto;
white-space: nowrap;
max-height: 600px;
border:none;
}
.first-column-iena, .second-column-iena, .actions-column-iena, .third-column-iena{
position: sticky;
background: inherit;
}
th.first-column-iena, th.second-column-iena, th.actions-column-iena, th.third-column-iena{
background: white;
z-index: 200;
position: sticky;
top: 0;
}
#partial-table{
margin-bottom: 20px;
}
.iena-message{
margin-top: 20px;
}
\ No newline at end of file
......@@ -29,30 +29,319 @@ require_once('view/view_param_indicateur.php');
require_once('entity/course_format_iena_section_ressources.php');
require_once('entity/course_format_iena_sections.php');
require_once('entity/course_format_iena_groups.php');
$PAGE->requires->css('/course/format/iena/styles.css');
global $COURSE, $DB, $USER, $PAGE;
function init_page($course){
global $PAGE;
// Defines the id of the course with a get parameter
// Getting DB information (*) of the course
$PAGE->set_title($course->fullname);
$PAGE->set_heading($course->fullname . " – " .get_string('table_progress', 'format_iena'));
$PAGE->set_pagelayout('incourse');
/* Cache le menu dans le header ? */
$coursenode = $PAGE->navbar->add(get_string('table_progress', 'format_iena'), null, navigation_node::TYPE_CONTAINER, null, 'suiviena');
$coursenode->make_active();
$coursenode->force_open();
}
function get_groups($context, $active_group_id, $progress, $groups){
global $USER, $COURSE;
/* Groupe du GET provenant du sélecteur de la page du cours, ou premier groupe de l'utilisateur, ou groupe 0 (tous les groupes). */
// @TODO à supprimer si pas utilisé dans le JS (mettre dans la clause IF pour éviter un appel inutile si le GET existe)
$current_user_groups_ids=array();
/* Si pas de groupe dans le get ou groupe 0 (tous) mais pas le droit => premier groupe existant du user ou groupe 0 (tous) */
if ($active_group_id == NULL || ($active_group_id == 0 && !has_capability('course/iena:suivi_edit', $context, $USER->id)) ) {
if ( count($current_user_groups_ids) == 0 ) {
$active_group_id = 0;
} else {
$current_user_groups_ids = groups_get_user_groups($COURSE->id, $USER->id)[0];
$active_group_id = $current_user_groups_ids[0];
}
}
/* Groupes du cours avec id, nom et liste des id utilisateur de tous les membres (3 clefs d'un tableau de groupes : id, name, member) */
$current_user_groups = [];
$active_group_name = "";
foreach ($groups as $group) {
/* Récupération du nom du group actif au passage */
if ( $group->id == $active_group_id ) {
$active_group_name = $group->name;
$group->selected='selected';
}
foreach ($current_user_groups_ids as $ugi) {
if ( $group->id == $ugi ) {
$current_user_groups[] = $group;
}
}
}
//Réservé pour l'export ?
/*if ( $active_group_id == 0 ) {
foreach ($progress as $prog) {
$prog->groups = "";
foreach ($groups as $group) {
if ( in_array($prog->id, $group->members) ) {
$prog->groups .= $group->name . " ";
}
}
}
}*/
return $groups;
}
//Formate l'achèvement d'activités pour le tableau de suivi. Pour chaque étudiant, on aura dans le bon ordre la liste des modules et le completionstate
function format_progress($progress, $modules, $groups, $active_group_id, $active_section_id){
global $CFG, $COURSE;
$students=array();
foreach ($progress as $prog_info) {
$progress_student=new StdClass();
$progress_student->firstname=$prog_info->firstname;
$progress_student->lastname=$prog_info->lastname;
//$progress_student->name=$prog_info->firstname." ".$prog_info->lastname;
$progress_student->id=$prog_info->id;
$progress_student->email=$prog_info->email;
$progress_student->progress=array();
$progress_student->report_link=$CFG->wwwroot . "/report/outline/user.php?id=" . $progress_student->id . "&course=" . $COURSE->id . "&mode=outline";
$progress_student->message_link=$CFG->wwwroot . "/message/index.php?id=" . $progress_student->id;
if ( $active_group_id == 0 ) {
$progress_student->groups = "";
foreach ($groups as $group) {
if ( in_array($progress_student->id, $group->members) ) {
$progress_student->groups .= $group->name . " ";
}
}
}
foreach($modules as $key=>$module){
$module_progress=new StdClass();
if(!isset($prog_info->progress[$module->id])){
$module_progress->completionstate='0';
}
else{
$module_progress->completionstate=$prog_info->progress[$module->id]->completionstate;
}
/*if($module->section == $active_section_id || $active_section_id == 0){
$module_progress->visible=true;
}
else{
$module_progress->visible=false;
}*/
$module_progress->namemodule=$module->name;
$module_progress->idmodule=$module->id;
$progress_student->progress[$key]=$module_progress;
}
$students[]=$progress_student;
}
return $students;
}
function get_activities($completion, $active_section_id){
$activities = $completion->get_activities();
$modules = [];
foreach ($activities as $activity) {
$module = new StdClass();
$module->id = $activity->id;
$module->name = $activity->name;
$displayname = format_string($activity->name, true, array('context' => $activity->context));
$module->displayname = strlen($displayname) > 20 ? mb_substr($displayname, 0, 19, 'UTF-8').'…' : $displayname;
$module->section = $activity->section;
$modules[] = $module;
if($activity->section == $active_section_id || $active_section_id==0 ){
$module->visible=true;
}
else{
$module->visible=false;
}
}
return $modules;
}
function get_sections($active_section_id){
global $COURSE;
// Liste des sections du cours
$modinfo = get_fast_modinfo($COURSE->id);
$sections_info_all = $modinfo->get_section_info_all();
$sections = [];
foreach ($sections_info_all as $key => $section_info) {
$section = new StdClass();
$section->id = $section_info->id;
$section->name = $section_info->name === NULL || $section_info->name === '' ? 'Section ' . $key : $section_info->name;
if($section->id==$active_section_id){
$section->selected="selected";
}
$sections[] = $section;
}
return $sections;
}
function set_filters($data, $filters, $symbols, $sections, $groups, $current_user_groups, $active_group_name, $active_section_id){
if (isset($_GET['filter'])) {
$filterComplete = $_GET['filter'];
$symbols[substr($filterComplete, 0, 1)]->selected="selected";
$filters[substr($filterComplete, 1)]->selected="selected";
} else {
$filters["0"]->selected="selected";
$symbols[">"]->selected="selected";
}
$data['filters']=array_values($filters);
$data['symbols']=array_values($symbols);
$data["sections"]=$sections;
$data["groups"]=array_values($groups);
$data['current_user_groups']=$current_user_groups;
//$data['active_section_id']=$active_section_id;
if($active_group_name==""){
$data['default_group']='selected';
}
$data['data']=array();
$data['data']["sections"]=$sections;
$data['data']["groups"]=array_values($groups);
$data['data']['current_user_groups']=$current_user_groups;
$data['data']['active_group_name']=$active_group_name;
$data['data']['active_section_id']=$active_section_id;
return $data;
}
function set_data($data, $modules, $progress, $groups, $active_group_id, $active_section_id){
global $COURSE, $USER, $CFG;
$data["modules"]=$modules;
$count_modules=count($data["modules"]);
$data["students"]=format_progress($progress, $modules, $groups, $active_group_id, $active_section_id);
$count_students=count($data["students"]);
if($count_students>0 && $count_modules>0){
$data['count_results']=count($data["students"]);
}
if (has_capability('course/iena:suivi_edit', $context = context_course::instance($COURSE->id), $USER->id)) {
$data['link_bulkcompletion']= $CFG->wwwroot . "/course/bulkcompletion.php?id=" . $COURSE->id;
}
$data['link_classicview']= $CFG->wwwroot . "/report/progress/index.php?course=" . $COURSE->id;
//Pour le téléchargement du tableau ?
if(!isset($data['data'])){
$data['data']=array();
}
$data['data']=json_encode($data);
return $data;
}
$filters=[
"0"=>(object)[
"value"=>"0",
"name"=>"0",
],
"25"=>(object)[
"value"=>"25",
"name"=>"25%",
],
"50"=>(object)[
"value"=>"50",
"name"=>"50%",
],
"75"=>(object)[
"value"=>"75",
"name"=>"75%",
],
"100"=>(object)[
"value"=>"100",
"name"=>"100%",
]
,
];
$symbols=[
"="=>(object)[
"value"=>"=",
"name"=>"=",
],
"<"=>(object)[
"value"=>"<",
"name"=>"<",
],
">"=>(object)[
"value"=>">",
"name"=>">",
]
];
global $COURSE, $DB, $USER;
// global $CFG;
// require_once ($CFG->libdir . '/csvlib.class.php');
// $arr = [
// ["a", "b", "c"],
// ["d", "e", "f"]
// ];
// csv_export_writer::download_array("machin.csv", $arr);
// Defines the id of the course with a get parameter
$courseID = required_param('courseid', PARAM_INT);
// Define the url of the view
$url = new moodle_url('/course/format/iena/suivi_unit.php', array('courseid' => $courseID));
$PAGE->set_pagelayout('course');
$PAGE->set_url($url);
// Getting DB information (*) of the course
$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
require_login($course, false, NULL);
$PAGE->set_title($course->fullname);
$PAGE->set_heading($course->fullname . " – Suivi des étudiants");
require_login($course);
require_once($CFG->libdir . '/completionlib.php');
$completion = new completion_info($course);
$context = context_course::instance($COURSE->id);
// if (!has_capability('moodle/course:sectionvisibility', $context = context_course::instance($courseID), $USER->id)) {
if (!has_capability('course/iena:suivi', $context = context_course::instance($courseID), $USER->id)) {
......@@ -60,46 +349,85 @@ if (!has_capability('course/iena:suivi', $context = context_course::instance($co
header("Location: {$link}");
exit;
}
echo $OUTPUT->header();
if(isset($_GET['groupid'])){
$active_group_id = $_GET['groupid'];
}
else{
$active_group_id=0;
}
$progress = $completion->get_progress_all(
'',
array(),
$active_group_id,
'u.lastname ASC, u.firstname ASC',
'',
'',
$context
);
$active_section_id=0;
// Section du get acquise depuis le clic sur l'indicateur dans la page du cours, section depuis laquelle on a cliqué sur le bouton pour voir le suivi.
if(isset($_GET['sectionid'])){
$active_section_id = $_GET['sectionid'];
}
if ( $active_group_id == 0 ) {
//On récupère les ids des membres parce que dans l'excel on veut savoir qui appartient à quel groupe
//$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', true);
$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', true);
} else {
//On ne récupère pas les ids des membres
$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', false);
}
// If a post is sent trought the page
if ($_POST) {
/*if ($_POST && !isset($_POST["action"])) {
require_once("$CFG->libdir/formslib.php");
require_once('view/view_send_message.php');
$usersID = $_POST["api_url"];
$view = new view_send_message();
echo $view->get_content($usersID);
} else {
} else */
if(isset($_POST['action']) && !empty($_POST['action'])) {
//Si on change les filtres
$data=[];
$modules=get_activities($completion, $active_section_id);
// $view_param_indicateur = new view_param_indicateur();
// $sections = $view_param_indicateur->get_course_sections_modules();
// $Tab_id_modules = array();
// $i = 0;
// foreach ($sections as $section) {
// foreach ($section->ressources as $mod) {
// $Tab_id_modules[$i] = $mod->id;
// $i++;
// }
// }
// foreach ($sections as $section) {
// foreach ($Tab_id_modules as $id_module) {
// $verif_db = $DB->get_record('format_iena_settings', array('cmid' => $id_module, 'sectionid' => $section->id), '*');
// if ($verif_db == false) {
// $format_iena_setting_data = new stdClass();
// $format_iena_setting_data->cmid = $id_module;
// $format_iena_setting_data->hide = 0;
// $format_iena_setting_data->courseid = $COURSE->id;
// $format_iena_setting_data->sectionid = $section->id;
// $DB->insert_record('format_iena_settings', $format_iena_setting_data, false);
// }
// }
// }
// require_once('view/view_suivi_unit.php');
require_once('view/view_suivi_unit3.php');
$data=set_data($data, $modules, $progress, $groups, $active_group_id, $active_section_id);
echo json_encode($data);
}
else {
init_page($course, $PAGE);
echo $OUTPUT->header();
$current_user_groups=[];
$active_group_name="";
$data=[];
$modules=get_activities($completion, $active_section_id);
$groups=get_groups($context, $active_group_id, $progress, $groups);
$sections=get_sections($active_section_id);
$data=set_filters($data, $filters, $symbols, $sections, $groups, $current_user_groups, $active_group_name, $active_section_id);
$data=set_data($data, $modules, $progress, $groups, $active_group_id, $active_section_id);
if(isset($_GET["msg_success"])){
$msg=$_GET["msg_success"];
$data["msg_success"]=$msg;
}
$renderer = $PAGE->get_renderer('format_iena');
$renderer->display_completion($data);
echo $OUTPUT->footer();
}
echo $OUTPUT->footer();
\ No newline at end of file
?>
\ No newline at end of file
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
*
* @package format_iena
* @category format
* @copyright 2018 Softia/Université lorraine
* @author vrignaud camille / Thomas Fradet
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../../../config.php');
require_once('view/view_param_indicateur.php');
require_once('entity/course_format_iena_section_ressources.php');
require_once('entity/course_format_iena_sections.php');
require_once('entity/course_format_iena_groups.php');
global $COURSE, $DB, $USER;
// Defines the id of the course with a get parameter
$courseID = required_param('courseid', PARAM_INT);
// Define the url of the view
$url = new moodle_url('/course/format/iena/suivi_unit.php', array('courseid' => $courseID));
$PAGE->set_url($url);
// Getting DB information (*) of the course
$course = $DB->get_record('course', array('id' => $courseID), '*', MUST_EXIST);
//require_login($course, false, NULL);
require_login($course);
$PAGE->set_title($course->fullname);
$PAGE->set_heading($course->fullname . " – Suivi des étudiants");
$PAGE->set_pagelayout('incourse');
/* Cache le menu dans le header ? */
$coursenode = $PAGE->navbar->add('suiviiena', null, navigation_node::TYPE_CONTAINER, null, 'suiviena');
$coursenode->make_active();
$coursenode->force_open();
require_once($CFG->libdir . '/completionlib.php');
$completion = new completion_info($course);
$context = context_course::instance($COURSE->id);
// if (!has_capability('moodle/course:sectionvisibility', $context = context_course::instance($courseID), $USER->id)) {
if (!has_capability('course/iena:suivi', $context = context_course::instance($courseID), $USER->id)) {
$link = $CFG->wwwroot . '/course/view.php?id=' . $courseID;
header("Location: {$link}");
exit;
}
//$PAGE->requires->js_call_amd('format_iena/suivi', 'init');
echo $OUTPUT->header();
/*$filters = [
"all" => "Tous",
"=100" => "100%",
"=0" => "0%",
"<100" => "&lt;100%",
"<50" => "&lt;50%",
"<25" => "&lt;25%",
">50" => "&gt;=50%",
">25" => "&gt;=25%",
">0" => "&gt;0%",
];*/
$filters=[
"0"=>array(
"value"=>"all",
"name"=>"Tous",
),
"1"=>array(
"value"=>"=100%",
"name"=>"100%",
),
"2"=>array(
"value"=>"=0",
"name"=>"0",
),
"3"=>array(
"value"=>"<100",
"name"=>"<100%",
),
"4"=>array(
"value"=>"<50",
"name"=>"<50%",
),
"5"=>array(
"value"=>"<25",
"name"=>"<25%",
),
"6"=>array(
"value"=>">50",
"name"=>">=50%",
),
"7"=>array(
"value"=>">25",
"name"=>">=25%",
),
"8"=>array(
"value"=>"0",
"name"=>">0%",
),
];
/* Groupe du GET provenant du sélecteur de la page du cours, ou premier groupe de l'utilisateur, ou groupe 0 (tous les groupes). */
if(isset($_GET['groupid'])){
$active_group_id = $_GET['groupid'];
}
else{
$active_group_id=NULL;
}
// @TODO à supprimer si pas utilisé dans le JS (mettre dans la clause IF pour éviter un appel inutile si le GET existe)
$current_user_groups_ids=array();
/* Si pas de groupe dans le get ou groupe 0 (tous) mais pas le droit => premier groupe existant du user ou groupe 0 (tous) */
if ($active_group_id == NULL || ($active_group_id == 0 && !has_capability('course/iena:suivi_edit', $context, $USER->id)) ) {
if ( count($current_user_groups_ids) == 0 ) {
$active_group_id = 0;
} else {
$current_user_groups_ids = groups_get_user_groups($COURSE->id, $USER->id)[0];
$active_group_id = $current_user_groups_ids[0];
}
}
/* Groupes du cours avec id, nom et liste des id utilisateur de tous les membres (3 clefs d'un tableau de groupes : id, name, member) */
if ( $active_group_id == 0 ) {
//On récupère les ids des membres
//$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', true);
$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', true);
} else {
//On ne récupère pas les ids des membres
$groups = groups_get_all_groups($COURSE->id, 0, 0, 'g.*', false);
}
$current_user_groups = [];
$active_group_name = "";
foreach ($groups as $group) {
/* Récupération du nom du group actif au passage */
if ( $group->id == $active_group_id ) {
$active_group_name = $group->name;
$group->selected='selected';
}
foreach ($current_user_groups_ids as $ugi) {
if ( $group->id == $ugi ) {
$current_user_groups[] = $group;
}
}
}
/* Liste de tous les utilisateurs avec :
- informations personnelles (tous les utilisateurs du cours)
- liste des activités avec état d'achèvement (si achevées, sinon vide) */
$progress = $completion->get_progress_all(
'',
array(),
$active_group_id,
'u.lastname ASC, u.firstname ASC',
'',
'',
$context
);
//Formate l'achèvement d'activités pour le tableau de suivi. Pour chaque étudiant, on aura dans le bon ordre la liste des modules et le completionstate
function format_progress($progress, $modules){
global $CFG, $COURSE;
$students=array();
foreach ($progress as $prog_info) {
$progress_student=new StdClass();
$progress_student->name=$prog_info->firstname." ".$prog_info->lastname;
$progress_student->id=$prog_info->id;
$progress_student->email=$prog_info->email;
$progress_student->progress=array();
$progress_student->report_link=$CFG->wwwroot . "/report/outline/user.php?id=" . $progress_student->id . "&course=" . $COURSE->id . "&mode=outline";
$progress_student->message_link=$CFG->wwwroot . "/message/index.php?id=" . $progress_student->id;
foreach($modules as $key=>$module){
$module_progress=new StdClass();
if(!isset($prog_info->progress[$module->id])){
$module_progress->completionstate='0';
}
else{
$module_progress->completionstate=$prog_info->progress[$module->id]->completionstate;
}
$module_progress->namemodule=$module->name;
$progress_student->progress[$key]=$module_progress;
}
$students[]=$progress_student;
}
return $students;
}
/* Ajoute les groupes de l'utilisateur pour l'afficher dans l'export */
/* Si le user a le droit d'afficher pour tous les groupes ou qu'il n'y en a pas, on récupère le groupe de l'utilisateur pour qu'il puisse être téléchargé dans le tableau blobal intergroupe. */
if ( $active_group_id == 0 ) {
foreach ($progress as $prog) {
$prog->groups = "";
foreach ($groups as $group) {
if ( in_array($prog->id, $group->members) ) {
$prog->groups .= $group->name . " ";
}
}
}
}
/* Liste de toutes les activités du cours (sauf en attente de suppression). La liste est épurée et constitue un tableau d'objet. */
$activities = $completion->get_activities();
$modules = [];
foreach ($activities as $activity) {
$module = new StdClass();
$module->id = $activity->id;
$module->name = $activity->name;
$displayname = format_string($activity->name, true, array('context' => $activity->context));
$module->displayname = strlen($displayname) > 20 ? mb_substr($displayname, 0, 19, 'UTF-8').'…' : $displayname;
$module->section = $activity->section;
$modules[] = $module;
}
// Liste des sections du cours
$modinfo = get_fast_modinfo($COURSE->id);
$sections_info_all = $modinfo->get_section_info_all();
$sections = [];
// Section du get acquise depuis le clic sur l'indicateur dans la page du cours, section depuis laquelle on a cliqué sur le bouton pour voir le suivi.
if(isset($_GET['sectionid'])){
$active_section_id = $_GET['sectionid'];
}
else{
$active_section_id=0;
}
foreach ($sections_info_all as $key => $section_info) {
$section = new StdClass();
$section->id = $section_info->id;
$section->name = $section_info->name === NULL || $section_info->name === '' ? 'Section ' . $key : $section_info->name;
if($section->id==$active_section_id){
$section->selected="selected";
}
$sections[] = $section;
}
// Filtre actif si il existe (si la page est rechargée pour un filtre de groupe p.ex.)
if (isset($_GET['filter'])) {
$filter = $_GET['filter'];
} else {
$filter = 'all';
}
/*On a récupéré toutes les données, on met ça dans un tableau pour le template*/
$data=array();
$data['filters']=$filters;
$data["sections"]=$sections;
$data["groups"]=array_values($groups);
$data['current_user_groups']=$current_user_groups;
if($active_group_name==""){
$data['default_group']='selected';
}
$data["modules"]=$modules;
$data["students"]=format_progress($progress, $modules);
if (has_capability('course/iena:suivi_edit', $context = context_course::instance($COURSE->id), $USER->id)) {
$data['link_bulkcompletion']= $CFG->wwwroot . "/course/bulkcompletion.php?id=" . $COURSE->id;
}
$data['link_classicview']= $CFG->wwwroot . "/report/progress/index.php?course=" . $COURSE->id;
$data['data']=array();
$data['data']["sections"]=$sections;
$data['data']["groups"]=array_values($groups);
$data['data']['current_user_groups']=$current_user_groups;
$data['data']["modules"]=$modules;
$data['data']["students"]=format_progress($progress, $modules);
$data['data']=json_encode($data['data']);
// If a post is sent trought the page
if ($_POST && !isset($_POST["action"])) {
require_once("$CFG->libdir/formslib.php");
require_once('view/view_send_message.php');
$usersID = $_POST["api_url"];
$view = new view_send_message();
echo $view->get_content($usersID);
} else if(isset($_POST['action']) && !empty($_POST['action'])) {
return $data;
}
else {
//require_once('view/view_suivi_unit3.php');
$renderer = $PAGE->get_renderer('format_iena');
$renderer->display_completion($data);
}
echo $OUTPUT->footer();
\ No newline at end of file
<div class="iena-course-header">
{{#student}}
<!--<a href="#" class="btn btn-outline-primary iena-course-h-total" onclick="iena_toggle_course_header(event)">Ma progression : {{progress_total}}%</a>-->
<div class="iena-progress-header">
<div>
<h4 class="iena-progress-label">{{# str }} my_progress, format_iena {{/ str}}</h4>
<div class="progress-wrapper">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{{progress_total}}" style="width:{{progress_total}}%" aria-valuemin="0" aria-valuemax="100"> {{progress_total}}%</div>
</div>
</div>
<a class="iena-progress-label" data-toggle="collapse" href="#progress-details" role="button" aria-expanded="false" aria-controls="progress-details"> <i class="fa fa-search-plus"></i> </a>
</div>
<div class="iena-course-header-bottom" id="iena-h-bottom" aria-expanded="false" style="">
<div class="iena-h-prog-sect collapse row" id="progress-details">
<div class="details-progress col-md-7">
{{#progress_sections}}
<div class="section-progress">
<a href="#section-{{id}}" class="iena-h-prog-name">{{name}}</a>
<div class="progress-wrapper">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{{completion}}" style="width:{{completion}}%" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="iena-prog-label">{{completion}}%</strong> terminé</div>
</div>
<div class="iena-prog-bubbles">
{{#modules}}
<!-- <a href="{{url}}" class="iena-h-prog-mod-item iena-g-prog-{{completion}}"><span>{{name}}</span></a> -->
<div class="iena-prog-bubble iena-h-prog-mod-item state-{{completion}}">
<span class="icon-progress"></span>
<a href="{{url}}" class="iena-prog-link">
<span class="popover-module">{{name}}</span>
</a>
</div>
{{/modules}}
</div>
</div>
{{/progress_sections}}
</div>
<div class="col-md-5 iena-progress-legend">
<div id="caption-iena"><h5>{{# str }} caption, format_iena {{/ str}}</h5>
<div class="">
<div class="caption-status"><div class="pointer-help state-0"><span class="icon-progress"></span></div> <span class="caption-title"> {{# str }} status0, format_iena {{/ str}}</span></div>
<div class="caption-status"><div class="pointer-help state-1"><span class="icon-progress"></span></div> <span class="caption-title">{{# str }} status1, format_iena {{/ str}}</span></div>
<div class="caption-status"><div class="pointer-help state-2"><span class="icon-progress"></span></div> <span class="caption-title">{{# str }} status2, format_iena {{/ str}}</span></div>
<div class="caption-status"><div class="pointer-help state-3"><span class="icon-progress"></span></div> <span class="caption-title">{{# str }} status3, format_iena {{/ str}}</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
{{/student}}
{{#summary}}
<div class="iena-course-header-bottom" id="" aria-expanded="false">
<div id="title-summary-iena">
<h3>
{{# str }} aboutcourse, format_iena {{/ str}}
</h3>
<div id="summary-wrapper">
<div id="summary-collapse" aria-expanded="false">{{{ summary }}}</div>
</div>
<a role="button" href="#" onclick="return false" id="button-collapse" aria-expanded="false" aria-controls="summary-collapse">{{# str }} displayInfos, format_iena {{/ str}}</a>
</div>
</div>
{{/summary}}
</div>
{{#js}}
require(['format_iena/header'], function(module) {
module.registerHeader();
});
{{/js}}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.