Merge branch 'w40_MDL-41999_m25_userpw' of https://github.com/skodak/moodle into MOODLE_25_STABLE
This commit is contained in:
+1
-1
@@ -125,7 +125,7 @@ switch($action) {
|
||||
$weekend = intval($CFG->calendar_weekend);
|
||||
}
|
||||
|
||||
$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
|
||||
$authtoken = sha1($USER->id . $DB->get_field('user', 'password', array('id'=>$USER->id)). $CFG->calendar_exportsalt);
|
||||
// Let's populate some vars to let "common tasks" be somewhat smart...
|
||||
// If today it's weekend, give the "next week" option
|
||||
$allownextweek = $weekend & (1 << $now['wday']);
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ if (!empty($CFG->enablecalendarexport)) {
|
||||
echo $OUTPUT->single_button(new moodle_url('/calendar/managesubscriptions.php', array('course'=>$courseid)), get_string('managesubscriptions', 'calendar'));
|
||||
}
|
||||
if (isloggedin()) {
|
||||
$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
|
||||
$authtoken = sha1($USER->id . $DB->get_field('user', 'password', array('id'=>$USER->id)) . $CFG->calendar_exportsalt);
|
||||
$link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'userid' => $USER->id, 'authtoken'=>$authtoken));
|
||||
$icon = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('i/ical'), 'height'=>'14', 'width'=>'36', 'alt'=>get_string('ical', 'calendar'), 'title'=>get_string('quickdownloadcalendar', 'calendar')));
|
||||
echo html_writer::tag('a', $icon, array('href'=>$link));
|
||||
|
||||
Reference in New Issue
Block a user