~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/database.py

Added a method onto offering to find all the users enroled in the subject
who are students.

Modified the project view to show the list of students/groups who are
currently assigned to that project.

Show diffs side-by-side

added added

removed removed

Lines of Context:
380
380
        return enrolment
381
381
 
382
382
    def get_students(self):
383
 
        return self.enrolments.find(role='student')
 
383
        enrolments = self.enrolments.find(role=u'student')
 
384
        return [enrolment.user for enrolment in enrolments]
384
385
 
385
386
class Enrolment(Storm):
386
387
    """An enrolment of a user in an offering.