api.rst 1.42 KB
Newer Older
1 2
.. _api:

3 4 5
Public API
----------

6
Every Django application in edx-ora2 has an `api.py` that is its public
7 8 9 10 11 12 13 14 15 16 17
interface. If you are using one of these applications from the outside, you
should only import things from that module. The ground rules for api modules
are:

1. All inputs and outputs must be trivially serializable to JSON. This means
   `None`, `int`, `float`, `unicode`, `list`, `tuple`, `dict`, and `datetime`.
2. Returned objects should not have methods or business logic attached to them.
3. Caller should assume that these calls can be moderately expensive, as they
   may one day move out of process and become network calls. So calling
   something a hundred times in a loop should be avoided.

18
Submissions
19
***********
20 21 22 23 24

.. automodule:: submissions.api
   :members:

Peer Assessment
25
***************
26

27 28
.. automodule:: openassessment.peer.api
   :members:
29 30 31

Django Apps
-----------
32

33 34
Submissions
***********
35

36
The Submissions app is responsible for:
37

38 39 40 41 42 43 44 45 46 47 48
1. Storing and retrieving student submissions for answering a given problem.
2. Storing and retriveing the raw scores assigned to those submissions.
3. Retrieving the raw scores for all items associated with a particular student
   in a particular course.

This application is ignorant of the content of submissions, and assumes them to
simply be opaque unicode strings.


Models
++++++
49 50
.. automodule:: submissions.models
   :members:
51 52 53

.. automodule:: openassessment.peer.models
   :members: