All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class distans.ReadAnswerApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----distans.ReadAnswerApplet

public class ReadAnswerApplet
extends Applet
The MakePageApplet is the Applet that lets the teatcher read the students answers. When starting the Applet the following is done.
1. The password dialog is shown, which the user except for username/password confirmation uses to choose a subject.
2. The Information of the QuestionPages and the students answers are loaded from the server.


Variable Index

 o button1
 o cedula
 o correctLabel
 o currentPage
The pageTitle of the QuestionPage currently beeing displayed
 o currentPanel
 o currentShowPanel
A Panel that implements interface ShowPanelInterface.
 o currentType
The currentType of QuestionPage
 o dl
The Dataloader object responsible for communication with the server as well as having references to the data stuctures.
 o msgBox
A message box
 o next
 o overview
 o overviewTA
The textArea used to diplay the overview
 o pageSelect
 o pageTitleLabel
 o prev
 o pw
The password dialog
 o studentLabel
 o studentSelect
 o tabPanel1
 o totAlt
 o totAnsweredLabel
 o totCorrectLabel
 o totCross
 o totPanel
 o wPanel
The panel used for displaying QuestionPages of type written

Constructor Index

 o ReadAnswerApplet()

Method Index

 o cedula_ItemStateChanged(ItemEvent)
 o getNoOfCorrects(String, String)
 o giveOverview()
Presents an overview of all the students answers for the selected QuestionPage.
 o init()
This method is called by the browser when the applet starts.
 o initPages()
Adds QuestionPages already created for the given subject to the page select list This is only called on startup
 o initStudents()
Called at startup, this method puts all the students loaded by the datalaoder into the student selection list
 o next_ActionPerformed(ActionEvent)
 o overview_ItemStateChanged(ItemEvent)
 o pageSelect_DblClicked(ActionEvent)
 o prev_ActionPerformed(ActionEvent)
 o putPage()
If the overview checkbox is marked giveOverview is called otherwise the current QuestionPage and student answer are displayed
 o putPage(String, String)
Puts a new QuestionPage on the screen.
 o setAllEnabled(boolean)
Help method for setting the buttons enabled or not enabled.
 o showTotalCorrects(String)
Calculates and displays the total number of correct answers for the total panel
 o studentSelect_DblClicked(ActionEvent)
 o summeryButton_Clicked(ActionEvent)
Calls the script getAllAnswers.perl and displays the returned HTML in a new browser window

Variables

 o currentType
 private int currentType
The currentType of QuestionPage

 o dl
 private DataLoader dl
The Dataloader object responsible for communication with the server as well as having references to the data stuctures.

 o currentPage
 private String currentPage
The pageTitle of the QuestionPage currently beeing displayed

 o currentShowPanel
 private ShowPanelInterface currentShowPanel
A Panel that implements interface ShowPanelInterface. The Panel is currently one of the following ThreeCrossPanel TwoALtPanel or WrittenPAnel. The Panel handles flipping between the subquestions i.e. button ">" & "<".

 o msgBox
 private MsgBox msgBox
A message box

 o pw
 private pwBean pw
The password dialog

 o tabPanel1
 TabPanel tabPanel1
 o currentPanel
 Panel currentPanel
 o correctLabel
 Label correctLabel
 o totPanel
 Panel totPanel
 o totAnsweredLabel
 Label totAnsweredLabel
 o totCorrectLabel
 Label totCorrectLabel
 o studentLabel
 Label studentLabel
 o pageTitleLabel
 Label pageTitleLabel
 o studentSelect
 List studentSelect
 o pageSelect
 List pageSelect
 o prev
 Button prev
 o next
 Button next
 o cedula
 Checkbox cedula
 o button1
 Button button1
 o overview
 Checkbox overview
 o totCross
 ThreeCrossPanels totCross
 o totAlt
 TwoAltPanels totAlt
 o wPanel
 writtenPanel wPanel
The panel used for displaying QuestionPages of type written

 o overviewTA
 TextArea overviewTA
The textArea used to diplay the overview

Constructors

 o ReadAnswerApplet
 public ReadAnswerApplet()

Methods

 o init
 public void init()
This method is called by the browser when the applet starts. All graphical components are added here, even though all three Panels are added to the Applet they are not visible.

Overrides:
init in class Applet
 o putPage
 public void putPage()
If the overview checkbox is marked giveOverview is called otherwise the current QuestionPage and student answer are displayed

 o putPage
 public void putPage(String pageTitle,
                     String cedulaNo)
Puts a new QuestionPage on the screen. If the new QuestionPage is of a different page type than then the old, the old one is hidden and the new one shown. Some buttons enable mode are changed depending on the QuestionPage. e.g. only pages of type Cross will have the RandomButton enabled.

Parameters:
pageTitle - the page to display.
 o giveOverview
 void giveOverview()
Presents an overview of all the students answers for the selected QuestionPage. Only the students grade are shown.

 o summeryButton_Clicked
 void summeryButton_Clicked(ActionEvent event)
Calls the script getAllAnswers.perl and displays the returned HTML in a new browser window

 o setAllEnabled
 private void setAllEnabled(boolean enabl)
Help method for setting the buttons enabled or not enabled.

 o initStudents
 protected void initStudents()
Called at startup, this method puts all the students loaded by the datalaoder into the student selection list

 o initPages
 protected void initPages()
Adds QuestionPages already created for the given subject to the page select list This is only called on startup

 o getNoOfCorrects
 int getNoOfCorrects(String pageTitle,
                     String cedulaNo)
Returns:
s the number of correctly answered subquestions that a student has made for a QuestionPage
 o showTotalCorrects
 void showTotalCorrects(String cedulaNo)
Calculates and displays the total number of correct answers for the total panel

Parameters:
cedulaNo - the cedula of the student whos data shall be displayed.
 o next_ActionPerformed
 void next_ActionPerformed(ActionEvent event)
 o prev_ActionPerformed
 void prev_ActionPerformed(ActionEvent event)
 o pageSelect_DblClicked
 void pageSelect_DblClicked(ActionEvent event)
 o studentSelect_DblClicked
 void studentSelect_DblClicked(ActionEvent event)
 o cedula_ItemStateChanged
 void cedula_ItemStateChanged(ItemEvent event)
 o overview_ItemStateChanged
 void overview_ItemStateChanged(ItemEvent event)

All Packages  Class Hierarchy  This Package  Previous  Next  Index