WeBWorK Problems

lot of problems in the NPL just dont display or produce errors..

lot of problems in the NPL just dont display or produce errors..

by Jason Appah -
Number of replies: 2
Library/Dartmouth/setStewartCh13S2/problem_3.pg

if I drill down into the problem by saying editit... this error ensues

File '[TMPL]/Library/Dartmouth/setStewartCh13S2/problem_3.pg' exists. File not saved. No changes have been made. You can change the file path for this problem manually from the 'Hmwk Sets Editor' page

The file '[TMPL]/Library/Dartmouth/setStewartCh13S2/problem_3.pg' is protected!
To edit this text you must make a copy of this file using the 'make local editable copy at ...' action below.

if I tryit

this error ensues:

Can't locate macro file |Dartmouthmacros.pl| via path: |.|, |/opt/webwork/courses/modelCourse/templates/macros|, |/opt/webwork/pg/macros| at line 274 of (eval 236) Died within main::loadMacros called at line 26 of [TMPL]/Library/Dartmouth/setStewartCh13S2/problem_1.pg


what permissions have i screwed up?

In reply to Jason Appah

Re: lot of problems in the NPL just dont display or produce errors..

by Arnold Pizer -
Hi Jason,

There are two separate issues here. (1) is that WeBWorK can't find Dartmouthmacros.pl and (2) the permission issue.

(1) Quite a few of the problem collections under the National Problem Library (NPL) require their own special macros. If want to enable all of them, edit the file /opt/webwork/webwork2/global.conf and change the section
$pg{directories}{macrosPath}
so that it reads like this:

$pg{directories}{macrosPath} = [
".", # search the problem file's directory
$courseDirs{macros},
$pg{directories}{macros},
'/opt/webwork/libraries/NationalProblemLibrary/macros/Union',
'/opt/webwork/libraries/NationalProblemLibrary/macros/Dartmouth',
'/opt/webwork/libraries/NationalProblemLibrary/macros/Michigan',
'/opt/webwork/libraries/NationalProblemLibrary/macros/CollegeOfIdaho',
];

You should have the first three or four locations listed already. We should probably put all of these in the default distribution now that these collections are under the National Problem Library.

(2) You haven't screwed up any permissions. The NPL is a shared resource on your server and (normally) you do not want to give professors permission to edit problems in the library. Rather if a professor wants to edit a particular problem, once they hit "Edit this problem" select e.g. "Create a copy at [TMPL]/local/..." where I suggest you add "local/" at the beginning of that suggested path. That way you will be able to easily find all the problems you edited for your course (they will be under the local directory and the path under that will tell you where the original problem was in the NPL). Assuming you leave checked "and use in set ..." then this copy is the problem that the set will use and you will have permission to edit it.

If the problem is buggy you can use the link at the top of the page to report the bug (and hopefully also the correction).

Arnie
In reply to Arnold Pizer

Re: lot of problems in the NPL just dont display or produce errors..

by Jason Appah -
Thank you so much, that really did the trick! and the explanation makes sense as you really dont want instructors modifing the problem library... that works! and thank you for the response!