mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-17203 new option for disabling of calendar export
This commit is contained in:
parent
81f2bb8122
commit
dbf9d4cb37
5 changed files with 22 additions and 9 deletions
|
@ -165,17 +165,19 @@
|
|||
|
||||
//Link to calendar export page
|
||||
echo '<div class="bottom">';
|
||||
print_single_button('export.php', array('course'=>$courseid), get_string('exportcalendar', 'calendar'));
|
||||
if (!empty($CFG->enablecalendarexport)) {
|
||||
print_single_button('export.php', array('course'=>$courseid), get_string('exportcalendar', 'calendar'));
|
||||
|
||||
if (!empty($USER->id)) {
|
||||
$authtoken = sha1($USER->username . $USER->password);
|
||||
$usernameencoded = urlencode($USER->username);
|
||||
if (!empty($USER->id)) {
|
||||
$authtoken = sha1($USER->username . $USER->password);
|
||||
$usernameencoded = urlencode($USER->username);
|
||||
|
||||
echo "<a href=\"export_execute.php?preset_what=all&preset_time=recentupcoming&username=$usernameencoded&authtoken=$authtoken\">"
|
||||
.'<img src="'.$CFG->pixpath.'/i/ical.gif" height="14" width="36" '
|
||||
.'alt="'.get_string('ical', 'calendar').'" '
|
||||
.'title="'.get_string('quickdownloadcalendar', 'calendar').'" />'
|
||||
.'</a>';
|
||||
echo "<a href=\"export_execute.php?preset_what=all&preset_time=recentupcoming&username=$usernameencoded&authtoken=$authtoken\">"
|
||||
.'<img src="'.$CFG->pixpath.'/i/ical.gif" height="14" width="36" '
|
||||
.'alt="'.get_string('ical', 'calendar').'" '
|
||||
.'title="'.get_string('quickdownloadcalendar', 'calendar').'" />'
|
||||
.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue