Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1
  • 2

TOPIC:

Intermittent Variable Failure 6 months 2 weeks ago #9031

  • tas509
  • tas509's Avatar Topic Author
  • User
  • User
Hello all,
I'm a novice Xerte user and wanted to do this with a colleague.

I want to create a Gap Test object that asks for the user's email and displays it on the results page. (Just FYI, I've written some javascript that saves the results to a Google Sheet automatically, but if it doesn't know who has completed the test, I'm lost).

So I created an email variable, and added...

 Enter your email [=email] 

...to my Gap Test's Introductory text, and it displayed fine. Then, after a while, say a few edit/play/publish iterations... it stopped displaying as a text formitem, and just displays the code.

Later I changed the variable name and the code to [=emailaddress] and it worked again. Once! And it is now just displaying the code again, no form item.

I have tried deleting the xerte cookie (no change) and logging out doesn't actually work (Mac, Chrome latest).

Does anybody have any ideas why this is happening and have any fixes please? Or is there any other ways to grab a meaningful user id?

Thanks
Tom

Please Inloggen or Create an account to join the conversation.

Intermittent Variable Failure 6 months 2 weeks ago #9035

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
Hello
Is it possible for you to share a link to the project so I can try to work out what is going on please?
Thanks
Fay

Please Inloggen or Create an account to join the conversation.

Intermittent Variable Failure 6 months 2 weeks ago #9036

  • tas509
  • tas509's Avatar Topic Author
  • User
  • User
!!!!! As a new user your posts can not contain external URLs. Please include text only for your posts.!!!!
Bloody hell...
https // xerte york ac uk/play php?template_id=4700
Will that work? Thanks... I didn't know how to share either.
Tom

Please Inloggen or Create an account to join the conversation.

Intermittent Variable Failure 6 months 2 weeks ago #9038

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
It looks like this will only work if a value of some type has been set for the variable that you would like the user to enter. If you edit your variable data and type something into the default value field of the emailaddress variable, you should find that it starts to work again.

Please Inloggen or Create an account to join the conversation.

Intermittent Variable Failure 6 months 2 weeks ago #9041

  • tas509
  • tas509's Avatar Topic Author
  • User
  • User
I just gave it a default value of @york.ac.uk and it worked. THANK YOU!!!! Very much... this has been driving me nuts... :-)

...er, but that is a really odd thing to have to do, in that it's really non-standard (like I'll have to check in the backend if the value is more than @york.ac.uk, and I can't set it to required or anything... Ideally, imo, I should be able to set this variable (as a form item) to be required... (maybe I could add a script to the GapTest that fiddled with that form item).

Please Inloggen or Create an account to join the conversation.

Intermittent Variable Failure 6 months 2 weeks ago #9042

  • tas509
  • tas509's Avatar Topic Author
  • User
  • User
Apologies to go on...
My project is now (I think) gathering emails, but I'm pretty sure that previously I could display that email value on the (Full) results page, but it doesn't. Am I mis-remembering? Is there another way to get a uniqueID for a user? I'd also planned to grab a variable called lessonID too by creating a variable with a fixed value (sort of programming_101).

I ideally would like a Full Results page (the data of which I will scrape with jQuery and pass to Google Sheets) but it needs a unique userEmail and lessonId so that the various tests can be matched to the individual taking it and the respective GapTest. Am I labouring under a false goal, or is this possible... (I've got the scraping of the full results working btw I just need the two IDs ... I'd be happy to use a fixed Xerte if those are surfacable (I could grab the id of the lesson from the URL) but the userID is difficult...

Thanks again.

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ronmjultenJohnSmith
Time to create page: 0.049 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search