original_string: public function is_already_submitted($anycourseid = false) {
          global $DB, $USER;
  
          if ((!isloggedin() && $USER->id == $this->userid) || isguestuser($this->userid)) {
              return false;
          }
  
          $params = array('userid' => $this->userid, 'feedback' => $this->feedback->id);
          if (!$anycourseid && $this->courseid) {
              $params['courseid'] = $this->courseid;
          }
          return $DB->record_exists('feedback_completed', $params);
      }
code: public function is_already_submitted($anycourseid = false) {
          global $DB, $USER;
  
          if ((!isloggedin() && $USER->id == $this->userid) || isguestuser($this->userid)) {
              return false;
          }
  
          $params = array('userid' => $this->userid, 'feedback' => $this->feedback->id);
          if (!$anycourseid && $this->courseid) {
              $params['courseid'] = $this->courseid;
          }
          return $DB->record_exists('feedback_completed', $params);
      }
code_tokens: public function is_already_submitted ( $ anycourseid = false ) { global $ DB , $ USER ; if ( ( ! isloggedin ( ) && $ USER -> id == $ this -> userid ) || isguestuser ( $ this -> userid ) ) { return false ; } $ params = array ( 'userid' => $ this -> userid , 'feedback' => $ this -> feedback -> id ) ; if ( ! $ anycourseid && $ this -> courseid ) { $ params [ 'courseid' ] = $ this -> courseid ; } return $ DB -> record_exists ( 'feedback_completed' , $ params ) ; }
docstring: check for multiple_submit = false.
  if the feedback is global so the courseid must be given
  
  @param bool $anycourseid if true checks if this feedback was submitted in any course, otherwise checks $this->courseid .
  Applicable to frontpage feedbacks only
  @return bool true if the feedback already is submitted otherwise false
docstring_tokens: check for multiple_submit = false . if the feedback is global so the courseid must be given