MATLAB/Wikiquiz writer (MATLAB)/Numeric/Readme.txt

From Wikiversity
Jump to navigation Jump to search
This creates a one-question numerical wikiquiz, and is 
designed to be edited into 26 versions of the same wikiquiz with an arbitrary
number of questions. As of 7 November 2014 it runs on the latest stable versions of 
MatLab and GNU Octave, except that in Octave there is a warning that nested
functions are coerced into subfunctions (whatever that means).  

Put these three files in to a folder dedicated to a single quiz:
* Readme.txt
* main.m
* testeditor.m

Then run main.m and look for the creation of 
WikiQuizABC.txt and WikiQuizD_Z.txt.  

Then make another copy of that folder, relabel it for your wikiquiz.  In that copy
modify testeditor.m but do not modify bookkeeping.m.  

It is a good policy to keep copies of testeditor.m and main.m
for each wikiquiz in a folder dedicated to that wikiquiz
because both functions are likely to be edited in the future.  
This will permit you to use these "obsolete" versions
in order to do light editing of any given wikiquiz.

Since there will multiple copies of main.m and testeditor.m, be careful
not to edit the wrong one.  An alternative is to rename each main.m and each 
testeditor.m, for example mainQuiz1.m, mainQuiz2.m, and so forth.

HOW TO MODIFY testeditor.m

First decide how many questions you wish to write and copy/paste the single question
provided.  As you edit the question, adhere to the following rules:
S0 is a string that begins each test question.  
* S0 can be followed with either S1 or a V1-V2 pair.
* S1 can be followed with either S1 or a V1-V2 pair.
* V1 is always followed by V2 (describes and writes a random variable)
* V2 is typically followed by S1.

In MatLab, a long sentence or phrase may be broken but concatenating an S1 onto the
current string.  Unless you include a wikitext linebreak, the entire question appears 
as one line in the wikitext.