WeBWorK Main Forum

Getting access to contrib library for problem browser

Getting access to contrib library for problem browser

by Mike May -
Number of replies: 3
I want to have access to the contrib section of the library form the library browser.
Background: I would like to build a suite of problems for a local course. Eventually I plan to add it to the main library but that is a way down the road after lots of testing. Putting the problems in the contrib section of the library would let me get them for homework sets and move them easily from course to course till we get there.
My tech person says that is not possible.
Is he correct?]If not can someone give a clear reference?

Mike May

In reply to Mike May

Re: Getting access to contrib library for problem browser

by Michael Gage -
These changes need to be done by someone with command line access to the site.

You need to make a change in localOverrides.conf
to add the button. or add it to course.conf

You need to add a link from the mycourse/templates/ directory to the
webwork-open-problem-library/Contrib directory.

The button will not appear until the link is created in the templates directory so even if the button is enabled in localOverrides.conf only courses where the "Contrib" link has been created will see the Contrib button on their pages.

The full instructions are here:
http://webwork.maa.org/wiki/Installation_Manual_for_2.13_on_Ubuntu_18.04

If you want to be able to write to the Contrib directory you will need to give the browser permission to write to the Contrib directory. (Pretty safe if you are the only one using it.)


In reply to Mike May

Re: Getting access to contrib library for problem browser

by Arnold Pizer -
See http://webwork.maa.org/wiki/Installation_Manual_for_2.13_on_Ubuntu_18.04#Set_up_the_access_to_the_Contrib_directory

In reply to Mike May

Re: Getting access to contrib library for problem browser

by Danny Glin -
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.