WeBWorK Main Forum

Getting access to contrib library for problem browser

Re: Getting access to contrib library for problem browser

by Danny Glin -
Number of replies: 0
How you should approach this depends on what behaviour you would like. Mike's instructions will work and allow you to write to a section of the contrib folder. You will be able to navigate the collection of problems by folder, but they won't show up in the Subject/Chapter/Section search. If you want this to happen it will require some changes to your WeBWorK code, since it is only set up to index problems in the OPL.

As an alternative to working in Contrib, you can create your own folder shared between multiple courses. Here's how I do this:
  1. Create a folder somewhere on your server; e.g. /opt/webwork/libraries/MyWorkingFiles
    Make sure this folder is writeable by your apache server so you can make changes to files in this folder.
  2. In the courses that should have access to this folder, create a symlink in the templates directory:
    cd /opt/webwork/courses/[coursename]/templates
    ln -s /opt/webwork/libraries/MyWorkingFiles .
  3. (Optional) If you want a button for your directory in the Library Browser, find the $courseFiles{problibs} hash in localOverrides.conf, and add the line:
    MyWorkingFiles => "My Working Files for Course X",
  4. Add the following line to your localOverrides.conf so that you can access this shared directory from the file manager:
    $webworkDirs{valid_symlinks} = ["/opt/webwork/libraries/MyWorkingFiles"];
I have several of these on my server. For example an instructor who teaches multiple courses has a folder for his problems, where he can make changes in one course and it is automatically propagated to his other courses. Another use case we have is where we have similar courses that share a problem bank that is not ready to be shared beyond those courses.