original_string: public function get_instance() {
          global $DB;
          if ($this->instance) {
              return $this->instance;
          }
          if ($this->get_course_module()) {
              $params = array('id' => $this->get_course_module()->instance);
              $this->instance = $DB->get_record('assign', $params, '*', MUST_EXIST);
          }
          if (!$this->instance) {
              throw new coding_exception('Improper use of the assignment class. ' .
                                         'Cannot load the assignment record.');
          }
          return $this->instance;
      }
code: public function get_instance() {
          global $DB;
          if ($this->instance) {
              return $this->instance;
          }
          if ($this->get_course_module()) {
              $params = array('id' => $this->get_course_module()->instance);
              $this->instance = $DB->get_record('assign', $params, '*', MUST_EXIST);
          }
          if (!$this->instance) {
              throw new coding_exception('Improper use of the assignment class. ' .
                                         'Cannot load the assignment record.');
          }
          return $this->instance;
      }
code_tokens: public function get_instance ( ) { global $ DB ; if ( $ this -> instance ) { return $ this -> instance ; } if ( $ this -> get_course_module ( ) ) { $ params = array ( 'id' => $ this -> get_course_module ( ) -> instance ) ; $ this -> instance = $ DB -> get_record ( 'assign' , $ params , '*' , MUST_EXIST ) ; } if ( ! $ this -> instance ) { throw new coding_exception ( 'Improper use of the assignment class. ' . 'Cannot load the assignment record.' ) ; } return $ this -> instance ; }
docstring: Get the settings for the current instance of this assignment
  
  @return stdClass The settings
docstring_tokens: Get the settings for the current instance of this assignment