Skip to content

Commit

Permalink
MDL-47494 ddwtos: Massively reduce the number of references to quiz i…
Browse files Browse the repository at this point in the history
…n the question code.

This mostly involves moving lang strings around, but I don't have time to do an AMOS script now.
  • Loading branch information
timhunt committed Feb 23, 2011
1 parent 9d55f4a commit 468dfe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions question/type/ddwtos/script.js
Expand Up @@ -30,20 +30,20 @@ var ddwtos_currentzindex = 10;

/*
* The way it seems to be, if there are more than one of this type of question
* in a quiz, then this file is shared between them. Therefore it has to cope
* on a page, then this file is shared between them. Therefore it has to cope
* with ALL the questions of this type on the page.
*/
(function() {

// start of App object SHARED BY ALL QUESTIONS OF THIS TYPE IN THE QUIZ /////
// start of App object by all questions of this type on a page.
YAHOO.example.DDApp = {
init : function() {
var questionspans = YAHOO.util.Dom.getElementsByClassName("ddwtos_questionid_for_javascript");

// we need this loop in case of more than one of this qtype on one page
for (var i = 0; i < questionspans.length; i++) {
// The Questions object should now contain a QuestionDataObject
//object for each question of this type in the quiz.
// object for each question of this type on the page.
Questions[questionspans[i].id] = new QuestionDataObject(questionspans[i].id);
}

Expand Down

0 comments on commit 468dfe7

Please sign in to comment.