original_string: 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];
      }
code: 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];
      }
code_tokens: 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 ] ; }
docstring: Returns the student enrolment course id.
  
  @param int $sampleid
  @return int
docstring_tokens: Returns the student enrolment course id .