2.3.1.5 Adding Code and HTML Question

This scenario shows a teacher adding  a Code question to the question database. In this scenario, we will assume the user is a teacher who has opened the Test Tool. We will also assume that the teacher has no other aspects of the Test Tool open.

To add a question to the database, the teacher selects the 'Add Question' command in the 'Repository' menu as shown in Figure 1. In response, the system displays the dialog shown in Figure 4.

Figure 1

 

Then the teacher chooses the "Code" 'Question Type' in Figure 4. The "Code" answer area consists of the 'Answer', the 'Script Output', and the 'Stdout Output'. The answer is simply an answer text field that contains the teacher's solution code. The script output is the correct script output generated when the code is run with test cases. The Stdout output is the output that the code writes to the stdout file.

Figure 4

 

The teacher fills in the information by a combination of typing and selecting from pre-defined choices in Figure 6. The teacher chooses the "CSC 101" 'Class'. Then the teacher chooses a 'Length', 'Keywords', 'Date last used', 'Difficulty' and 'Class Week'. The teacher decides to 'Import Question From File'. The teacher clicks this button and the system brings up the dialog in Figure 5. The teacher then chooses an HTML file to use as a question. The system only allows the teacher to select HTML files. The system then imports this HTML and displays it in the 'Question' field in Figure 6 as un-rendered.

Figure 5

 

The system adds a radio button in Figure 6 to view rendered or un-rendered HTML. The teacher types the correct code in the 'Answer' field. Lastly, the teacher types the correct 'Script Output' and 'Stdout Output' in their relative fields.

Figure 6

 

Then the teacher clicks the radio button to view the rendered HTML as shown in Figure 7. In response, the system shows the rendered HTML, however, the behavior of links is undefined. The teacher attempts to modify the rendered HTML, however, the system disallows modification of rendered HTML. Finally, the teacher presses the 'OK' button and the system adds the question to the question database.

Figure 7

 

 


Prev: adding Long Answer | Next: modifying| Up: adding | Top: index