public function get_filters() {
        $filterkeys = [
            ASSIGN_FILTER_SUBMITTED,
            ASSIGN_FILTER_NOT_SUBMITTED,
            ASSIGN_FILTER_REQUIRE_GRADING,
            ASSIGN_FILTER_GRANTED_EXTENSION
        ];

        $current = get_user_preferences('assign_filter', '');

        $filters = [];
        // First is always "no filter" option.
        array_push($filters, [
            'key' => 'none',
            'name' => get_string('filternone', 'assign'),
            'active' => ($current == '')
        ]);

        foreach ($filterkeys as $key) {
            array_push($filters, [
                'key' => $key,
                'name' => get_string('filter' . $key, 'assign'),
                'active' => ($current == $key)
            ]);
        }
        return $filters;
    }
public function get_filters() {
        $filterkeys = [
            ASSIGN_FILTER_SUBMITTED,
            ASSIGN_FILTER_NOT_SUBMITTED,
            ASSIGN_FILTER_REQUIRE_GRADING,
            ASSIGN_FILTER_GRANTED_EXTENSION
        ];

        $current = get_user_preferences('assign_filter', '');

        $filters = [];
        // First is always "no filter" option.
        array_push($filters, [
            'key' => 'none',
            'name' => get_string('filternone', 'assign'),
            'active' => ($current == '')
        ]);

        foreach ($filterkeys as $key) {
            array_push($filters, [
                'key' => $key,
                'name' => get_string('filter' . $key, 'assign'),
                'active' => ($current == $key)
            ]);
        }
        return $filters;
    }
public function get_filters ( ) { $ filterkeys = [ ASSIGN_FILTER_SUBMITTED , ASSIGN_FILTER_NOT_SUBMITTED , ASSIGN_FILTER_REQUIRE_GRADING , ASSIGN_FILTER_GRANTED_EXTENSION ] ; $ current = get_user_preferences ( 'assign_filter' , '' ) ; $ filters = [ ] ; // First is always "no filter" option. array_push ( $ filters , [ 'key' => 'none' , 'name' => get_string ( 'filternone' , 'assign' ) , 'active' => ( $ current == '' ) ] ) ; foreach ( $ filterkeys as $ key ) { array_push ( $ filters , [ 'key' => $ key , 'name' => get_string ( 'filter' . $ key , 'assign' ) , 'active' => ( $ current == $ key ) ] ) ; } return $ filters ; }
Return array of valid search filters for the grading interface.

@return array
Return array of valid search filters for the grading interface .