original_string: public function check_course_is_mapped() {
          global $DB;
          if ($this->feedback->course != SITEID) {
              return true;
          }
          if ($DB->get_records('feedback_sitecourse_map', array('feedbackid' => $this->feedback->id))) {
              $params = array('feedbackid' => $this->feedback->id, 'courseid' => $this->courseid);
              if (!$DB->get_record('feedback_sitecourse_map', $params)) {
                  return false;
              }
          }
          // No mapping means any course is mapped.
          return true;
      }
code: public function check_course_is_mapped() {
          global $DB;
          if ($this->feedback->course != SITEID) {
              return true;
          }
          if ($DB->get_records('feedback_sitecourse_map', array('feedbackid' => $this->feedback->id))) {
              $params = array('feedbackid' => $this->feedback->id, 'courseid' => $this->courseid);
              if (!$DB->get_record('feedback_sitecourse_map', $params)) {
                  return false;
              }
          }
          // No mapping means any course is mapped.
          return true;
      }
code_tokens: public function check_course_is_mapped ( ) { global $ DB ; if ( $ this -> feedback -> course != SITEID ) { return true ; } if ( $ DB -> get_records ( 'feedback_sitecourse_map' , array ( 'feedbackid' => $ this -> feedback -> id ) ) ) { $ params = array ( 'feedbackid' => $ this -> feedback -> id , 'courseid' => $ this -> courseid ) ; if ( ! $ DB -> get_record ( 'feedback_sitecourse_map' , $ params ) ) { return false ; } } // No mapping means any course is mapped. return true ; }
docstring: Check whether the feedback is mapped to the given courseid.
docstring_tokens: Check whether the feedback is mapped to the given courseid .