original_string: private static function get_grade_item($courseid, $itemtype, $itemmodule = null, $iteminstance = null, $itemnumber = null) {
          $gradeiteminstance = null;
          if ($itemtype == 'course') {
              $gradeiteminstance = grade_item::fetch(array('courseid' => $courseid, 'itemtype' => $itemtype));
          } else {
              $gradeiteminstance = grade_item::fetch(
                  array('courseid' => $courseid, 'itemtype' => $itemtype,
                      'itemmodule' => $itemmodule, 'iteminstance' => $iteminstance, 'itemnumber' => $itemnumber));
          }
          return $gradeiteminstance;
      }
code: private static function get_grade_item($courseid, $itemtype, $itemmodule = null, $iteminstance = null, $itemnumber = null) {
          $gradeiteminstance = null;
          if ($itemtype == 'course') {
              $gradeiteminstance = grade_item::fetch(array('courseid' => $courseid, 'itemtype' => $itemtype));
          } else {
              $gradeiteminstance = grade_item::fetch(
                  array('courseid' => $courseid, 'itemtype' => $itemtype,
                      'itemmodule' => $itemmodule, 'iteminstance' => $iteminstance, 'itemnumber' => $itemnumber));
          }
          return $gradeiteminstance;
      }
code_tokens: private static function get_grade_item ( $ courseid , $ itemtype , $ itemmodule = null , $ iteminstance = null , $ itemnumber = null ) { $ gradeiteminstance = null ; if ( $ itemtype == 'course' ) { $ gradeiteminstance = grade_item :: fetch ( array ( 'courseid' => $ courseid , 'itemtype' => $ itemtype ) ) ; } else { $ gradeiteminstance = grade_item :: fetch ( array ( 'courseid' => $ courseid , 'itemtype' => $ itemtype , 'itemmodule' => $ itemmodule , 'iteminstance' => $ iteminstance , 'itemnumber' => $ itemnumber ) ) ; } return $ gradeiteminstance ; }
docstring: Get a grade item
  @param  int $courseid        Course id
  @param  string $itemtype     Item type
  @param  string $itemmodule   Item module
  @param  int $iteminstance    Item instance
  @param  int $itemnumber      Item number
  @return grade_item           A grade_item instance
  @deprecated Moodle 3.2 MDL-51373 - Please do not call this function any more.
  @see gradereport_user_external::get_grade_items for a similar function
docstring_tokens: Get a grade item