Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-31935 Fixed restore backup link in course search

  • Loading branch information...
commit 7456f0b8a498c715fbb637065e607db16c8053d9 1 parent 1a19ad3
Davo Smith authored March 07, 2012 nebgor committed March 13, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  course/search.php
6  course/search.php
@@ -320,13 +320,15 @@
320 320
 
321 321
                 // checks whether user can do site backup
322 322
                 if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
323  
-                    echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
  323
+                    $backupurl = new moodle_url('/backup/backup.php', array('id' => $course->id));
  324
+                    echo "<a title=\"".get_string("backup")."\" href=\"".$backupurl."\">\n<img".
324 325
                         " src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
325 326
                 }
326 327
 
327 328
                 // checks whether user can do restore
328 329
                 if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
329  
-                    echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&amp;wdir=/backupdata\">\n<img".
  330
+                    $restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
  331
+                    echo "<a title=\"".get_string("restore")."\" href=\"".$restoreurl."\">\n<img".
330 332
                         " src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
331 333
                 }
332 334
 

0 notes on commit 7456f0b

Please sign in to comment.
Something went wrong with that request. Please try again.