Quiz freezing (seemingly randomly)

Topics related to using ToolBook for building web apps.

Re: Quiz freezing (seemingly randomly)

Postby Clifton » Tue Jun 21, 2016 9:52 am

Probably need to change to this if you want auto navigation in every case.
Delay 300 ms    --new logic; immediate navigation is probably causing the problem
If currentmastery >= mastery
Go to page "certificate"
Break out of action sequence --action dies here so nothing else impacts navigation
end if
go to next page --defaut behavior
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Tue Jun 21, 2016 10:09 am

Sorry ... should have read your logic first. Taking the automatic page shift works for me in another way as well ... I now get the feedback to show long enough to have students actually read it.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Tue Jun 21, 2016 5:31 pm

So I was going to experiment with some of these options (at the moment I have the logic to check if mastery has been reached on enterpage and am not sure if it would be best to put the delay in the question object code?) Of course, with over 170 pages I was hoping to play on a subset of the book and normally have been able to access the Livextension that allows you to add/delete pages from the Tools menu. Today, it no longer seems to go anywhere. You aware of sumtotalsystems removing this from their website?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Clifton » Tue Jun 21, 2016 11:52 pm

You don't need any special tools to trim your book for running debug experiments on your action code.
Open a command window (shift + F3):
  1. Move your certificate page to be the page number of the new last page of your book.
  2. Delete all of the pages that follow the certificate page.
  3. Here is the script to enter into the command window to accomplish the above.
    (NOTE: this script example assumes your certificate page is going to be page 10. Modify it to suit your purpose.)
      pageNumber of page "certificate" = 10   --enter whatever page number you want last page to be
      go to page "certificate"
      while (last page of this book <> page "certificate")
      get deleteObject(last page of this book) --keep removing pages until certificate is the last page
      end while

RESULT: Your book is now only 10 pages long and the certificate page is still the last page.
Of course, if you need to remove other pages, then rebuild the logic a bit or add to the script as needed.

I generally keep a library of command window snippets like this to quickly modify books at author level. The command window is a powerful tool that saves a lot of authoring time! My library of snippets is simply a txt file that I can cut and paste from as needed.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Wed Jun 22, 2016 9:43 am

Brilliant! Thanks.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Wed Jun 22, 2016 1:40 pm

Well ... I have a reduced book of 30 pages that randomly selects 20. My page actions are as follows:

--------------------------------------------------------------------------------
Actions for Definable Multiple Choice Question "Definable Multiple Choice" of Page "internal"
--------------------------------------------------------------------------------

-- On question answered... -----------------------------------------------------
If score = "correct"
Set visible of Web Graphic "correct" of This Background to true
Set currentmastery to currentmastery + 1
Set needing to mastery - currentmastery
Set text of Field "need" of This Background to needing
Go to the next page
Else
Set visible of Web Graphic "incorrect" of This Background to true
Set currentmastery to 0
Set text of Field "need" of This Background to mastery
End if
Set enabled of Navigation Button "next" of This Background to true
Set enabled of Navigation Button "previous" of This Background to true
Delay 300 ms
If currentmastery >= mastery
Go to page "certificate"
Break out of action sequence
Go to the next page
End if


--------------------------------------------------------------------------------
Actions for Field "bob" of Page "internal"
--------------------------------------------------------------------------------

-- On unload page... -----------------------------------------------------------
Set visible of Self to false


-- On click... -----------------------------------------------------------------
Set visible of Self to false


--------------------------------------------------------------------------------
Actions for Rectangle id 0 of Page "internal"
--------------------------------------------------------------------------------

-- On click... -----------------------------------------------------------------
Set visible of Field "bob" to true



--------------------------------------------------------------------------------
Actions for Button "Exit" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On click... -----------------------------------------------------------------
Exit (LMS: Student cannot resume) (LMS: no automatic navigation)


--------------------------------------------------------------------------------
Actions for Navigation Button "next" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set enabled of Self to false


--------------------------------------------------------------------------------
Actions for Field "need" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set text of Self to needing


--------------------------------------------------------------------------------
Actions for Web Graphic "incorrect" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On click... -----------------------------------------------------------------
Set visible of Self to false


-- On unload page... -----------------------------------------------------------
Set visible of Self to false


--------------------------------------------------------------------------------
Actions for Web Graphic "correct" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On click... -----------------------------------------------------------------
Set visible of Self to false


-- On unload page... -----------------------------------------------------------
Set visible of Self to false


--------------------------------------------------------------------------------
Actions for Navigation Button "previous" of Background "wormdiagram"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set enabled of Self to false


Once exported and loaded to the server it progresses at a nice clip through the 20 questions (which I get correct ... watch the "magic number" count down from 20 to 0 with each correct answer ) and then when I get to mastery ... it still refuses to go to the certificate page. Hmmmm ?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Wed Jun 22, 2016 4:07 pm

Okay ... just cutting and pasting this here and I notice I forgot to remove the "go to next page" earlier in the script. Back to the drawing board.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Wed Jun 22, 2016 4:24 pm

Alas, only difference was having to click through manually (which I think I prefer anyways). Nope. For some reason once that master level (20 correct in a row) happens it doesn't seem to know to go to page certificate.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Quiz freezing (seemingly randomly)

Postby Clifton » Wed Jun 22, 2016 5:07 pm

If the logic fails, then no navigation will occur. I would add debug statements like this:
Display Alert: "currentmastery: " & curentmastery & crlf & "mastery: " & mastery
If currentmastery >= mastery
Display Alert: "Navigation approved for certificate."
Go to page "certificate"
Break out of action sequence
end if
go to next page

If the second alert prompt never appears, then your logic is failing!
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Quiz freezing (seemingly randomly)

Postby Robert Stevenson » Wed Jun 22, 2016 5:32 pm

No idea what debug statements are or where to add them. Sad. Strange thing is that it works before exporting.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

PreviousNext

Return to Web (DHTML) Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron