Custom structure field

We’re working on a grading system in Kirby. On a student’s pane user page, a teacher needs to be see what a student (i.e. user) has submitted, but only the submissions that fall under the course to which the teacher is assigned.

For example, a student submits homework for courses 1, 2, and 3. teacher 1 has taught course 1 but teacher 2 has taught courses 2 and 3. We’d like teacher 1 to be able to grade any of the student’s submitted assignments for course 1 and teacher 2 to grade anything from course 2 or 3.

This data is currently stored in a structure field in the student’s user.txt file. When a teacher looks at the submissions, they should only see submissions that came from course 1. Right now they see all the submissions in the structure field.

The question: Can I query a structure field to only return entries with a certain field value, e.g. when the course name is one that the teacher is assigned to. Is it possible to make my own version of a structure field?

In general, Kirby doesn’t know permissions for anything below the page level (in this case user level), so you cannot have permissions by field or items within a field.

You can create custom fields, so yes, you could create a custom version of the structure field. Just wondering if it wouldn’t be easier permission-wise to have those submissions as pages.

@texnixe the submissions are a link to google drive doc. Not kirby content. It is just a url that gets saved from a form on the front end which ends up in the struture field on the back end programatically.

I see, then pages don’t really make sense. But still, permissions on the sub-field level are not possible in Kirby, at least not without a custom implementation.