Skip to content
Snippets Groups Projects
Commit 883ea488 authored by Elke Kreim's avatar Elke Kreim
Browse files

Remove html message and add translations

parent dfc6f47e
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,8 @@ $string['courserequestsuccess'] = '<p>Ihr Kursantrag wurde an das E-Learning Cen
möglich (i.d.R. in den nächsten drei Werktagen) bearbeitet. Sie werden umgehend per E-Mail über die Freischaltung informiert.</p>
<p>Bei zeitkritischen Anträgen oder Nachfragen wenden Sie sich bitte an: <a href="mailto:elc@hs-hannover.de">elc@hs-hannover.de</a></p>';
// request_form
$string['coursespending'] = 'Ihre beantragten Kurse (Freischaltung in Arbeit)';
$string['yourscoursespending'] = 'Ihre beantragten Kurse (Freischaltung in Arbeit)';
$string['coursespending'] = 'Beantragte Kurse';
$string['courses'] = 'Kurse';
$string['courserequestdetails'] = 'Kursdetails';
$string['fullnamecourse'] = 'Vollständiger Kurstitel';
......@@ -47,27 +48,27 @@ $string['summaryhead'] = 'Kursbeschreibung für die Kursübersicht (optional)';
$string['summary'] = 'Kursbeschreibung (optional)';
$string['summary_help'] = 'Die Kursbeschreibung wird in der Kursliste angezeigt und wird bei einer Kurssuche ebenfalls berücksichtigt.';
$string['requestcourse'] = 'Request a course';
$string['shortnametaken'] = 'Short name is already used for another course ({$a})';
$string['starpending'] = '([*] = course pending approval)';
$string['requestcourse'] = 'Kurse beantragen';
$string['shortnametaken'] = 'Der kurze Kursname wird bereits für einen anderen Kurs verwendet ({$a})';
$string['starpending'] = '([*] = noch nicht genehmigter Kurs)';
$string['nocoursecopyurl'] = 'Falsche Kurs URL. Die Kursurl sollte in folgenden Format sein: https://moodle.hs-hannover.de/course/view.php?id=XXX XXX steht für Ihre ID.';
$string['containspassword'] = 'Der {$a} und der Einschreibeschlüssel haben zu starke Ähnlichkeit. Bitte vergeben Sie einen anderen Einschreibeschlüssel!';
$string['coursereasonforrejecting'] = 'Your reasons for rejecting this request';
$string['coursereasonforrejectingemail'] = 'This will be emailed to the requester';
$string['missingreqreason'] = 'Missing reason';
$string['coursereasonforrejecting'] = 'Ihre Gründe für die Ablehnung dieses Antrags';
$string['coursereasonforrejectingemail'] = 'Dies wird dem Antragsteller per E-Mail zugeschickt';
$string['missingreqreason'] = 'Fehlende Begründung';
$string['reject'] = 'Ablehnen';
//pending
$string['courserejected'] = 'Der Kurs wurde abgelehnt und der beantragenden Person mitgeteilt.';
$string['nopendingcourses'] = 'Keine Kursbeantragungen vorhanden.';
$string['courserequestwarning'] = 'The user requesting this course will be automatically enrolled and assigned the role of {$a}.';
$string['requestedby'] = 'Requested by';
$string['courserequestwarning'] = 'Der Benutzer, der diesen Kurs beantragt, wird automatisch eingeschrieben und erhält die Rolle des {$a}.';
$string['requestedby'] = 'Beantragt von';
$string['coursecopyurlheader'] = 'Daten von';
$string['category'] = 'Kategorie';
$string['requestreason'] = 'Reason for course request';
$string['action'] = 'Action';
$string['approve'] = 'Approve';
$string['requestreason'] = 'Grund für die Kursanfrage';
$string['action'] = 'Aktion';
$string['approve'] = 'Bestätigen';
$string['rejectdots'] = 'Ablehnen...';
$string['delete'] = 'Löschen';
$string['backtocourselisting'] = 'Zurück zur Kursübersicht';
......
......@@ -12,6 +12,7 @@ $string['categoriesenableddefault'] = 'No course category selected';
$string['courserequest'] = 'Course request';
$string['courserequestsuccess'] = 'Your course request has been saved successfully. You will be sent an email to inform you whether your request was approved.';
// request_form
$string['yourscoursespending'] = 'Courses pending approval';
$string['coursespending'] = 'Courses pending approval';
$string['courses'] = 'Courses';
$string['courserequestdetails'] = 'Details of the course you are requesting';
......
......@@ -389,14 +389,12 @@ class course_request_hsh
$a->telefon = $USER->phone1;
$a->fullname = fullname($user);
$messageplain = $this->get_message_plain($a);
$messagehtml = $this->get_message_html($a);
$this->notify(
$user,
$USER,
'courserequestapproved',
get_string('courseapprovedsubject', 'local_hsh', $a),
$messageplain,
$messagehtml,
$course->id
);
......@@ -445,7 +443,7 @@ class course_request_hsh
* @param int|null $courseid
*/
protected function notify($touser, $fromuser, $name, $subject, $message, $messagehtml = '', $courseid = null) {
protected function notify($touser, $fromuser, $name, $subject, $message, $courseid = null) {
$eventdata = new \core\message\message();
$eventdata->courseid = empty($courseid) ? SITEID : $courseid;
$eventdata->component = 'moodle';
......@@ -455,7 +453,7 @@ class course_request_hsh
$eventdata->subject = $subject;
$eventdata->fullmessage = $message;
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = $messagehtml;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
$eventdata->notification = 1;
message_send($eventdata);
......@@ -534,50 +532,6 @@ class course_request_hsh
return $courselist;
}
protected function get_message_html($a) {
$mailadress = get_string('elcmailaddress', 'local_hsh');
$message = html_writer::tag('p', get_string('address', 'local_hsh', $a));
$message .= html_writer::tag('p', get_string('courseapproved', 'local_hsh', $a));
$tocourse = get_string('tocourse', 'local_hsh') . " " . html_writer::link($a->url, $a->url);
$message .= html_writer::tag('p', $tocourse);
if (!empty($this->properties->coursecopyurl)) {
$message .= html_writer::tag('p', html_writer::tag('b', get_string('coursecopyinform', 'local_hsh', $a)));
}
$message .= html_writer::tag('p', get_string('questionhint', 'local_hsh')
. ' '
. html_writer::tag('a', get_string('questionhintmail', 'local_hsh'), array('href' => 'mailto:' . $mailadress)). '.');
$message .= html_writer::tag('p', get_string('consultinghint', 'local_hsh'));
$message .= html_writer::tag('p',
get_string('greetings', 'local_hsh')
. html_writer::empty_tag('br')
. $a->responser
. html_writer::empty_tag('br')
. $a->email
. html_writer::empty_tag('br')
. $a->telefon
);
$message .= html_writer::tag('p',
get_string('institute1', 'local_hsh')
. html_writer::start_tag('br')
. get_string('institute2', 'local_hsh')
. html_writer::start_tag('br')
. get_string('ou', 'local_hsh')
. html_writer::start_tag('br')
. get_string('street', 'local_hsh')
. html_writer::start_tag('br')
. get_string('place', 'local_hsh')
);
$mailadress = get_string('elcmailaddress', 'local_hsh');
$message .= html_writer::tag('p',
get_string('email', 'local_hsh') . ': '
. html_writer::tag('a', $mailadress, array('href' => 'mailto:' . $mailadress))
. html_writer::start_tag('br')
. get_string('elcphone', 'local_hsh')
);
return $message;
}
protected function get_message_plain($a) {
$message = get_string('address', 'local_hsh', $a) . "\r\n";
$message .= "\r\n";
......
......@@ -51,7 +51,7 @@ class course_request_hsh_form extends moodleform {
$mform =& $this->_form;
if ($pending = $DB->get_records('local_hsh_course_request', array('requester' => $USER->id))) {
$mform->addElement('header', 'pendinglist', get_string('coursespending', 'local_hsh'));
$mform->addElement('header', 'pendinglist', get_string('yourscoursespending', 'local_hsh'));
$list = array();
foreach ($pending as $cp) {
$list[] = format_string($cp->fullname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment