~azzar1/unity/add-show-desktop-key

Viewing all changes in revision 725.

  • Committer: mattgiuca
  • Date: 2008-04-06 15:04:54 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:725
The database now stores a cache of all the worksheets and what problems
are contained within each, for the purposes of determining marks.

This cache is automatically written to the database when someone visits a
worksheet in the website. If the worksheet file gets updated (touched), then
the database entries will be refreshed (so it is kept up to date).

At this stage, it isn't used to compute anything, it just gets stored in the
DB and updated.

Also added an "assessable" attribute to the worksheet element in the
worksheet XML, and an "optional" attribute to the exercise element, also in
the worksheet XML. (Both of these are optional, so it won't break existing
worksheets). Both default to False, so by default worksheets are not
assessable, and assessable worksheets have all-mandatory exercises.

users.sql: Added worksheet and worksheet_problem tables to the DB.
common/db.py: Added methods get_worksheet_mtime and create_worksheet.
tutorial/__init__.py:
    present_table_of_contents now gathers up details about all the exercises.
    present_worksheet now gets top level details.
    Added function update_db_worksheet, which checks the time stamps and
    updates the database if necessary.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: