Skip to content

Commit

Permalink
now sends evasysids in the notification mail
Browse files Browse the repository at this point in the history
  • Loading branch information
r.tschu committed Oct 23, 2019
1 parent 47ef65b commit 527b40a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/course_evasys_courses_allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected static function define_properties() {
* @return array of evasysids
* @throws \dml_exception
*/
public static function get_evasyscourses($courseid) {
public static function raw_get_evasyscourses($courseid) {
global $DB;
$courses = $DB->get_field(self::TABLE, 'evasyscourses', array('course' => $courseid));
$idcourse = $DB->get_field('course', 'idnumber', array('id' => $courseid));
Expand Down
6 changes: 6 additions & 0 deletions classes/evasys_inviter.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,18 @@ public static function getmode($category) {
public static function alert_coordinator($courseid, $startdate, $enddate) {
global $USER;
$course = get_course($courseid);
$evacourses = course_evasys_courses_allocation::raw_get_evasyscourses($courseid);
$coursestring = '';
if ($evacourses) {
$coursestring = implode(',', $evacourses);
}
$usercoordinator = evasys_synchronizer::get_assigned_user($course);
$data = array(
'name' => $course->fullname,
'teacher' => $USER->firstname . " " . $USER->lastname,
'start' => $startdate->format('d.m.Y H:i:s'),
'end' => $enddate->format('d.m.Y H:i:s'),
'evasyscourses' => $coursestring
);
$subject = get_string("alert_email_subject", "block_evasys_sync", $course->fullname);
$message = get_string("alert_email_body", "block_evasys_sync", $data);
Expand Down
3 changes: 2 additions & 1 deletion lang/de/block_evasys_sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
'Sie erhalten diese Email da im Kurs {$a->name} der Evaluationszeitraum wie folgt festgesetzt wurde:' . "\n\n" .
"\t".'Start: {$a->start}' . "\n" .
"\t".'Ende: {$a->end}' . "\n" .
"\t".'Verantwortlicher: {$a->teacher}' . "\n\n" .
"\t".'Verantwortlicher: {$a->teacher}' . "\n" .
"\t".'Evasysids: {$a->evasyscourses}' . "\n\n" .
'Mit freundlichen Grüßen' . "\n" .
'Ihr Learnweb-Support';

Expand Down
3 changes: 2 additions & 1 deletion lang/en/block_evasys_sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
'The Evaluationtimeframe for Course {$a->name} has been set to:' . "\n\n" .
"\t" . 'Start: {$a->start}' . "\n" .
"\t" . 'Ende: {$a->end}' . "\n" .
"\t" . 'by {$a->teacher} ' . "\n\n" .
"\t" . 'by {$a->teacher} ' . "\n" .
"\t". 'evasysids: {$a->evasyscourses}' . "\n\n" .
'Sincerely Learnweb-Support';

// New invite strings.
Expand Down

0 comments on commit 527b40a

Please sign in to comment.