Skip to content
Snippets Groups Projects
Commit 3fef2a61 authored by Thomas Fradet's avatar Thomas Fradet
Browse files

cron logs

parent 33654b20
No related branches found
No related tags found
No related merge requests found
...@@ -233,6 +233,13 @@ Ajout d'un else à la condition pour que $date soit toujours instancié. ...@@ -233,6 +233,13 @@ Ajout d'un else à la condition pour que $date soit toujours instancié.
[x] Solved. [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 ### Page de suivi des étudiants
#### 13 #### 13
......
...@@ -228,9 +228,12 @@ ...@@ -228,9 +228,12 @@
$message->courseid = $course->id; $message->courseid = $course->id;
$message->notification = '0'; $message->notification = '0';
$message->fullmessageformat = FORMAT_HTML; $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) { foreach ($students as $student) {
echo get_string('snd_msg_to', 'format_iena') . $student->firstname . ' ' . $student->lastname; $studs_counter++;
$message->userto = $student; $message->userto = $student;
$studs[] =
$message->smallmessage = $messageContent; $message->smallmessage = $messageContent;
$message->fullmessage = $messageContent; $message->fullmessage = $messageContent;
$message->fullmessagehtml = $messageContent; $message->fullmessagehtml = $messageContent;
...@@ -238,6 +241,8 @@ ...@@ -238,6 +241,8 @@
// $message->subject = $messageContent; // $message->subject = $messageContent;
message_send($message); message_send($message);
} }
$log .= $studs_counter . " students.";
echo $log;
} }
......
...@@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.'; ...@@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.';
$string['section'] = 'Section'; $string['section'] = 'Section';
$string['hide_section'] = 'HIDE section '; $string['hide_section'] = 'HIDE section ';
$string['show_section'] = 'SHOW section '; $string['show_section'] = 'SHOW section ';
$string['sdn_msg_to'] = 'Send a message to';
...@@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.'; ...@@ -80,4 +80,4 @@ By definition an unnamed section is displayed as <strong>section [N]</strong>.';
$string['section'] = 'Section'; $string['section'] = 'Section';
$string['hide_section'] = 'CACHER la section '; $string['hide_section'] = 'CACHER la section ';
$string['show_section'] = 'MONTRER la section '; $string['show_section'] = 'MONTRER la section ';
$string['sdn_msg_to'] = 'Envoyer un message à ';
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
public function get_content($course, $dataSection) public function get_content($course, $dataSection)
{ {
global $DB, $CFG, $PAGE; global $DB, $CFG, $PAGE;
var_dump($dataSection);
$mform = $this->_form; $mform = $this->_form;
$sectionId = required_param('sectionid', PARAM_INT); $sectionId = required_param('sectionid', PARAM_INT);
$courseID = required_param('courseid', PARAM_INT); $courseID = required_param('courseid', PARAM_INT);
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div class=\"radio\"> <div class=\"radio\">
<label for=\"radios-1\"> <label for=\"radios-1\">
<input type=\"radio\" name=\"presence\" id=\"presence-2\" value=\"0\" "; <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 .= "checked=\"checked\"";
} }
$content .= "> $content .= ">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment