Help:Contents

From Progzoo

Revision as of 19:48, 19 March 2012 by Andr3w (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The progzoo Wiki permits normal wiki text but it also allows interactive components. See http://www.mediawiki.org/wiki/Help:Formatting for help on "normal" Wiki text.

Contents

The progzoo XML Elements

To support progzoo's capabilities the interactive components are described in <question> tags. Each such tag will be translated into a textbox with the submit button. View this sample question.

<shell className='P' import='shells.xml#main'/>
<question className="P">
This program includes a simple <code>for</code> loop.
it prints the numbers from 0 to 9
<p class='imper'>Print out numbers 0 to 4</p>.
<prog lang='java'>
  for (int i=0;i&lt;10;i++)
    System.out.println(i);
</prog>
<answer lang='java'>
  for (int i=0;i&lt;5;i++)
    System.out.println(i);
</answer>
</question>

Explanation

shell
The shell is the surrounding program. Users program fragments get inserted into a shell.
There are several shells available including shells.xml#main which goes:

public class P{
  public static void main(String [] argv){
    QcQ
  }
}

Also shells.xml#null where the program fragment is the whole program.
Here are some other shells: http://progzoo.net/shells.xml http://progzoo.net/shells_bbc.xml http://progzoo.net/shells_bricks.xml http://progzoo.net/shells_cia.xml http://progzoo.net/shells_monopoly.xml http://progzoo.net/shells255.xml http://progzoo.net/shells_bricks.xml http://progzoo.net/shells_chess.xml http://progzoo.net/shellsGrades.xml http://progzoo.net/shells_sax.xml</dd>
You can include a shell tag in the question or at the top the page</dd>
className
is required for Java and C#. This should match the class name in the program.
question text
The question text may include html and wiki markup.
<prog>
this tag contains the program fragment that appears in the text box by default. Students edit this text to produce the answer. Most questions include a program fragment that is "nearly" right. Notice that the < characters is written &lt;, we need to do this because the question tag must be well formed XML.
<answer>
this tag contains the program fragment answer. The users' output is compared with this model answers' output to judge is it is correct. The answer is "hidden" from the the user but can be discovered by enterprising students.

Translating Existing Material

Translate contains text that can be copied and pasted into this editor.

To Do list

TODO Some jobs that need to be done on the web site.