function pending_scores($id = null, $status = null) { if (!empty($id) && !empty($status) && ($status == "pending" || $status == "below_aa" || $status == "approved" || $status == "rejected")) { $id = intval($id); $sf = User_score::find($id); $sf->status = $status; $sf->save(); } $this->data['subtitle'] = "Approve Pending Scores"; $this->data['scores'] = User_score::get_pending_scores(); $this->content_view = "mod/pending_scores"; }