I'd just have one many-to-many field connecting students with courses.
Then in the admin interface, create views that allow adding entire
groups to a course, which would just loop through every student in a
group and add them to the course.

Splitting them up like you have (individual students, groups, students
to exclude from groups) might be more efficient in terms of storage,
but would probably result in more computation when retrieving data,
which is what your app will be doing most of the time.

On 10 February 2010 07:58, Chris McComas <mccomas.ch...@gmail.com> wrote:
> I have a Course Management System I've developed here at work. Faculty
> can login and upload lectures, course resources, etc to classes they
> teach, along with general course information. Students can login to
> view their courses, download lectures, resources, get announcements
> from their faculty members, etc.
>
> My model as is: http://dpaste.com/156737/
>
> What I'm trying to figure out is the best method to assign students to
> courses. We'd like the ability to have all students in one group,
> there are a couple courses that are for all students regardless of
> freshman, sophomore, etc. Also, we'd like to have groups for each
> class year, Freshman, Sophomore, Junior, Senior, also, we'd like the
> option to individually add students to certain courses, so a freshman
> could be added to a junior class. Also, we want the option to exclude
> individuals from a course, so if all but 5 of the 80 freshman are in a
> class, we can add the group to the class, but just exclude those five
> (could do so with .exclude() in a query).
>
> So would it make sense to have this in my Courses model?
>
> - A ManyToManyField to groups that include All Students, Freshman,
> Sophomores, Juniors, Seniors that will add all students in each group
> to a course
> - A ManyToManyField with a list of all students to individually add
> these students to a course if they're Group is not already added
> - A ManyToManyField with a list of all students to individually
> EXCLUDE these students to a course if they're Group is added
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to