original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Get the url of a restored backup item based on the backup ID .