WeBWorK Main Forum

Guest login from a different web page?

Guest login from a different web page?

by Noah Dear -
Number of replies: 2
I'm a novice (at best) when it comes to html and I was hoping someone could help me out. I have a WebWork shell with practice students so that the guest login is enabled and I'm trying to do the following:
1) Embed a link on an external webpage that will take you directly into WebWork course as a guest, while skipping the login page that you normally find. 
2) Depending on the external link, have it log you in to one of a specific set of practice students.

The idea is this: I have on my webpage a section called "Place Values" and a separate section called "Adding Signed Numbers." Under "Place Values" I have links to online videos, printable worksheets and a link to online practice. Under "Adding Signed Numbers" I have separate links to appropriate videos, worksheets and online practice.
I could set up a separate shell for each of these online practice links, but it seems that a more elegant solution would be to have a single shell with assignments that only show up for certain practice students. 

Here is a link to the specific webpage I'm beginning to work on:
http://pccalc.weebly.com/skills-practice.html

You'll find, once you open the javascript boxes, a couple places with links to a single webwork course I have set up. Hopefully that clarifies a bit better what I'm trying to do.

Thanks so much for anyone's help!
In reply to Noah Dear

Re: Guest login from a different web page?

by Michael Gage -
You need a url of the following kind:

https://hosted2.webwork.rochester.edu/webwork2/2014_HKUST_demo/Demo/?login_practice_user=true

The part after the question mark logs the student into the next available guest account (practice1, etc.,   )   

The nodes after webwork2 tell you which course and which set to log into.  You can also add a node to indicate the problem in the set e. g. 
..... Demo/2/? .... 


You can't choose which practice student you will get -- you'll get the next available practice account.   You can however direct the url to a particular set with the problems you want looked at.  

Hope this helps. 
In reply to Michael Gage

Re: Guest login from a different web page?

by Noah Dear -
Thanks so much! It took me a second to put it all together but I got it to work!

I don't know if there is a simpler code, but here's what I have in case someone else wants to look at it:

<form 
method="post" 
action="http://webwork.pcc.edu/webwork2/MTHALC20-Dear-S14/U1L3Division/?login_practice_user=true" 
enctype="http://webwork.pcc.edu/application/x-www-form-urlencoded" 
id="login_form" 
target="_blank">
<input name="login_practice_user" type="submit" value="Online Practice" /></form>