mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-31935 Fixed restore backup link in course search
This commit is contained in:
parent
5bbf3cb72b
commit
87bef8f6d5
1 changed files with 4 additions and 2 deletions
|
@ -320,13 +320,15 @@
|
|||
|
||||
// checks whether user can do site backup
|
||||
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
|
||||
echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
|
||||
$backupurl = new moodle_url('/backup/backup.php', array('id' => $course->id));
|
||||
echo "<a title=\"".get_string("backup")."\" href=\"".$backupurl."\">\n<img".
|
||||
" src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
|
||||
}
|
||||
|
||||
// checks whether user can do restore
|
||||
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
|
||||
echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&wdir=/backupdata\">\n<img".
|
||||
$restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
|
||||
echo "<a title=\"".get_string("restore")."\" href=\"".$restoreurl."\">\n<img".
|
||||
" src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue