public static function can_request_review_user($planuserid) {
        global $USER;

        $capabilities = array('moodle/competency:planrequestreview');
        if ($USER->id == $planuserid) {
            $capabilities[] = 'moodle/competency:planrequestreviewown';
        }

        return has_any_capability($capabilities, context_user::instance($planuserid));
    }
public static function can_request_review_user($planuserid) {
        global $USER;

        $capabilities = array('moodle/competency:planrequestreview');
        if ($USER->id == $planuserid) {
            $capabilities[] = 'moodle/competency:planrequestreviewown';
        }

        return has_any_capability($capabilities, context_user::instance($planuserid));
    }
public static function can_request_review_user ( $ planuserid ) { global $ USER ; $ capabilities = array ( 'moodle/competency:planrequestreview' ) ; if ( $ USER -> id == $ planuserid ) { $ capabilities [ ] = 'moodle/competency:planrequestreviewown' ; } return has_any_capability ( $ capabilities , context_user :: instance ( $ planuserid ) ) ; }
Can the current user request the draft to be reviewed.

@param  int $planuserid The user to whom the plan would belong.
@return bool
Can the current user request the draft to be reviewed .