Skip to content

Commit

Permalink
Bugfix: Placeholder coursecalendar generates correct link #754
Browse files Browse the repository at this point in the history
  • Loading branch information
eynimeni committed Dec 18, 2024
1 parent 819a889 commit 225ae65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/placeholders/placeholders/coursecalendarurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ public static function return_value(
$bu = new booking_utils();
$user = singleton_service::get_instance_of_user($userid);

$value = '<a href="#" style="text-decoration:none; color:#000">' .
$bu->booking_generate_calendar_subscription_link($user, 'courses') .
$value = '<a href="' . $bu->booking_generate_calendar_subscription_link($user, 'courses') . '">' .
get_string('linktocalendarurltext', 'mod_booking') .
'</a>';

// Save the value to profit from singleton.
placeholders_info::$placeholders[$cachekey] = $value;

} else {
$value = get_string('sthwentwrongwithplaceholder', 'mod_booking', $classname);
}
Expand Down
1 change: 1 addition & 0 deletions lang/de/booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@
und verschwindet nach Ende des Meetings wieder.';
$string['linknotvalid'] = 'Dieser Link / dieses Event ist derzeit nicht verfügbar.
Bitte probieren Sie es kurz vor Beginn noch einmal, wenn Sie dieses Event gebucht haben.';
$string['linktocalendarurltext'] = "Hier geht's zum Kalender";
$string['linktocourse'] = "Hier geht's zum Kurs";
$string['linktomoodlecourseonbookedbutton'] = 'Zeige Link auf Moodle-Kurs direkt am Buchen-Button';
$string['linktomoodlecourseonbookedbutton_desc'] = 'Statt eines extra Links auf den Moodle-Kurs wird diese Option den Buchungsbutton in einen Link auf den gebuchten Moodle-Kurs umwandeln';
Expand Down
1 change: 1 addition & 0 deletions lang/en/booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@
until the end of the session.";
$string['linknotvalid'] = 'This link or meeting is not accessible.
If it is a meeting you have booked, please check again, shortly before start.';
$string['linktocalendarurltext'] = "Link to calendar";
$string['linktocourse'] = "Link to course";
$string['linktomoodlecourseonbookedbutton'] = 'Show Link to Moodle course directly on booked button';
$string['linktomoodlecourseonbookedbutton_desc'] = 'Instead of an extra link, this will transform the booked button the a link to the moodle course';
Expand Down

0 comments on commit 225ae65

Please sign in to comment.