public function get_pending_assessments_by_reviewer($reviewerid, $exclude = null) {

        $assessments = $this->get_assessments_by_reviewer($reviewerid);

        foreach ($assessments as $id => $assessment) {
            if (!is_null($assessment->grade)) {
                unset($assessments[$id]);
                continue;
            }
            if (!empty($exclude)) {
                if (is_array($exclude) and in_array($id, $exclude)) {
                    unset($assessments[$id]);
                    continue;
                } else if ($id == $exclude) {
                    unset($assessments[$id]);
                    continue;
                }
            }
        }

        return $assessments;
    }
public function get_pending_assessments_by_reviewer($reviewerid, $exclude = null) {

        $assessments = $this->get_assessments_by_reviewer($reviewerid);

        foreach ($assessments as $id => $assessment) {
            if (!is_null($assessment->grade)) {
                unset($assessments[$id]);
                continue;
            }
            if (!empty($exclude)) {
                if (is_array($exclude) and in_array($id, $exclude)) {
                    unset($assessments[$id]);
                    continue;
                } else if ($id == $exclude) {
                    unset($assessments[$id]);
                    continue;
                }
            }
        }

        return $assessments;
    }
public function get_pending_assessments_by_reviewer ( $ reviewerid , $ exclude = null ) { $ assessments = $ this -> get_assessments_by_reviewer ( $ reviewerid ) ; foreach ( $ assessments as $ id => $ assessment ) { if ( ! is_null ( $ assessment -> grade ) ) { unset ( $ assessments [ $ id ] ) ; continue ; } if ( ! empty ( $ exclude ) ) { if ( is_array ( $ exclude ) and in_array ( $ id , $ exclude ) ) { unset ( $ assessments [ $ id ] ) ; continue ; } else if ( $ id == $ exclude ) { unset ( $ assessments [ $ id ] ) ; continue ; } } } return $ assessments ; }
Get allocated assessments not graded yet by the given reviewer

@see self::get_assessments_by_reviewer()
@param int $reviewerid the reviewer id
@param null|int|array $exclude optional assessment id (or list of them) to be excluded
@return array
Get allocated assessments not graded yet by the given reviewer