Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 2:03 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: page bookmark into cookie for html5
PostPosted: March 16th, 2020, 1:35 pm 
Offline

Joined: December 1st, 2016, 5:33 pm
Posts: 14
Hi.
Trying to set the page title as a bookmark for a HTML5 pub which is a very big quiz. I can set a cookie as per video tutorial Mack did with txt, can create a cookie with the Q_score values. But I cannot get the page title into a cookie. Have tried system Pub Page Title, tried to send that variable to another variable, tried a script with Master page using myVaribale = this.GetPage() but with no success. I am obviously missing something particular with the page title variable.

Any help would be appreicated as always.

thanks
Stuart


Top
 Profile  
 
 Post subject: Re: page bookmark into cookie for html5
PostPosted: March 17th, 2020, 3:01 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Calling the following from a script on the page will get the name:

Quote:
myPageName = this.GetName();

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Gillawa


Top
 Profile Visit website  
 
 Post subject: Re: page bookmark into cookie for html5
PostPosted: March 18th, 2020, 12:26 am 
Offline

Joined: December 1st, 2016, 5:33 pm
Posts: 14
Hi Mack. Ended up with something similar with a frame and GetParent(). GetName() which worked. Yours is a bit more elegant of course. I have the page bookmarked and the score set into cookies and brought back into the publication with the course going to the page that was bookmarked in the stored cookie. BTW, I did find through some rather painful long way round that pages can't have numbers, so instead of page1 I used page_one which sorted out the bringing back the cookie. I also found that using the script to bring back the name of the page it included the S that Opus puts into the cookie but using an action it didn't.

I have one problem left with the score. The score cookie is brought back and loaded into Q_SCORE_VALUE and shows in the course. But as soon as I resume the questions the Q_SCORE_VALUE resets to zero which is a pain. I'm thinking I have to create a manual get question score value as the system one resets as you try and resume where you left off. If there is a way around this I would love to know.

thanks again


Top
 Profile  
 
 Post subject: Re: page bookmark into cookie for html5
PostPosted: March 18th, 2020, 7:50 am 
Offline

Joined: December 1st, 2016, 5:33 pm
Posts: 14
It seems that a question value that is in the .js needs to be set, but I have no idea which one. Setting Q_SCORE_VALUE is easy but need to set the question to a state that will allow resumption of the course with the score returned from the cookie.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group