Forum archive 2000-2006

Jun Wang - Huge Font and Hardcopy problems Again?

Jun Wang - Huge Font and Hardcopy problems Again?

by Arnold Pizer -
Number of replies: 0
inactiveTopicHuge Font and Hardcopy problems Again? topic started 12/17/2004; 4:53:58 PM
last post 12/21/2004; 12:30:32 AM
userJun Wang - Huge Font and Hardcopy problems Again?  blueArrow
12/17/2004; 4:53:58 PM (reads: 1084, responses: 5)
Happy holiday, everybody!

After this semester was over, we upgraded our WeBWorK to version2.1 and I need some help in resolving the following two problems:

1). The png font got very large again. What is puzzling is that some are normal but some are hugh. We use dvipng1.0 and the Constants.pm is configured accordingly. I have a course at:

http://lrc.alasu.edu:81/webwork2/MAT137-Wang/
One can login with the usrname: student and passwd: student.

2). Generating hardcopy fails, giving error message:
Activity 'download_hardcopy_multiset' not found in %permissionLevels. Can't continue.
Following the instruction, I opened Hardcopy.pm but could not fixed correctly. Any suggestions so that I can finish it before Christmas will be appreciated.

Jun

<| Post or View Comments |>


userMichael Gage - Re: Huge Font and Hardcopy problems Again?  blueArrow
12/17/2004; 9:28:18 PM (reads: 1306, responses: 0)
(1)

The adjustment for font size is made in the file lib/WeBWorK/Constants There are two sets of options, one for dvipng versions <1 the other for versions greater than 1. Uncomment the one you need.

After you reset this you need to clear the equation cache. The location is specified in global.conf:

 

# Location of cached equation images.
$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";

The old images (generated before you updated) are the correct size and the new ones are not.

(2) You probably have not updated your global.conf file. (Compare it to the global.conf.dist file which was downloaded when you upgraded.) You will find some extra permission level tags in %permissionLevels in the new global.conf.dist file. (Search for download_hardcopy_multiset.)

You always need to check global.conf by hand against global.conf.dist when you upgrade. (Some editors have nice diff functions that make this comparison easier.) In general you should not have to upgrade Constants.pm. We don't change it very often. It's used for a few variables that have to be specified when the server starts up, before global.conf is read.

Enjoy the holidays.

Mike

<| Post or View Comments |>


userJun Wang - Re: Huge Font and Hardcopy problems Again?  blueArrow
12/19/2004; 10:33:50 PM (reads: 1285, responses: 0)
Hi, Mike,

2) The hardcopy problem was solved. It was that we downloaded webwork-2.1.tar.bz2 from SourceForge when upgrading. In this tarball the global.conf.dist was the version generated on Oct. 22 and does not contain the extra permission level tags. I went to the CVS and got the newest version and it worked. I also had to put a symbolic link tmp to html/tmp in the course directory, as Zig suggested for the WeBWorK2.0.

1) The hugh font problem has not been resolved. I manually deleted the images and used "remove_stale_images --remove --days=0" as well, it did not work. Sometimes in one single problem, there were both normal fonts and hugh fonts. It seems like that the system is not reading Constants.pm and is randomly assigning the size. When I renamed Constants.pm to something else, it still acted the same way. What else could be wrong with our installation.

Jun

<| Post or View Comments |>


userMichael Gage - Re: Huge Font and Hardcopy problems Again?  blueArrow
12/19/2004; 11:27:05 PM (reads: 1285, responses: 0)
We recently had a strange case here, where the permissions on the CourseManagement directory were bad and the server couldn't read the file. For some reason we didn't get error messages about not being able to read the file, but other things went wrong later. (The lack of error messages is probably due to the fact that we are automatically loading some of these files as they are needed -- it's part of what is making the configuration of the files a bit simpler. We're looking into that problem. ) In any case you might check the file path to the Constants.pm file and make sure that the server can read it.

(When using CVS it's a good idea to set your mask to 002. If you have it set at 033 then files that the CVS want to group executable will be come 744 instead. )

Try putting an obvious error in Constants.pm e.g.

=123;

If that causes an error then your file is surely being read.

Take care,

Mike

<| Post or View Comments |>


userJohn Jones - Re: Huge Font and Hardcopy problems Again?  blueArrow
12/20/2004; 1:08:22 PM (reads: 1264, responses: 0)
Hi,

I also think the oversized images are caused by having the wrong settings in Constants.pm. They look like you are using the dvipng flags for version >= 1.0, but you really have dvipng version < 1.0.

After you change settings in Constants.pm, you need to restart the web server (on port 81). Otherwise, you are likely to get the random behavior in image creation. A given child httpd process won't reread Constants.pm, so you can have some processes with the old version and some with the new version. Depending on which handles your request, you get different behaviors.

You will also need to wipe out all old images again or you just keep seeing the older ones. Do it by hand, and then check to see that they are all gone.

John

<| Post or View Comments |>


userJun Wang - Re: Huge Font and Hardcopy problems Again?  blueArrow
12/21/2004; 12:30:32 AM (reads: 1261, responses: 0)
Hi, Mike and John!

Now that the problem seems to be fixed!!! The server did not reread the Constants.pm. We are using dvipng1.1 and I guess that, when upgrading, I did not change the dvipng flags until I created a course. Never thought to restart the server. Thank you for the help and now that I can start my holidays tomorrow. Happy holidays! You guys have just made mine!

Jun

<| Post or View Comments |>