/** * Check grade hidden status. Uses data from both grade item and grade. * * @return bool true if hidden, false if not */ public function is_hidden() { $this->load_grade_item(); if (empty($this->grade_item)) { return $this->hidden == 1 or ($this->hidden != 0 and $this->hidden > time()); } else { return $this->hidden == 1 or ($this->hidden != 0 and $this->hidden > time()) or $this->grade_item->is_hidden(); } }