Manage Dependencies and Template Logic on JOBE

Re: Manage Dependencies and Template Logic on JOBE

de către Richard Lobb-
Număr de răspunsuri: 0
There are three places you can store support files:
  1. In individual questions.
  2. In question prototypes.
  3. On the Jobe server.

Method (1) is OK for one-off use of a file, e.g. the data file for a particular file-reading question. You shouldn't use it for files that are needed by multiple questions however as it's then very difficult to maintain your question bank when you want to update the support files. You should instead define a new question type containing the common files.

Method (2) is the usual method to use in the situation you describe. All the support files from the prototype are loaded into the question workspace when the run begins. Our in-house python3_scratchpad question type has 10 support files with over 2000 lines of code. This is an efficient method because support files are cached on the Jobe server so are only ever uploaded once. The support files can be updated by the question author without requiring access to the Jobe server. Updates to the Jobe server don't require that you re-install all your support files.

Method (3) can be used if you have a very large number of support files and/or very large files and/or files that need special access rights. For example, if you have a question type for a new language you would nearly always install that on the jobe server rather than trying to include the entire language in question prototype support files. We do use this method occasionally but prefer to use (2) whenever possible.

Hope that helps.