So far as the "proper DNN fashion" as long as you are doing module development by following the developer's guide, you're pretty safe. The functionality of the module is really up to you. That said, you still have a few options that aren't as extreme as solely using userid.
You eluded that this is for a school. Is it a single school or a district? The reason I ask is more from a practicallity stand point. The three options I see for you are:
- Use a dropdownlist or querystring to identify which teach you are viewing/editing
- Use settings to identify the teacher and base edit privs on userid
- Use settings to identify the teacher and base edit privs on roles
Options 2 & 3 require you to have one page per teacher. Depending on how you planned to organize the site, this may or may not be appropriate. Option 3 uses a more traditional DNN approach; edit privs are based on a role that can edit that module. A role is simply a logical grouping of users. There's no rule that says you have to have more than one user in a role. This may not be practical if you have 1000s of teachers (eg: school district). If you only have 50-100 teachers, though, this is an easy way to do what you want.
For Example:
Ms Brown teaches 3rd grade and Mr Hall teaches 4th grade.
- Create a priv group for Ms Brown (Ms Brown Teacher) and another for Mr Hall (Mr Hall Teacher).
- Create a priv group for Ms Brown's students (Ms Brown Students) and another for Mr Hall's students (Mr Hall Students)
- Create a tab for 3rd grade and a page for each 3rd grade teacher (of which Ms Brown is one)
- Create a tab for 4th grade and a page for each 4th grade teacher (of which Mr Hall is one)
- On Ms Brown's page set view privs to her students role and edit privs to her teacher role (remember, she's the only teacher in her role)
- On Mr Hall's page set view privs to his students role and edit privs to his teacher role.
Now when Ms Brown's students navigate to 3rd Grade --> Ms Brown, they will see her page which she has control to edit. Mr Hall's page works the same way. In this scenario we are not allowing students outside that class to see another class' page. This may be more stringent than you need, but it's an option that's easy to implement. Keep in mind a user can be in more than one role so students may have access to multiple teacher pages, but only the single teacher can edit their own page/module.
The important thing about module design in this scenario is to remember to include moduleid in your table. This will allow you to have multiple instances of the module throughout the portal.