fixed available page restriction accidentally copied from teacherview