using sagecell within webwork (problem with tos acceptance)

68 views
Skip to first unread message

Marc BUFFAT

unread,
Jan 9, 2014, 5:54:10 AM1/9/14
to sage-s...@googlegroups.com
Hello
I have a working webwork 2.8 and a sagecell server in my departement, and want to use sagecell within a webwork problem.
The problem is related to the acceptance of TOS that the cellserver requires.
This not a problem when using the sagecell server interactively, but using sagecell within a program (as webwork)
is not easy when it requires the acceptance of the TOS.
Is it possible to disable the requirement of acceptance of the TOS in my sagecell server ?
I have try to set
accepted_tos = true (instead of false)
in the file sagecell/static/embedded_sagecell.js, but it does not work
Any hints,
thanks
Marc

Jason Grout

unread,
Jan 9, 2014, 9:51:31 AM1/9/14
to sage-s...@googlegroups.com
On 1/9/14, 5:54 AM, Marc BUFFAT wrote:
> Hello
> I have a working webwork 2.8 and a sagecell server in my departement,
> and want to use sagecell within a webwork problem.
> The problem is related to the acceptance of TOS that the cellserver
> requires.
> This not a problem when using the sagecell server interactively, but
> using sagecell within a program (as webwork)
> is not easy when it requires the acceptance of the TOS.

The webwork macro has a parameter to indicate acceptance of the TOS.
Basically, you just pass a form field with key accepted_tos and value
true along with your code. Here's the code:
https://github.com/openwebwork/pg/blob/master/lib/WeBWorK/PG/IO.pm#L228



> Is it possible to disable the requirement of acceptance of the TOS in my
> sagecell server ?

Certainly. Just change this line in your config:

https://github.com/jasongrout/sagecell/blob/master/config_default.py#L16

to

requires_tos = False

Thanks,

Jason


kcrisman

unread,
Jan 9, 2014, 10:54:25 AM1/9/14
to sage-s...@googlegroups.com, Jason Aubrey, Michael Gage, John Travis
Maybe this should be in a prominent place in the sagecell doc?  I love that someone is really using this, though - thanks to you, John Travis, Jason Aubrey, Mike Gage, and others for this functionality!

Jason Aubrey

unread,
Jan 10, 2014, 11:56:54 AM1/10/14
to sage-s...@googlegroups.com, Jason Aubrey, Michael Gage, John Travis
For reference, here is the corresponding discussion on the webwork forums:

http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3204

Jason A.
Reply all
Reply to author
Forward
0 new messages