Add API call to get testings
parent
465668f282
commit
3763ceefd3
|
@ -242,6 +242,14 @@ class CakeCMS:
|
|||
if value is False: value = 0
|
||||
return self.post('notes_entries/change', {'NotesEntry': {'student_id': student_id, 'note_id': note_id, 'value': value}}, course=course)
|
||||
|
||||
def testings_index(self, course=None):
|
||||
"""
|
||||
Get all testings in nested tree structure
|
||||
:param course:
|
||||
:return:
|
||||
"""
|
||||
return self.get('testings/index', course=course).json()['testings']
|
||||
|
||||
def testingresults_change(self, testing_id, student_id, points, course=None):
|
||||
"""
|
||||
Edit the points of a student.
|
||||
|
@ -251,7 +259,7 @@ class CakeCMS:
|
|||
:param course:
|
||||
:return:
|
||||
"""
|
||||
return self.post('testingresults/change', {'Testingresult': {'student_id': student_id, 'testing_id': testing_id, 'points': points}}, course=course)
|
||||
return self.post('testingresults/change', {'Testingresult': {'student_id': student_id, 'testing_id': testing_id, 'points': points}}, course=course).json()
|
||||
|
||||
def materials_index(self, course=None):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue