original_string: public function register_return_link($action, $params) {
          global $PAGE;
          $params['action'] = $action;
          $cm = $this->get_course_module();
          if ($cm) {
              $currenturl = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
          } else {
              $currenturl = new moodle_url('/mod/assign/index.php', array('id' => $this->get_course()->id));
          }
  
          $currenturl->params($params);
          $PAGE->set_url($currenturl);
      }
code: public function register_return_link($action, $params) {
          global $PAGE;
          $params['action'] = $action;
          $cm = $this->get_course_module();
          if ($cm) {
              $currenturl = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
          } else {
              $currenturl = new moodle_url('/mod/assign/index.php', array('id' => $this->get_course()->id));
          }
  
          $currenturl->params($params);
          $PAGE->set_url($currenturl);
      }
code_tokens: public function register_return_link ( $ action , $ params ) { global $ PAGE ; $ params [ 'action' ] = $ action ; $ cm = $ this -> get_course_module ( ) ; if ( $ cm ) { $ currenturl = new moodle_url ( '/mod/assign/view.php' , array ( 'id' => $ cm -> id ) ) ; } else { $ currenturl = new moodle_url ( '/mod/assign/index.php' , array ( 'id' => $ this -> get_course ( ) -> id ) ) ; } $ currenturl -> params ( $ params ) ; $ PAGE -> set_url ( $ currenturl ) ; }
docstring: Set the action and parameters that can be used to return to the current page.
  
  @param string $action The action for the current page
  @param array $params An array of name value pairs which form the parameters
  to return to the current page.
  @return void
docstring_tokens: Set the action and parameters that can be used to return to the current page .