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;
    }