testtool.Main
Class Main

java.lang.Object
  extended by testtool.Main.Main

public class Main
extends java.lang.Object

Generic JavaDoc for Main Derived from an FMSL opaque type.


Constructor Summary
Main()
          Default Constructor
 
Method Summary
protected  QuestionDatabase add(Question qdb, QuestionDatabase[] q)
          Adds a question to the question database
protected  TestWizard addConstraintSet(ConstraintSet w, TestWizard constraints)
          Adds a new block of questions to the test wizard.
protected  EditableTest addQuestionEditable(EditableTest test, TestQuestion question, int index)
          Adds a question to an EditableTest.
protected  AnsweredQuestion answerQuestion(Answer tq, AnsweredTest a, QuestionBlock qb, TestQuestion at)
          A student takes a test question, and answers it
protected  AnsweredTest answerTest(AnsweredQuestion at, AnsweredTest aq, QuestionBlock qb)
          A student takes a test, and answers questions on it
protected  java.lang.String comment(Actual a)
          This allows the student to comment on a question
protected  ProctoredStudent createProctoredStudent(java.lang.String un)
          Create a student object with their username set
protected  QuestionDatabase delete(Question qdb, QuestionDatabase[] q)
          Removes a question from the question database
protected  ProctoredStudent endStudent(ProctoredStudent ps)
          sets the isEnded boolean, so that the student can no longer enter answers
protected  boolean equivalent(TestQuestion q1, TestQuestion q2)
           
protected  QuestionDatabase export(java.lang.String qdb, QuestionDatabase[] fn)
          Exports the question database to a file
protected  TestQuestion getQuestion(Test test, int index)
           
protected  TestQuestion getQuestionEditable(EditableTest test, int index)
           
protected  ProctoredStudent gradeQuestions(ProctoredStudent ps)
          grades a student's answers
protected  EditableTest makeEditableTest(TestWizard wizard)
          MakeTest extracts the data from the TestWizard to generate a EditableTest.
protected  Test makeTest(EditableTest et)
          Converts an editable test object into one suitable for administering to students.
protected  QuestionDatabase modify(Question qdb, Question old_q, QuestionDatabase[] new_q)
          Modfies a question in the question database
protected  EditableTest moveQuestionDownEditable(EditableTest test, int index)
          Swaps the question at the given index with the question at the next index.
protected  EditableTest moveQuestionUpEditable(EditableTest test, int index)
          Swaps the question at the given index with the question at the previous index.
protected  Problem newgoto(Problem t, Test p)
          This jumps to the given question
protected  QuestionDatabase newimport(java.lang.String qdb, QuestionDatabase[] fn)
          Imports a question database into the existing database
protected  void openIDE(Actual ide, java.lang.String la, LongAnswer[] a)
          This operation opens up a pre-selected IDE for coding questions
protected  void page(java.lang.String pw, pagew c)
          pages
protected  pagew pageproctor(Proctored pt)
          opens a pagewindow
protected  boolean passes(ConstraintSet filters, TestQuestion question)
           
protected  ProctoredTest pauseTest(ProctoredTest pt)
          Pauses the current test for all users
protected  TestWizard removeConstraintSet(ConstraintSet w, TestWizard cset)
          Removes a block of questions from the test wizard.
protected  EditableTest removeQuestionEditable(EditableTest test, int index)
          Removes a question from an editable test.
protected  EditableTest replaceQuestionEditable(EditableTest test, int index)
          The TestQuestion's QuestionBlock is found, a new question is generate d according to the ConstraintSet of the QuestionBlock, and this new TestQuestion replaces the existing one.
protected  QuestionDatabase search(QuestionDatabase[] qdb, SearchString ss)
          Searches for questions that match a field the user specifies
protected  ProctoredStudent setAnswer(GradedQuestion q, ProctoredStudent ps)
          Adds the answered questions to the student object
protected  TestTimer settimer(int a)
          Allows user to time themselves
protected  ProctoredTest startTest(ProctoredStudent psl)
          Starts the current test for all students
protected  AnsweredTest submit(Actual a, AnsweredTest at, int tr)
          Saves test and uploads to proctor
protected  StandardColor toggleComplete(java.lang.Object stdC, java.lang.Object stdC2, java.lang.Object stdC3)
          chooses a new color for complete status
protected  StandardColor toggleInComplete(java.lang.Object stdC, java.lang.Object stdC2, java.lang.Object stdC3)
          chooses a new color for incomplete status
protected  boolean toggleQDisplay(boolean onePP)
          switches the boolean value
protected  QuestionTimer toggleQuestionTimer(QuestionTimer qt)
          changes the display boolean
protected  StandardColor toggleRevisit(java.lang.Object stdC, java.lang.Object stdC2, java.lang.Object stdC3)
          chooses a new color for revisit status
protected  TestTimer toggleTestTimer(TestTimer tt)
          changes the display boolean
protected  ProctoredTest unpauseTest(ProctoredTest pt)
          Unpauses the current test for all users
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Default Constructor

Method Detail

add

protected QuestionDatabase add(Question qdb,
                               QuestionDatabase[] q)
Adds a question to the question database


addConstraintSet

protected TestWizard addConstraintSet(ConstraintSet w,
                                      TestWizard constraints)
Adds a new block of questions to the test wizard.


