diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d94d45a755d6ed75162036b6a3cdf0bf6ed2b69..94cf18b9c513af9161dba09921d5f632bb21482e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -233,6 +233,13 @@ Ajout d'un else à la condition pour que $date soit toujours instancié. [x] Solved. +### Page principale du cours sans achèvement activé dans le cours + +Si l'achèvement d'activité n'est pas activé dans le cours. + + + + ### Page de suivi des étudiants #### 13 diff --git a/entity/course_format_iena_cron_action.php b/entity/course_format_iena_cron_action.php index ffd2123a72ef460304acc2db046e9e6a9b3f6bb2..450cfd81efc9c997d6d2073a4c623d6a0e353743 100644 --- a/entity/course_format_iena_cron_action.php +++ b/entity/course_format_iena_cron_action.php @@ -228,9 +228,12 @@ $message->courseid = $course->id; $message->notification = '0'; $message->fullmessageformat = FORMAT_HTML; + $log = "Messages sent for section $requete->name of course $course->fullname (id $course->id) to "; + $studs_counter = 0; foreach ($students as $student) { - echo get_string('snd_msg_to', 'format_iena') . $student->firstname . ' ' . $student->lastname; + $studs_counter++; $message->userto = $student; + $studs[] = $message->smallmessage = $messageContent; $message->fullmessage = $messageContent; $message->fullmessagehtml = $messageContent; @@ -238,6 +241,8 @@ // $message->subject = $messageContent; message_send($message); } + $log .= $studs_counter . " students."; + echo $log; } diff --git a/lang/en/format_iena.php b/lang/en/format_iena.php index 092a2256e26f1289a277d874c6246b365a355c57..6fee5644453c70df9a353fc09069e18ddd96ba8f 100644 --- a/lang/en/format_iena.php +++ b/lang/en/format_iena.php @@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.'; $string['section'] = 'Section'; $string['hide_section'] = 'HIDE section '; $string['show_section'] = 'SHOW section '; - $string['sdn_msg_to'] = 'Send a message to'; + diff --git a/lang/fr/format_iena.php b/lang/fr/format_iena.php index 4b167961b9195c8a502a592194b97fd3c7472012..3d63789aad9133ae328f8428a6deb00a44beedd3 100644 --- a/lang/fr/format_iena.php +++ b/lang/fr/format_iena.php @@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.'; $string['section'] = 'Section'; $string['hide_section'] = 'CACHER la section '; $string['show_section'] = 'MONTRER la section '; - $string['sdn_msg_to'] = 'Envoyer un message à '; + diff --git a/view/view_param_section.php b/view/view_param_section.php index 14ab4ed94726ac7602848883e43a8c3fe1d65837..205bd17590afd1a6fb0b381f199abd44de1c52b8 100644 --- a/view/view_param_section.php +++ b/view/view_param_section.php @@ -51,7 +51,7 @@ public function get_content($course, $dataSection) { global $DB, $CFG, $PAGE; - + var_dump($dataSection); $mform = $this->_form; $sectionId = required_param('sectionid', PARAM_INT); $courseID = required_param('courseid', PARAM_INT); @@ -140,7 +140,7 @@ <div class=\"radio\"> <label for=\"radios-1\"> <input type=\"radio\" name=\"presence\" id=\"presence-2\" value=\"0\" "; - if ($dataSection == false) { + if ($dataSection == false || ($dataSection != false && $dataSection->presence == 0)) { $content .= "checked=\"checked\""; } $content .= ">