git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@42 6d9bc8c9-1ec2-4278...
authorartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 24 Nov 2008 21:25:51 +0000 (21:25 +0000)
committerartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 24 Nov 2008 21:25:51 +0000 (21:25 +0000)
conifer/syrup/views.py

index a7fde8d..fe2990a 100644 (file)
@@ -48,7 +48,8 @@ def instructors(request):
     count = int(request.GET.get('count', 5))
     action = request.GET.get('action', 'browse')
     if action == 'join':
-        paginator = Paginator(models.Course.objects.filter(moderated=False), count)
+        paginator = Paginator(models.UserProfile.objects.filter(instructor=True).
+            select_related('user').order_by('-user__last_name','-user__first_name'), count)
     elif action == 'drop':
         paginator = Paginator(models.Course.objects.filter(moderated=False), count)
     else: