public static function get_restore_url($backupid) {
        global $DB;

        $backupitemid = $DB->get_field('backup_controllers', 'itemid', array('backupid' => $backupid), MUST_EXIST);
        $newcontext = context_course::instance($backupitemid);

        $restoreurl = $newcontext->get_url()->out();
        $urlarray = array('restoreurl' => $restoreurl);

        return $urlarray;
    }
public static function get_restore_url($backupid) {
        global $DB;

        $backupitemid = $DB->get_field('backup_controllers', 'itemid', array('backupid' => $backupid), MUST_EXIST);
        $newcontext = context_course::instance($backupitemid);

        $restoreurl = $newcontext->get_url()->out();
        $urlarray = array('restoreurl' => $restoreurl);

        return $urlarray;
    }
public static function get_restore_url ( $ backupid ) { global $ DB ; $ backupitemid = $ DB -> get_field ( 'backup_controllers' , 'itemid' , array ( 'backupid' => $ backupid ) , MUST_EXIST ) ; $ newcontext = context_course :: instance ( $ backupitemid ) ; $ restoreurl = $ newcontext -> get_url ( ) -> out ( ) ; $ urlarray = array ( 'restoreurl' => $ restoreurl ) ; return $ urlarray ; }
Get the url of a restored backup item based on the backup ID.

@param string $backupid The backup ID to get the restore location url.
@return array $urlarray The restored item URL as an array.
Get the url of a restored backup item based on the backup ID .