2.3.4 Add a Coding Question

To add a coding question the user must once again navigate to the add question dialogue. From here the user selects the Code tab. The following is the Code tab.

Figure 1: The initial add-a-code-question window

 

The user fills in the question text and select whether or not this particular code will be compiled. If the user selects yes, 2 more menus become available for specifying a language and diff'ing a student's output with the instructor's. If compilation is enabled, the page that contains this coding question contains an editable text box for the student to write his code and an un-editable text box below the input for the output. This output box is used to display compiler errors when the Compile button is pressed. If there are no errors, another button Run is enabled on the testing interface. Clicking this button runs the "main" of the student's program, and uses the box previously mentioned as the standard output stream (Java: System.out, C++: cout, C: stdout, etc...).

 

Figure 2: An example coding question

When the user clicks Finish, the question is added to the database with no further information. If Diff with answer  is specified "Yes", an error presents itself, alerting the user that in order to diff the output, the user must enter a solution to the coding question. In the event of this error, the user cannot skip the Next screen. If compile code and diff with answer are set to "Yes" the following screen is presented when the user presses Next.

 

Figure 3: The coding question answer screen.

 

On this screen, the user enters his/her solution to the coding question that they asked. When finished, the user clicks Compile. Any compilation errors are reported in Output window. Once the code has compiled correctly, the user clicks the Run button to see if it is what he/she wishes. The output of each individual student's program is diff'ed with what is generated in the Output window when being graded. If the output matches exactly, the student receives full credit. If not, the user must grade the student individually.

Figure 4: An example coding question solution.

 

Clicking finish leaves the class, author, time, difficulty, and keywords fields blank. Clicking Next shows a screen to specify them.

Figure 5: The optional information about this question window

 

The user fills in the various fields. The default values of Class and Author are the values inputted for the last question. The user then presses Finish.

Figure 6: An example of the filled in window

 

Clicking Finish adds the question to the question database. It is added to the list of questions as shown below in Figure 7.

 

Figure 7: The question database after adding the coding question.

 


Prev: Add Fill Blank Next: Add Essay | Up: Manage Questions | Top: index