addQuestionEditable

protected EditableTest addQuestionEditable(EditableTest test,
                                           TestQuestion question,
                                           int index)
Adds a question to an EditableTest.


answerQuestion

protected AnsweredQuestion answerQuestion(Answer tq,
                                          AnsweredTest a,
                                          QuestionBlock qb,
                                          TestQuestion at)
A student takes a test question, and answers it


answerTest

protected AnsweredTest answerTest(AnsweredQuestion at,
                                  AnsweredTest aq,
                                  QuestionBlock qb)
A student takes a test, and answers questions on it


comment

protected java.lang.String comment(Actual a)
This allows the student to comment on a question


createProctoredStudent

protected ProctoredStudent createProctoredStudent(java.lang.String un)
Create a student object with their username set


delete

protected QuestionDatabase delete(Question qdb,
                                  QuestionDatabase[] q)
Removes a question from the question database


endStudent

protected ProctoredStudent endStudent(ProctoredStudent ps)
sets the isEnded boolean, so that the student can no longer enter answers


equivalent

protected boolean equivalent(TestQuestion q1,
                             TestQuestion q2)

export

protected QuestionDatabase export(java.lang.String qdb,
                                  QuestionDatabase[] fn)
Exports the question database to a file


getQuestion

protected TestQuestion getQuestion(Test test,
                                   int index)

getQuestionEditable

protected TestQuestion getQuestionEditable(EditableTest test,
                                           int index)

newgoto

protected Problem newgoto(Problem t,
                          Test p)
This jumps to the given question


gradeQuestions

protected ProctoredStudent gradeQuestions(ProctoredStudent ps)
grades a student's answers


newimport

protected QuestionDatabase newimport(java.lang.String qdb,
                                     QuestionDatabase[] fn)
Imports a question database into the existing database


makeEditableTest

protected EditableTest makeEditableTest(TestWizard wizard)
MakeTest extracts the data from the TestWizard to generate a EditableTest. The QuestionBlocks are populated with questions and added to the EditableTest.


makeTest

protected Test makeTest(EditableTest et)
Converts an editable test object into one suitable for administering to students.


modify

protected QuestionDatabase modify(Question qdb,
                                  Question old_q,
                                  QuestionDatabase[] new_q)
Modfies a question in the question database


moveQuestionDownEditable

protected EditableTest moveQuestionDownEditable(EditableTest test,
                                                int index)
Swaps the question at the given index with the question at the next index.


moveQuestionUpEditable

protected EditableTest moveQuestionUpEditable(EditableTest test,
                                              int index)
Swaps the question at the given index with the question at the previous index.


openIDE

protected void openIDE(Actual ide,
                       java.lang.String la,
                       LongAnswer[] a)
This operation opens up a pre-selected IDE for coding questions


passes

protected boolean passes(ConstraintSet filters,
                         TestQuestion question)

pauseTest

protected ProctoredTest pauseTest(ProctoredTest pt)
Pauses the current test for all users


removeConstraintSet

protected TestWizard removeConstraintSet(ConstraintSet w,
                                         TestWizard cset)
Removes a block of questions from the test wizard.


removeQuestionEditable

protected EditableTest removeQuestionEditable(EditableTest test,
                                              int index)
Removes a question from an editable test.


replaceQuestionEditable

protected EditableTest replaceQuestionEditable(EditableTest test,
                                               int index)
The TestQuestion's QuestionBlock is found, a new question is generate d according to the ConstraintSet of the QuestionBlock, and this new TestQuestion replaces the existing one.


search

protected QuestionDatabase search(QuestionDatabase[] qdb,
                                  SearchString ss)
Searches for questions that match a field the user specifies


setAnswer

protected ProctoredStudent setAnswer(GradedQuestion q,
                                     ProctoredStudent ps)
Adds the answered questions to the student object


settimer

protected TestTimer settimer(int a)
Allows user to time themselves


startTest

protected ProctoredTest startTest(ProctoredStudent psl)
Starts the current test for all students


submit

protected AnsweredTest submit(Actual a,
                              AnsweredTest at,
                              int tr)
Saves test and uploads to proctor


toggleComplete

protected StandardColor toggleComplete(java.lang.Object stdC,
                                       java.lang.Object stdC2,
                                       java.lang.Object stdC3)
chooses a new color for complete status


toggleInComplete

protected StandardColor toggleInComplete(java.lang.Object stdC,
                                         java.lang.Object stdC2,
                                         java.lang.Object stdC3)
chooses a new color for incomplete status


toggleQDisplay

protected boolean toggleQDisplay(boolean onePP)
switches the boolean value


toggleQuestionTimer

protected QuestionTimer toggleQuestionTimer(QuestionTimer qt)
changes the display boolean


toggleRevisit

protected StandardColor toggleRevisit(java.lang.Object stdC,
                                      java.lang.Object stdC2,
                                      java.lang.Object stdC3)
chooses a new color for revisit status


toggleTestTimer

protected TestTimer toggleTestTimer(TestTimer tt)
changes the display boolean


unpauseTest

protected ProctoredTest unpauseTest(ProctoredTest pt)
Unpauses the current test for all users


page

protected void page(java.lang.String pw,
                    pagew c)
pages


pageproctor

protected pagew pageproctor(Proctored pt)
opens a pagewindow