## WeBWorK Main Forum

by Stefania Tracogna -
Number of replies: 9
We just updated to the head version of webwork a couple of days ago.
We also updated the NPL.

While testing this new version we noticed three problems:

1. When trying to create a proctored gateway/quiz we get the following error message:

Error adding set-level proctor: argument 1 contains invalid characters in 'user_id' field: 'set_id:Section_2.4' (valid
characters are [-a-zA-Z0-9_.]) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm line
1248 at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm line 1248

2. When browsing the Library, in all the pages that contain problems with Interactive Graphics (LiveGraphics3D.pl) we
get the following webwork warning (examples are in Calculus/Vector Calculus/ Surface Integrals)

WEBWORK WARNINGS

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely
caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If
you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult

Warning messages

* Use of uninitialized value $permissionLevel in numeric ge (>=) at line 1057 of (eval 3586) * Use of uninitialized value$permissionLevel in numeric ge (>=) at line 1057 of (eval 3808)

* Use of uninitialized value $permissionLevel in numeric ge (>=) at line 1057 of (eval 4026) * Use of uninitialized value$permissionLevel in numeric ge (>=) at line 1057 of (eval 4243)

3. The pictures do not show in any of the problems that make use of LiveGraphics3D.pl. However, if we use LiveGraphics3D.pl
from macros/Union rather than /pg/macros, then we are able to see the pictures.

Any help would be appreciated.

Stefania Tracogna

### Re: problems with head version

by Gavin LaRose -
Hi Stefania,

I've updated DB.pm in HEAD to resolve the first of these errors. There might be a slightly better fix down the road, but this should address the problem for now.

I haven't looked at the second error.

Gavin

### Re: problems with head version

by Stefania Tracogna -
Hi Gavin,
The first problem is now fixed.
Thank you!!

Stefania

### Re: problems with head version

The LiveGraphics3D.pl problem has a work around if not a quick fix. The chances are good that WeBWorK is unable to find the file "live.jar". You can verify this by looking at the HTML source of one of the problems where you will see an error reported by the subroutine "findAppletCodebase".

The easiest fix for now is to replace this line in LiveGraphics3D.pl

#codebase => findAppletCodebase("live.jar"),
codebase => "https://hosted2.webwork.rochester.edu/webwork2_files/applets/$You will probably want to use your local host instead of hosted2.webwork.rochester.edu and make sure that live.jar is located in the directory ..../webwork2/htdocs/applets/ The method of automatically finding an applet by searching a number of locations works on some sites, but clearly needs more work in order to make it robust. -- Mike In reply to Admin User ### Re: problems with head version by Admin User - I've just made some modifications to PGalias.pm which may correct the problem with findAppletCodebase You might want to download the latest version of PGalias.pm and see if that fixes the problem. If not the workaround is still to avoid "findAppletCodebase" altogether and specify the direct path to the applet. -- it works just fine but it's just not very portable from one site to the next without reconfiguring. In reply to Admin User ### Re: problems with head version by Stefania Tracogna - Mike, both your suggestions work. Thank you. The webwork warnings listed in my original posting are still present. I just noticed though that they are only present in NPL/Calculus/Vector Calculus/ Surface Integrals. There are other Sections that contain livegraphics3d which do not give any warnings. Actually, if I do the section Surface Integrals 5 problems at the time, I get a warning in the second page, which does not contain any live3d. The number of warnings matches the number of problems with Hints so I am guessing the two are related. Stefania In reply to Stefania Tracogna ### Re: problems with head version by Michael Gage - They are related -- the error is being reported from the subroutine "hint" defined in PGbasicmacros.pl . For some reason it is unable to find the variable$main::permissionLevel. I can't reproduce the problem on my setups here -- so it's hard to decide where the break is in your setup. You should be able to put

TEXT("permissionLevel is $permissionLevel"); in a problem and get the answer "permissionLevel is 10" (for instructors) when you view the code.$main::permissionLevel should also work.

You can also replace the definition of $permissionLevel at the top of sub hint {.... by my$permissionLevel = $envir->{permissionLevel}; replacing the PG_restricted_eval method. It's a change of style that is slowly being made throughout the PG code that will hopefully make it a bit more robust and it might fix the problem in your case -- or at least give more information. -- Mike In reply to Michael Gage ### Re: problems with head version by Stefania Tracogna - Hi Mike, I added one of the problems to a hw set. When looking at the whole hw set through Instructor Tools or Hmwk Sets Editor, the warning is still present: Use of uninitialized value$permissionLevel in numeric ge (>=) at line 1058 of (eval 4225)

but the problem seems to work fine when I "Try it" .

When I try the problem through Homework Sets it does not show any warning and it works fine.
I added the line TEXT("permissionLevel is $permissionLevel") and it prints "permissionLevel is 15", which is what it should be since my permission level for admin is 15. Then, as you suggested, in PGbasicmacros.pl, I replaced the line my$permissionLevel = PG_restricted_eval(q! ....);

with the line

my $permissionLevel =$envir->{permissionLevel};

in sub hint ,
but that did not change anything: the warning is still present, but everything else works fine.

Stefania

### Re: problems with head version

by Michael Gage -
Thanks, Stefania. This is useful information. It appears there is a bug in setting up the environment when listing problems in the Homework sets editor (and probably the library browser as well). I'll put this on the list but may not get to this immediately. I'm relieved that it seems to work properly when actually being used to deliver homework questions to students.

-- Mike