-
<inner> checkComplete() → {Boolean}
-
checks to see if the question number in the cookie 'queston' has been completed.
- Source:
Returns:
true if the question is complete, false otherwise.
-
Type
-
Boolean
-
<inner> checkForDuplicates(answer) → {Boolean}
-
Called from submitAnswer() to check if the answer was previously given.
Parameters:
Name |
Type |
Description |
answer |
|
The answer that was submitted. |
- Source:
Returns:
Can you guess what true means?
-
Type
-
Boolean
-
<inner> createJsmeDiv()
-
Creates the string for a div to be populated with a JSME applet.
Returns an object with the div string and its unique id.
- Source:
-
<inner> createScoreString() → {String}
-
Uses the values in the cookies to create a string showing the average (as a %) over x number of questions.
- Source:
Returns:
-
Type
-
String
-
<inner> display(what, popup)
-
Displays a popup window or new tab
Parameters:
Name |
Type |
Description |
what |
String
|
what is the rleative URL to display |
popup |
Boolean
|
true and the window will be a popup false and it will be in a new tab. |
- Source:
-
<inner> getNumberOfQuestions()
-
Uses Ajax (in a synchronous mode) to retrieve /json/spectroscopy.json and uses it determine the number
of questions for spectroscopy.
If you add a question you must update /json/spectroscopy.json accordingly
- Source:
Returns:
the number of questions
-
<inner> loadCSS(href)
-
Used by initializeSpectroscopy to load the CSS file.
Parameters:
Name |
Type |
Description |
href |
|
|
- Source:
-
<inner> loadJS(src)
-
Used by initializeSpectroscopy to load javascript files it depends on. JSME and JQuery must already
be loaded (from the html page).
Parameters:
Name |
Type |
Description |
src |
|
|
- Source:
-
<inner> loadNewQuestion()
-
callback handler for when a new question number has been selected from the next and previous buttons
- Source:
-
<inner> nextQuestion()
-
Moves to the next question.
End of questions behaviour is configured using CYCLE_NEXT_PREV value.
- Source:
-
<inner> numberOfCompleteQuetions() → {Number}
-
- Source:
Returns:
number of complete questions in the category since the category was selected.
-
Type
-
Number
-
<inner> prevQuestion()
-
Moves to the previous question in the category.
Beginning of questions behaviour is configured using config CYCLE_NEXT_PREV value.
- Source:
-
<inner> showHint()
-
Alerts or displays a hint. Handler for the hint button.
Behaviour is configured via config SPEC_UNLOCK_ALL_QUESTIONS and
config ALERT_HINTS_MSGS
- Source:
-
<inner> submitAnswer()
-
Submits to the analyzer and updates the page attributes and values based on the analyzer responses.
- Source:
-
<inner> unlockQuestion()
-
unlocks the question so that the solution can be viewed and the question or category changed. Also allows duplicate answers to be
submitted.
- Source: