Beispiel #1
0
 class Meta:
     queryset = PeerReviewAssignment.objects.all()
     resource_name = 'privpeer_review_assignment'
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     filtering = {
         "kq": ('exact'),
     }
Beispiel #2
0
 class Meta:
     queryset = Asset.objects.all()
     resource_name = 'privasset'
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     filtering = {
         "available_in": ('exact'),
     }
Beispiel #3
0
 class Meta:
     queryset = Question.objects.all()
     resource_name = 'privquestion'
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     always_return_data = True
     filtering = {
         "kq": ('exact'),
     }
Beispiel #4
0
 class Meta:
     queryset = EvaluationCriterion.objects.all()
     resource_name = 'privevaluation_criterion'
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     filtering = {
         "assignment": ('exact'),
         "unit": ('exact'),
     }
Beispiel #5
0
 class Meta:
     queryset = KnowledgeQuantum.objects.all()
     resource_name = 'privkq'
     always_return_data = True
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     filtering = {
         "unit": ('exact'),
     }
Beispiel #6
0
 class Meta:
     queryset = AssetAvailability.objects.all()
     resource_name = 'privasset_availability'
     always_return_data = True
     authentication = TeacherAuthentication()
     authorization = TeacherAuthorization()
     filtering = {
         "kq": ('exact'),
         "assets": ('exact'),
     }
Beispiel #7
0
 class Meta:
     resource_name = 'user'
     queryset = User.objects.all()
     allowed_methods = ['get']
     authentication = TeacherAuthentication()
     authorization = DjangoAuthorization()
     fields = ['id', 'first_name', 'last_name', 'email']
     filtering = {
         'first_name': ['istartswith'],
         'last_name': ['istartswith'],
         'email': ['icontains'],
     }
Beispiel #8
0
 class Meta:
     resource_name = 'user'
     queryset = User.objects.all()
     allowed_methods = ['get']
     authentication = MultiAuthentication(TeacherAuthentication(),
                                          ApiKeyAuthentication())
     authorization = UserResourceAuthorization()
     fields = ['id', 'email', 'first_name', 'last_name']
     filtering = {
         'first_name': ['istartswith'],
         'last_name': ['istartswith'],
         'email': ('iexact')
     }