Home > User Guides > VLE Guide for Instructors > Using CodeRunner >  Creating Different CodeRunner Question Types

Creating Different CodeRunner Question Types

Creating a C function question

In order to create a C function question:

1. In the CodeRunner question type settings, choose c_function as the question type for the question. Its details will be displayed in the Question type details.

Choosing c_function as the question type

2. Configure the desired marking and penalty regime for the question. You can click the question mark button for additional help.

Configuring the marking for the question

3. In the General settings, choose a category where you want the question to be saved and supply the question name, question text (for the description), and its default mark. The category is set to default for your current course where the question is located.

Configuring the General settings

4. In the Answer settings, supply a sample answer to the question. The sample answer has to be a C function.

Supplying a sample answer in the Answer settings

5. In the Test cases settings, create test cases which will be used for checking the correctness of the student’s submitted code. The test code is usually in the form printf(format_string, func(arg1, arg2, ...)), calling the student’s C function code. Don’t forget to supply an expected output for each test cases. You can also adjust the test properties for each test case. Add more test cases as you see fit by clicking the Blanks for 3 more choices button.

Creating and adding test cases

6. Click the Save changes button if you are done, or click the Save changes and continue editing button to save your current changes and continue editing the question. You can also click the Preview button to see what the question would look like to a student.

Creating a C program question

In order to create a C program question:

1. In the CodeRunner question type settings, choose c_program as the question type for the question. Its details will be displayed in the Question type details.

Choosing c_program as the question type

2. Configure the desired marking and penalty regime for the question. You can click the question mark button for additional help.

Configuring the marking for the question

3. In the General settings, choose a category where you want the question to be saved and supply the question name, question text (for the description), and its default mark. The category is set to default for your current course where the question is located.

Configuring the General settings

4. In the Answer settings, supply a sample answer to the question. The sample answer has to be a C program.

Supplying a sample answer in the Answer settings

5. In the Test cases settings, create test cases which will be used for checking the correctness of the student’s submitted code. Instead of supplying a test code, you must supply a standard input (stdin) data. Don’t forget to supply an expected output for each test cases. You can also adjust the test properties for each test case. Add more test cases as you see fit by clicking the Blanks for 3 more choices button.

Creating and adding test cases

6. Click the Save changes button if you are done, or click the Save changes and continue editing button to save your current changes and continue editing the question. You can also click the Preview button to see what the question would look like to a student.

Creating a Java method question

In order to create a Java method question:

1. In the CodeRunner question type settings, choose java_method as the question type for the question. Its details will be displayed in the Question type details.

Choosing java_method as the question type

2. Configure the desired marking and penalty regime for the question. You can click the question mark button for additional help.

Configuring the marking for the question

3. In the General settings, choose a category where you want the question to be saved and supply the question name, question text (for the description), and its default mark. The category is set to default for your current course where the question is located.

Configuring the General settings

4. In the Answer settings, supply a sample answer to the question. The sample answer has to be a Java method.

Supplying a sample answer in the Answer settings

5. In the Test cases settings, create test cases which will be used for checking the correctness of the student’s submitted code. The test code is usually written in one or two lines, calling the student’s Java method code. Don’t forget to supply an expected output for each test cases. You can also adjust the test properties for each test case. Add more test cases as you see fit by clicking the Blanks for 3 more choices button.

Creating and adding test cases

6. Click the Save changes button if you are done, or click the Save changes and continue editing button to save your current changes and continue editing the question. You can also click the Preview button to see what the question would look like to a student.

Creating a Java program question

In order to create a Java program question:

1. In the CodeRunner question type settings, choose java_program as the question type for the question. Its details will be displayed in the Question type details.

Choosing java_program as a question type

2. Configure the desired marking and penalty regime for the question. You can click the question mark button for additional help.

Configuring the marking for the question

3. In the General settings, choose a category where you want the question to be saved and supply the question name, question text (for the description), and its default mark. The category is set to default for your current course where the question is located.

Configuring the General settings

4. In the Answer settings, supply a sample answer to the question. The sample answer has to be a Java program.

Supplying a sample answer in the Answer settings

5. In the Test cases settings, create test cases which will be used for checking the correctness of the student’s submitted code. Instead of supplying a test code, you must supply a standard input (stdin) data. Don’t forget to supply an expected output for each test cases. You can also adjust the test properties for each test case. Add more test cases as you see fit by clicking the Blanks for 3 more choices button.

Creating and adding test cases

6. Click the Save changes button if you are done, or click the Save changes and continue editing button to save your current changes and continue editing the question. You can also click the Preview button to see what the question would look like to a student.