CSSE1001 / MyPyTutor

Interactive tutorial application for Python3.
Other
7 stars 12 forks source link

Map from old to new tutorial hashes on the server #44

Closed sapi closed 9 years ago

sapi commented 9 years ago

Tutorials can change over the semester.

Currently, web_api.py will accept and return the current hash. This means that if we change a tutorial after the student submits it, calling another method which uses the hash (like show_submit, or one of the admin methods) will return the old hashes.

We should keep the hash at the time of the submission in submission_log, but map to the new hash in every response.

Proposed solution: have a tutorial_hash_changes file, which maps old hashes to new hashes. If the hash changes more than once, later lines can reflect that. For example, if a given tutorial changes from hash1 to hash2, and then to hash3, we would have:

# tutorial_hash_changes
hash1 hash2
hash2 hash3
sapi commented 9 years ago

An alternative to this, which may be easier, would be to keep the old hash files on the server, eg:

tutorial_hashes
tutorial_hashes.1
tutorial_hashes.2

The server would then have to parse each file on each request, so this would involve trading overhead for simplicity.