protected function get_sample_courseid($sampleid) {
        global $DB;

        if (empty($this->samplecourses[$sampleid])) {
            $course = enrol_get_course_by_user_enrolment_id($sampleid);
            $this->samplecourses[$sampleid] = $course->id;
        }

        return $this->samplecourses[$sampleid];
    }
protected function get_sample_courseid($sampleid) {
        global $DB;

        if (empty($this->samplecourses[$sampleid])) {
            $course = enrol_get_course_by_user_enrolment_id($sampleid);
            $this->samplecourses[$sampleid] = $course->id;
        }

        return $this->samplecourses[$sampleid];
    }
protected function get_sample_courseid ( $ sampleid ) { global $ DB ; if ( empty ( $ this -> samplecourses [ $ sampleid ] ) ) { $ course = enrol_get_course_by_user_enrolment_id ( $ sampleid ) ; $ this -> samplecourses [ $ sampleid ] = $ course -> id ; } return $ this -> samplecourses [ $ sampleid ] ; }
Returns the student enrolment course id.

@param int $sampleid
@return int
Returns the student enrolment course id .