Installation

Two questions about the libraries

Two questions about the libraries

by Justin Brody -
Number of replies: 8
Hello,

A colleague installed webwork (2.7) on a department server but I'll be administering it. Everything mostly seems fine so far but I have a couple of questions from the problem libraries:
  1. Some problems seem to be missing? When I go to Calculus (single var)-->Differentiation-->Conceptual understanding of derivatives, it says there are 70 relevant problems but I only see 15.
  2. There seems to be an issue with paths for the images. When I click on an image placeholder I get:
    The requested URL /wwtmp/admin//gif/admin-1234-setUndefined_Setprob12image1.png was not found on this server.

    The file is in /var/www/wwtmp/admin/gif. Is the problem the extra '/' or is it literally looking in the wrong place? Any thoughts on a fix?

Thanks for any help!

In reply to Justin Brody

Re: Two questions about the libraries

by John Jones -
The answer to the first question is simple.  Some problems now show an "M" in the line of icons (towards the right).  This is short for "More like this".  Some problems which are sufficiently similar have been bundled with just one showing by default.  There are 70 problems, but only 15 different types. 

If you hover over the M, it will tell you how many problems are hidden.  If you click on the M, you get those problems.  The M also turns into an L (for Less like this), and you can click on the L to hide those problems again.  If you click on all of the M's on that page, you end up with 70 problems.

For the second question, I just clicked on several images in the library browser and they all came up.  Maybe it is something about a specific problem?  (You can click on the ... after Path to see the problem path to report which problem gave you the image error.)

John
In reply to John Jones

Re: Two questions about the libraries

by Justin Brody -
Thanks John! I see the extra problems now :)

I'm starting to think the image issue is with our server configuration -- I'll post again if I find I'm mistaken.

Thanks again!
In reply to Justin Brody

Re: Two questions about the libraries

by Justin Brody -
Looks like we had a mismatch between the directory structure webwork expected and the structure our Apache server was using. All cleared up now!
In reply to John Jones

Re: Two questions about the libraries

by Louis Zulli -
While attempting to view these 70 problems, I getting the following:

findAppletCodebase Error: DerivativeDraw11.swf not found after searching http://shrike.local/webwork2_files/applets, http://shrike.local/webwork2_files/applets/geogebra_stable, http://shrike.local/webwork2_course_files/Test/applets, http://shrike.local/webwork2_files/applets/Xgraph, http://shrike.local/webwork2_files/applets/PointGraph, http://shrike.local/webwork2_files/applets/Xgraph, http://shrike.local/webwork2_files/applets/liveJar, http://shrike.local/webwork2_files/applets/Image_and_Cursor_All at [PG]/lib/PGalias.pm line 946

Clearly "webwork2_files" is not being expanded to "webwork2/htdocs". But in site.conf.dist I see:

#################################################################################
# These variables describe the locations of various components of WeBWorK on your
# server.  You may use the defaults unless you have things in different places.
#################################################################################

# Root directory of PG.
$pg_dir              = "/opt/webwork/pg";

# URL and path to htdocs directory.
$webwork_htdocs_url  = "/webwork2_files";
$webwork_htdocs_dir  = "$webwork_dir/htdocs";

# URL and path to courses directory.
$webwork_courses_url = "/webwork2_course_files";
$webwork_courses_dir = "/opt/webwork/courses"; # a typical place to put course directories

So it seems I can't use the defaults after all? 

In reply to Louis Zulli

Re: Two questions about the libraries

by John Jones -
Defaults should work.

When OPL-update runs, it should create symlinks in webwork2/htdocs/applets for applets contained in OPL problems.  In particular, you should have webwork2/htdocs/applets/DerivativeDraw11.swf which would be found in that list of paths.

I suspect that you don't have that link.  If that is right, check the permissions for the htdocs/applets directory.  The person running OPL-update needs to have write permission to that directory.  Then rerun OPL-update, the links should appear, and the applets should work.

John

In reply to John Jones

Re: Two questions about the libraries

by Louis Zulli -
I have those symlinks in /opt/webwork/webwork2/htdocs/applets. For example:
lrwxr-xr-x   1 root  wheel   114 Jul 17 16:05 DerivativeDraw11.swf -> /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary/CSUOhio/htdocs/applets/DerivativeDraw11.swf
Is there an ownership issue? Here's what I have for the applets directory:
drwxr-xr-x  38 root  wheel   1.3K Jul 17 16:05 applets

Thanks




In reply to Louis Zulli

Re: Two questions about the libraries

by John Jones -
Those look ok.

Assuming your server is http://shrike.local so that

  http://shrike.local/webwork2 

brings up the webwork front page, then what does

  http://shrike.local/webwork2_files/applets/DerivativeDraw11.swf

bring up?  For me, I get the applet but it sounds like you will get an error.

John

In reply to Louis Zulli

Re: Two questions about the libraries

by Louis Zulli -
OK, the issue was caused by a hostname mismatch.

The output from hostname is Shrike.local, and apache2 used that for ServerName. I used localhost in site.conf. All was fine after I edited that to

$server_root_url   = 'http://Shrike.local'; 

To my browsers, http://Shrike.local is equivalent to http://localhost (and to http://127.0.0.1/).