protected function is_graded($userid) {
        $grade = $this->get_user_grade($userid, false);
        if ($grade) {
            return ($grade->grade !== null && $grade->grade >= 0);
        }
        return false;
    }
protected function is_graded($userid) {
        $grade = $this->get_user_grade($userid, false);
        if ($grade) {
            return ($grade->grade !== null && $grade->grade >= 0);
        }
        return false;
    }
protected function is_graded ( $ userid ) { $ grade = $ this -> get_user_grade ( $ userid , false ) ; if ( $ grade ) { return ( $ grade -> grade !== null && $ grade -> grade >= 0 ) ; } return false ; }
See if this assignment has a grade yet.

@param int $userid
@return bool
See if this assignment has a grade yet .