The idea of the question type:
- The teacher gives a question text e.g. Please implement the factorial-function of the Factorial-class below.
- Then he adds the interface of the source code needed to implement the factorial-function for the student (naming the classes and methods as they will be used in the corresponding junit-test classes to checked with each other).
- Next he can load needed junit-test classes he has prepared for this question.
- Now he can give partial scores to each needed test class (if a loaded junitTest.java-file has 5 test cases he types in 5 for this file - one point for each test case).
- The "default question grade" is the sum of all partial-scores set for each used junitTest-file.
- Finally he can choose the display option whether to
- do not display test class results to student at all (e.g. during an exam)
- display test class results to student before posting his answer (e.g. for a quiz taken as an exercise)
- display test class results to student after posting his answer (e.g. for a quiz taken as an exercise)
- do not display test class results to student at all (e.g. during an exam)
So I decided to use following tables and fields:
table: question_so_junit
field1: givencode (the code given by teacher to be filled out by student)
field2: displayoption (display test results to student? 0=no; 1=display results before posting answer; 2=display results after posting answer)
table: question_so_junit_testclass
field1: testclassname (the name of the test class needed for this question loaded by teacher )
field2: testclasscontent (content of loaded test class file - maybe not needed)
field3: partialscores (score to achieve for this question - one point for each testcase of testclass)
table: question_so_junit_testoutput
field1: testoutput (execution output of test cases of student response)
field2: partialgrade (partial grade the student receives for this testclass output (calculated through field testoutput))
table: question_so_junit_studentresponse
field1: studentid (foreign key to user table?)
field2: studentresponse (source code response of student)
field3: compileroutput (compiler output of student response)
So there can be several JUnit-classes used for one new junit-question-type, but on testclass belongs to one junit-question.
There can be as many testoutputs and with it partialgrades depending on the number of students that took the junit-question, but one testoutput for each student of one test-class.
There can be as many student responses as students have taken the question, but each student response belongs to one junit-question.
So my questions are:
- Is there something I forgot to think about in general or should do different?
- Does the db-structure make sense to do what I want to do?
- What I didn't understand yet is if I will need e.g. in the "question_so_junit_studentresponse"-tabe the studentid (as a foreign key from user-table?) or if the question-module is built up the way that it knows through the session whose response belongs to whom. Or do I need to add the studentid into the "question_so_junit_testoutput"-table as well?