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;
    }
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;
    }
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 ; }
Check whether the feedback is mapped to the given courseid.
Check whether the feedback is mapped to the given courseid .