original_string: public static function fetch_course_item($courseid) {
          if ($course_item = grade_item::fetch(array('courseid'=>$courseid, 'itemtype'=>'course'))) {
              return $course_item;
          }
  
          // first get category - it creates the associated grade item
          $course_category = grade_category::fetch_course_category($courseid);
          return $course_category->get_grade_item();
      }
code: public static function fetch_course_item($courseid) {
          if ($course_item = grade_item::fetch(array('courseid'=>$courseid, 'itemtype'=>'course'))) {
              return $course_item;
          }
  
          // first get category - it creates the associated grade item
          $course_category = grade_category::fetch_course_category($courseid);
          return $course_category->get_grade_item();
      }
code_tokens: public static function fetch_course_item ( $ courseid ) { if ( $ course_item = grade_item :: fetch ( array ( 'courseid' => $ courseid , 'itemtype' => 'course' ) ) ) { return $ course_item ; } // first get category - it creates the associated grade item $ course_category = grade_category :: fetch_course_category ( $ courseid ) ; return $ course_category -> get_grade_item ( ) ; }
docstring: Returns the grade item associated with the course
  
  @param int $courseid
  @return grade_item Course level grade item object
docstring_tokens: Returns the grade item associated with the course