Announcement

Collapse
No announcement yet.

How Do I Stop Randomization of Quiz

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How Do I Stop Randomization of Quiz

    Im interested in the Quiz Template found in AMS, but how do i stop the quiz from populating the questions in a random format? here is the Random Section of the sample code;

    -- Now we can build a random quiz
    tbRnd = {}

    --Build a temporary table counting from 1 to the total number of questions
    local tbQtA = {} for x = 1,nTQ do

    tbQtA[x] = x; end

    --Define a random seed to help randomize the quiz
    seed_time = System.GetTime(TIME_FMT_SEC)..System.GetTime(TIME_ FMT_MIN)..System.GetTime(TIME_FMT_HOUR);
    seed_input = seed_time..System.GetDate(DATE_FMT_JULIAN); Math.RandomSeed(seed_input);

    --The following actions will build a table that contains a list of random questions
    --This table will then define the quiz to be taken.

    while Table.Count(tbRnd) < nQtA do

    --Generate a random number
    local nRnd = Math.Random(1,Table.Count(tbQtA));

    --Extract this random number from our number of questions table
    --Table remove will capture the line item and remove it from our temporary table
    --that way we will not have duplicate questions asked

    local nQ = Table.Remove(tbQtA, nRnd);

    --Insert the random question to our table
    Table.Insert(tbRnd, Table.Count(tbRnd)+1, nQ); end

  • #2
    The above quiz in question is the one included in AMS. All i want is to stop it from shuffling. What i want is the quiz should load the .xml file as it is. No random action.

    Comment


    • #3
      Here is the quiz template i want to stop the random questions.

      Please help if you can.
      Attached Files

      Comment


      • #4

        something like that?



        Click image for larger version

Name:	screen.PNG
Views:	61
Size:	45.0 KB
ID:	304216



        ******* 6MB
        [url=https://*******/#!f8sDiQZJ!Zl5obg0GbIyoR1OM-nbOG8rkUj92sqhHy_xpsA61oV8Quiz[/url]

        Comment


        • #5
          Click image for larger version

Name:	screen.PNG
Views:	59
Size:	113.1 KB
ID:	304245
          Hangman Game






          Comment

          Working...
          X