Forums

Search results: 163

Forum archive 2000-2006 -> Lars Jensen - View another seed?

by Arnold Pizer -
inactiveTopicView another seed? topic started 9/1/2004; 1:27:24 PM
last post 9/20/2004; 11:41:21 AM
userLars Jensen - View another seed?  blueArrow
9/1/2004; 1:27:24 PM (reads: 1205, responses: 2)
Hi,

How do I view another seed of a problem. When clicking "Try It" from the Library browser, there's no option to change the seed, and when clicking "Edit It" i see the option, but nothing happens when I change the seed and click "Refresh." What am I missing?

Thanks, Lars.

<| Post or View Comments |>


userJohn Jones - Re: View another seed?  blueArrow
9/1/2004; 3:32:55 PM (reads: 1534, responses: 0)
Hi Lars,

In the library browser itself, there is a browser to rerandomize the displayed problems. Admittedly, you get new versions of multiple problems instead of just the one you want, but this is why the button is there. Each click gives a new seed.

The Edit It link should do the trick, unless you don't have permission to write in the directory with the problem. Then refresh is stopped. I know that this is a common situation when looking through libraries of problems, so the rerandomize button may be the best way to go.

John

<| Post or View Comments |>


userLars Jensen - Re: View another seed?  blueArrow
9/20/2004; 11:41:21 AM (reads: 1456, responses: 0)
Hi John,

Thanks for the answer.

But there's a problem: when I click "Try It" on one of the re-rendomized versions, I don't get to try the re-randomized version. Instead, I only get to try the original version.

Lars.

<| Post or View Comments |>

inactiveTopicA Day In The Life Of A Webwork2 Professor topic started 7/19/2004; 3:48:09 PM
last post 7/19/2004; 3:48:09 PM
userMichael Gage - A Day In The Life Of A Webwork2 Professor  blueArrow
7/19/2004; 3:48:09 PM (reads: 3207, responses: 0)

A Day In The Life Of A Webwork2 Professor

 

 

Informal instructions for using WeBWorK

See Instructions for WeBWorK1.9 if using an older version of WeBWorK

Quick Overview

This document gives details on how one professor actually uses WeBWorK. By clicking on the question mark image: question_mark.png in the upper left part of the page, there may be a help page specific to the current page you're viewing. Also the online discussion group at http://webhost.math.rochester.edu/webworkdocs/discuss/ is a good place to go for help.

 

Adding Students

  • Adding Many Students at Once

    When the course has first been created easiest way to do this is to obtain a spreadsheet of your student's information and then edit it so it matches the ClassList specification . Be sure to give the file a ".lst" extension, otherwise WeBWorK won't recognize it as a class list. Once the file is ready, go to the File Transfer Page to upload it. If you are a professor there should always be a link to the File Transfer Page in the left hand column of the webpage. Hit the "Browse" button in the classlist part of the page and locate the file, highlight it and then hit the OK button. If you want the classlist to have a different name, or perhaps you didn't give it a ".lst" extension, you can type a new name for the file in the "Use name" blank and the same file will be saved to that name.

    Once the file is uploaded it needs to be "imported". This is done on the Class List Editor Page (there's a link to it in the left column). Check the "radio button" (the circular thing next to the options) next to the import option and select the file you just imported in the drop down menu. Make sure that it says "adding any new users". Then press the "Take Action" button to import it.

  • Adding a Few Students

    If there are only a few students in a class, or you need to add one student after the classlist was already imported, there is another feature which may be easier to use. If you click on "Class List Editor" in the lefthand column, on that page there is an "Add ___ student's" option. Check the radio button next to that option and fill in however many students you wish to add to the course and click on that hit "Take Action" to go to the "Add Users" page.

    Fill in the information for each student. The only required fields are the "Student ID" and the "Login Name", but the first and last name should probably be filled in, and if there is no email address, the student will not recieve emails. (Don't worry if you don't have the email address though, the student is able to enter or change this on his own) The "Section" and "Recitation" fields may be useful in very large classes since these options can be used to sort students in various parts of the course, such as scoring.

     

Creating a Problem Set

Perhaps the most important part of having a successful course is to create good problem sets. You want the problems to correctly reflect the topics that are discussed in class, and to be the appropriate difficulty level. Thus, creating a problem set is one of the most important steps in a maintaining a successful WeBWorK course. Creating problem sets can also be very time consuming, so be sure to give yourself plenty of time.

Very few WeBWorK professors write their own problems. Most subject material in courses that are well suited to WeBWork has already been covered by previous WeBWorK professors, and there is no need to reinvent the wheel. But if you are writing new problems see below "Writing New Problems or Editting Current Ones".

 

  • Selecting and Adding Problems to a Set

    First, go to the Library Browser Page (from the link in the lefthand column). Notice that the buttons and menus are divided into four layered sections, one on top of the other. The uppermost section is to choose which library to look at. Pick one of the libraries and then in the second section from the top choose one of the directories, or if it is set up so the menus are for subject and chapter make the according choices. There is an effort underway to make the problem libraries more accessable by subject and chapter, but even if the library is only organized by directory, the name of the directory is often enough to find the proper subject material.

    After making your choices from the menu(s) you can either change the display mode or the number of problems per page (more problems per page makes it longer to load the page) and then press the "View Problems" button. There should now be problems visible below all the tools.

    Before you start marking problems, make sure the set you wish to add problems to is displayed on the menu in the third section down. If you are creating a new set, type in the blank and press the "Create a New Set in This Course" button (There is no need to put the word "set" in front of the name, it is automatic on the new system) and then make sure this new set name is displayed in the menu next to the words "Adding Problems to Target Set:".

    You are then ready to go through the problems and mark the ones you want to add. When you press the "Update" button all the problems marked to add or to not display do so. The other buttons in the lowest section are fairly self explanatory. The "Rerandomize" button changes the problem seed for the problems, which is what determines what the variables are.

    Do not worry what order the problems are added in, or if you accidentally add a problem you didn't want, you'll get a chance to fix that later. You can change which problems you're viewing using the method described above, and add as many as you want to to a set.

  • Editing an Existing Problem Set

    To edit an existing problem set, go to the Instructor Tools Page and select the set in the lefthand menu, then click on the "Edit one set" button.

    The open date is when the problems will become available to those assigned them. Between the open date and the due date the problems answers will be recorded. After the due date no new answers will be recorded. The answers will become visible to students after the answer date. These three dates must be sequential.

    The set header file is what is displayed in the right hand column on the set's page. The system default is a good template as to what should be on that page. The easiest way to make your own for the set, is to click on the link on this page, or the one displayed when you view the set later (there will be a link entitled "edit" on the set header, visible to all professors).

    After changing these things press the "Save" button. In order for you to tranfer this problem set's data to another course or to your local machine it must be exported to a .def file. But don't export the file using the "Export Set" button until you are done editing the set. Once the set is exported it can be transfered from the File Transfer Page to your local machine. If having transfered them to your machine you wish to edit them there, or perhaps understand what they consist of, you can find out how the file is set up on the set definition file format page.

    Once all the dates have been saved, click on the "Edit the list of problems in this set" link. This page can also be accessed by going to the Hmwk Sets Editor page and clicking on the link in the "Problems" column of that problem set's row at the bottom of the page. If you want to view the problems, change the display mode from "None" to "images" or whichever you want, and press the "Refresh" button.

    The order of problems can be changed by changing the numbers in the menus in the upper left hand corner of each problem's box. To delete check the box, but if you accidentally delete one, you'll have to go back to the Library Browser Page and find it's original location to add it back again. The weight refers to how much the problem counts when scored, this is usually left at one unless there is a "practice" set at the begining of a course to get the students used to WeBWorK and then professors often set it to 0. Usually students are allowed an unlimited (write "unlim" in the box) amount of attempts at a problem, but sometimes if the problems are multiple choice a professor wants to limit how many times a student can try. (Students have a bad habit of guessing on multiple choice problems) When you wish to save changes made to the set, scroll down to the bottom of the page and press the "Save Problem Changes" button.

     

  • Adding Students to a Problem Set

    Go to the Hmwk Sets Editor page, in the table at the bottom of the page, click on the link in the "Assigned Users" column of the set's row. To assign the set to all users, press the button marked as such. To assign to some subset of users, check the ones to be assigned and press the "Save" button. Be careful not to uncheck anybody who's already started since all the date will be lost.

  • Making a Set Visible to Students

    The default for new sets is "invisible", this makes it so students can't see what you're working on. Once everything is ready for the students to see you want to make the sets "visible". To do this go to the Hmwk Sets Editor Page and click on the pencil next to the set's name and then check the "visible" checkbox and make sure you switch the option to "Save Changes" before you press the "Take Action" button.

 

Scoring a Problem Set

You can do scoring from the web. Go to the Scoring Tools Page. You can either score one set at a time, or get a total score for all the sets. To score one set select it and press the "Score Selected Set(s)" button. To score multiple sets, highlight them and press the button, this will create a "totals" file which combines the scores from all of the sets to give final scores, if the checkbox is checked, then the regular files for each individual set are created also. The scoring procedure creates files (in .csv format) that include the status of the problems, the number of attempts, and also the final score of the problems.

You can download these different files onto your personal computer clicking on the file names on this page, or from the File Transfer Page.,

You should realize that scoring a problem set is like writing grades into your grading book, once the grades are entered they are fixed unless you change them. Whatever a student does after a set has been scored, does not effect the scoring files.

There is no standard procedure of when to do scoring. You may have a few options.

  • You can score each problem set right after the problem set is due. This way, you can email your students their homework grades throughout the semester. The trouble with this is that if you gave a student an extension but scored the set before the student completed the set, anything the student did after you scored the set would not be recorded. Once the student has completed the set, you would have to edit the scoring files accordingly by hand.

     

  • You can score all of the problem sets at the end of the semester. This way, there are no problems with extensions and no major editing needs to be done. The drawback is that you wouldn't be able to send emails to your students.

  • The final option is a combination of the other options above. You can score each problem set right after the problem set is due, email your students if you want, and then score once more at the end of the semester. Scoring a set just appends the scores to the totals file so if you score a set twice, it will appear twice in the totals file. Thus, if you do this, you would have to use the totals file accordingly.

     

It should be noted that the first time a scoring file is created, student names, sections, and recitations will be taken from the current classlist information. If you score a set after that, the new information is appended to that scoring file by matching student ID's. If you change a student's recitation (or name, etc) but keep their student ID, the new recitation will not be written in that scoring file. If students add or drop the course, this will be handled automatically.

Also, it's easy to use e.g. excel to add exam grades to the scoring file.

See Grading problem sets for more information on scoring.

 

Sending Email to Students

Sometimes, after you score problem sets, you may want to send your students an email discussing thier scores. Other times you may want to send an email to students with general announcements about your course. This can be accomplished on the Email Page, which allows you to send personalized emails. When sending mail from the email page, make sure all the fields which originally contain "FIXME" are changed. The email can be sent to all, or any subset of the students.

The personalized variables can be viewed by clicking on the "list of insertable macros" drop down menu. They are: $FN - first name, $LN - last name, $SID - student id number, $SECTION - student's section, $RECITATION - student's recitation, $STATUS - C, drop, withdrawl, audit, etc, $EMAIL - student's email address, $LOGIN - student's login name, $COL[3] - third column in merge file, $COL[-1] - last column in merge file.

Here is a copy of a typical email :

 

Dear $FN,

This email message should go to everyone in mth141 for whom I have
an email address.

 

NEW WEBWORK ASSIGNMENT:

A new WeBWorK assignment (assignment 8) covering the material from
this week's lectures is up on the WeBWorK system. It must be completed
by 2:00am Tuesday, November 5. Remember, assignment 7 must be completed
by 2:00am Tuesday, October 29.

YOUR RECENT SCORES:

 

Your score on WeBWorK assignment 5 was $COL[-3] points out of a
possible 15 points. Your score on WeBWorK assignment 6 was $COL[-1]
points out of a possible 10 points. Your score on Exam 2 was $COL[-2]
points out of a possible 100 points.

These scores should include any adjustments I have made. If there are
any errors in these scores, please see me.

Have an enjoyable weekend.

Professor Pizer

Now you can send a "personalized" email to your students by merging the above with the mth141_totals.csv file (the scoring file from assignment 5). Be sure to set the merge file in the drop down menu in the upper right hand corner.

Usually you want to be really careful, so you can first preview the email by selecting some student in the drop down menu and clicking on the "Preview" button. This allows you to read the email with all the variables filled in for that student.

To save your self future work, you may want to save one email to use as a template for other emails. You can save as many as you want, but the one you save as default is the one that appears when you first go to the screen so that should be the template you use most often.

 

 

Viewing Student(s) Progress

The student's progress can be viewed by going to the Student Progress Page, a link to which is in the left hand column. You can eith view the statistics on one set for all users, or all sets for one user. This is a good place to find out how an individual student is doing in the course, or to find out how the class as a whole is doing on a particular set.

The "ind" column is a statistical "success" indicator for the problem set, calculated as: ((totalNumOfCorrectProblems / totalNumOfProblems)^2)/ AvgNumOfAttemptsPerProblem) which is a fairly good indicator of how well the students are grasping the concepts.

 

Acting as a Student

Often when a student is having trouble with a particular problem it is helpful to see thier version of the problem. You can do this by going to the Instructor Tools Page and selecting the student and the set and click the "Act as one user on one set" button. You can enter answers into the student's problem, they will not be recorded. Once you are done "acting" as that student, be sure to click on the "Stop Acting" link in the upper left hand corner of the screen.

Changing Set Data For an Individual Student

There are many times when you need to give a student an extension on a problem set, or change their score on a problem, or change the variables of a problem for a particular student. You can accomplish this by going to the Instructor Tools Page and selecting the student and the set, and then pressing the "Edit one set for one user" button. To give an extension, click on override, and change the due date and answer date. If you want to give a student different variables than they currently have, click on the "Edit list of problems in this set for studentname" link at the bottom of this page. Changing the "problem seed" for a particular problem gives it different variables. The students score on a particular problem can be changed here also.

Changing a Password

 

If a student forgets his or her password, you can give them a new password. Go to the Instructor Tools Page and select the student and press the "Change Password" button.

 

 

Removing Students or Changing Status

 

It is better to "drop" a student from a course instead of deleting them, since deleting them destroys all their data which may be needed later. In order to drop the student, go to the ClassList Editor page and select the user (by checking the box next to his name in, then select the "Edit selected users" option and click the Take Action button. Just enter the word DROP or the letter D in the status box for the student classlist information. You may want to enter a comment giving the drop date. You can later resurrect the student by changing his or her status to C (for current). In that case, you may want to make sure the student has been assigned the problem sets.

 

Writing New Problems or Editing Current Ones

You may want to select problems from the text book which you want to modify into WeBWorK problems. In order to create a problem template file (i.e. a .pg file), usually you start with a .pg file containing a problem similar to the one you already want and modify it. Nearly everywhere you see a problem there is an "Edit it" link. If you click on this link you will be take to an editor where you can edit this problem. This may not be an easy task, since this is computer code. There is a link on the editing page to the "Man pages" which can help you learn to write and edit problems.

You won't want to write over the current problem (you probably won't be allowed to either), so give it a new name by typing it in the "Save As" blank. Be sure to also type in proper directory to put it. If the directory you type doesn't exist, WeBWork will make it. So if you type in "new/problem.pg", WeBWorK will create the "new" directory for the problem.pg problem. This directory will the be available in the Local Problems section of the Library Browser Page.

When writing your own problems, you will usually have a few errors here and there. It is usually a good idea to click on the "Refresh" button often to make sure the problem is working.

Writing totally new problems may be difficult for a newer professor to do, but if you just want to change the wording or the variable parameters, it may be worth the time to make the small changes and save that problem to a new directory. Perhaps the best way to learn how the problems are written is making small changes to a bunch of them.

 

<| Post or View Comments |>

Forum archive 2000-2006 -> Arnold K. Pizer - Hardware for WeBWorK

by Arnold Pizer -
inactiveTopicHardware for WeBWorK topic started 11/5/2003; 5:13:26 PM
last post 11/6/2003; 8:58:38 PM
userArnold K. Pizer - Hardware for WeBWorK  blueArrow
11/5/2003; 5:13:26 PM (reads: 1587, responses: 8)

We recently received the  following query.

Dear Prof. Gage,

I am an assistant professor in the Johns Hopkins University. We plan to
use WeBWork for some calculus courses, maybe eventually up to a scale 
of 500 to 600 students. Here we need your valuable help.

Now our IT guy wants to know how much space WeBWork may require for 
such a class, including the temporary files and data files, so that he can
properly configure the server. Will you please give us some estimates?

Thanks for your kind consideration!

Best regards,
Qiao

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/5/2003; 5:17:46 PM (reads: 1763, responses: 0)

Here's our answer:

Dear Qiao,

Mike Gage has forwarded your email to me. 

Thank you for your interest in WeBWorK. I'm sure you are aware that Johns Hopkins used WeBWorK for many years under the direction of James Martino.  Jim is still at Johns Hopkins but has moved from the math department to the Digital knowledge Center, an R&D unit in the Hopkins university library structure.  His email is jrm@jhu.edu .  You certainly should get in touch with him if you haven't already.  He can tell you what he ran the courses on at Hopkins. If you talk with Jim, say hi for Mike and I.

First you should have your IT guy look at http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$1572 which gives some important info.  Also have him look at http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$1808 which is interesting and gives more info. about people having load problems.  Note that in Arizona State's case their problem was due to bad hardware they hadn't noticed and in Dartmouth's case the problem was that someone wrote a (very bad) problem that did a tremendous amount of needless calculations.  But the comments on server configuration are still valid.

At Johns Hopkins you are not talking about many users but I would still try to use a dual processor server if possible.  Concerning disk size I'll give you some figures below but disk space is so cheap that I would certainly err on the large size. 

The basic WeBWorK system files will fit on 10 MB but if you want to turn the access log on (it's off by default) that can become huge maybe 500 MB or more.  The tmp files at Rochester need about 4-5 GB (we have twice as many users as you anticipate) --- note that we have them on a separate partition that is not backed up.  A course (with logs, DATA, many problem template) should easily fit in 50 MB but this assumes people compress the database from time to time.  Most professors never do this (it requires one click) so maybe 500 MB is a safer size.   Also professors should remove unneeded tmp files (again it requires one click) but most don't.  You can get by with a pretty small (by current standards) amount of space if you want to but it is definitely not worth the trouble.  I see Dell is charging $224.10 for a 36GB 10K RPM Ultra 320 SCSI Hard Drive and I'm sure there are cheaper venders.  That size would be more than sufficient for you. [Actually look on http://www.pricewatch.com/ where you can find good 73 GB drives for about $200].  I would give 2 GB for system files, 10 GB for tmp files (in a separate partition), and 10 GB for courses.   The system and courses don't have to be on separate partitions so you can combine them into one partition.  You can get by with a lot less but it's not worth your time to worry about it.

I hope this helps. Please fell free to contact us again.  Others may find this info useful --- would it be OK with you if I post this on http://webhost.math.rochester.edu/webworkdocs/discuss  ?

Sincerely,

Arnie

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 2:36:35 PM (reads: 1779, responses: 0)

Here is another sequence of queries and answers.

My name is Zed Pobre, and I am the system administrator for the
Department of Mathematics at Louisiana State University.  I have been
asked to implement a Webwork system to accommodate 2500 students for
the Fall 2004 semester, later to be expanded to handle 6000 students.
I am very much hoping that you can tell me what kind of hardware I am
going to need to provide reasonable response time for 500 to 1500
simultaneous users, and whether it would be a better idea to try to
jump directly to Webwork 2 or build the entire environment around
Webwork 1.9.

Thanks in advance for any help you can provide.  I unfortunately don't
have the budget to run my own scalability tests (though the university
has offered to pay for the final server once I give them firm specs),
so if I have to do it on my own I'm going to have to just guess.

--
System Administration <merlin@math.lsu.edu>;
Louisiana State University
Department of Mathematics

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 2:37:02 PM (reads: 1768, responses: 0)
Dear Zed,

I'll attempt to give you a few guide lines.  First look at http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$1928 and the especially the two links given there.  We have a list of hardware people are using at http://webhost.math.rochester.edu/webworkdocs/sites/systems/ but it is very much out of date.  We should  try to update this with current info.

There are not many places with the number of users you anticipate.  Arizona State has a lot of users and John Jones <jj@asu.edu>; can give you some info.  Irvine also has I believe a lot of users but they are or at least were using multiple servers --- you might want to contact someone there.  Indiana also has a lot of users on heavy Sun hardware. Rutgers is another place with a lot of users.  Utah also I think.

Actually the load you will experience is mostly dependent on the size of the largest class (assuming that if you have a number of large classes, they don't have assignment due at the same time).  At Rochester we have about 1300 users with a largest class of 300.  With our relatively old Dell 4600 (one of the earliest dual Xeon machines with 2 Ghz processors with 1 GB of memory I think), we no longer try to schedule assignments on different days.  I actually don't know when assignment are due since with this hardware, we have no load issues at all.  So we may be close to the lower range of your "500 to 1500 simultaneous users."

You can get the fastest Dell 4600 with dual 3 Ghz Xeons and 2 GB of memory for about $6,000. This is one fast machine and might handle the load.  For $10,000 you can get an essentially equivalent (dual 2.5 Ghz Xeons but with larger cache) Dell 6600 but this gives you the option of adding two more processors.  That ( a quad processor) would certainly handle the load.  You probably should add more disk space than the above quotes contain and maybe more memory but you can get disks for a lot cheaper than Dell's prices.  Another option might be to get a Dell 2600 with dual 3 Ghz Xeons and 2 GB of memory for $4,500 and if that didn't handle the load, then get a second one and split the courses.   I can certainly say that we have been extremely happy with the Dell hardware but you can build or buy cheaper servers.  In any case if you use Intel chips, I wouldn't get anything less than a dual Xeon machine.

I would suggest setting up WeBWorK 1.9 and then 2.0.  After setting up 1.9, 2.0 is not much more work.  2.0 is still on the cutting edge.  You can run a course simultaneously on both.

I hope this info helps.  Please fell free to contact us again.  Others may find this info useful --- would it be OK with you if I post this on http://webhost.math.rochester.edu/webworkdocs/discuss  ?

Sincerely,

Arnie

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 2:37:48 PM (reads: 1761, responses: 0)
On Thu, Nov 06, 2003 at 11:38:01AM -0500, Arnold Pizer wrote:
>
> You can get the fastest Dell 4600 with dual 3 Ghz Xeons and 2 GB of memory
> for about $6,000. This is one fast machine and might handle the load.  For
> $10,000 you can get an essentially equivalent (dual 2.5 Ghz Xeons but with
> larger cache) Dell 6600 but this gives you the option of adding two more
> processors.  That (a quad processor) would certainly handle the
> load.

    After checking the prices on this, it's not much more expensive to
add a second 2 processor 4600 system as it is to upgrade a 6600 to 4
processors.  I submitted specs to the chairman recommending two $7400
2650s with 3.2GHz Xeons, 4GB RAM, and 2 hard drives (RAID1), with the
idea of just adding or replacing them as distributed systems as time
goes on.

    I'll try load-testing by pushing all classes onto one server to
start with next semester, and as soon as I hear a complaint about
speed, I'll split them up between the two and mirror changed data
between the two nightly.  I don't have the infrastructure for this
currently, but I'm looking into setting up Kerberos and AFS, moving
actual storage to other machines so I can do instantaneous failover if
something happens.  Do you know anyone who has done this before?


> I hope this info helps.  Please fell free to contact us again.  Others may
> find this info useful --- would it be OK with you if I post this on

    Thanks, it gave me a starting point and a list of other people to
bug.  Feel free to post this, and if I forget to send you the results
of this by next July, feel free to send me e-mail asking.

--
System Administration <merlin@math.lsu.edu>;
Louisiana State University
Department of Mathematics

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 2:40:22 PM (reads: 1767, responses: 0)
<!--StartFragment -->
On Thu, Nov 06, 2003 at 11:38:01AM -0500, Arnold Pizer wrote:
>
> You can get the fastest Dell 4600 with dual 3 Ghz Xeons and 2 GB of memory
> for about $6,000. This is one fast machine and might handle the load.  For
> $10,000 you can get an essentially equivalent (dual 2.5 Ghz Xeons but with
> larger cache) Dell 6600 but this gives you the option of adding two more
> processors.  That (a quad processor) would certainly handle the
> load.

    After checking the prices on this, it's not much more expensive to
add a second 2 processor 4600 system as it is to upgrade a 6600 to 4
processors.  I submitted specs to the chairman recommending two $7400
2650s with 3.2GHz Xeons, 4GB RAM, and 2 hard drives (RAID1), with the
idea of just adding or replacing them as distributed systems as time
goes on.

I think this is a good plan. It's what I would do in your situation.  Since it's so cheap, don't skimp on hard disk space.


    I'll try load-testing by pushing all classes onto one server to
start with next semester, and as soon as I hear a complaint about
speed, I'll split them up between the two and mirror changed data
between the two nightly.

I'm not sure I totally understand this.  Since the real problem (if you have one)  will occur at the times homework is due and this is determined on a course by course basis, it would be simple to just move some courses to the second server.  There is no need to share data between courses. 

 I don't have the infrastructure for this
currently, but I'm looking into setting up Kerberos and AFS, moving
actual storage to other machines so I can do instantaneous failover if
something happens.  Do you know anyone who has done this before?

No, but I'm not really up on this. I would ask the folks at Irvine.  A couple of years ago, they set up a load balancing system with several servers serving maybe 2500 students.  I'm not sure what they are doing now but it looks like they have expanded into Physics and Chemistry (http://homework.ps.uci.edu/webwork/). The sys admin there is "Domingos R. Begalli" <drb@uci.edu>; and you could contact him.



> I hope this info helps.  Please fell free to contact us again.  Others may
> find this info useful --- would it be OK with you if I post this on
> http://webhost.math.rochester.edu/webworkdocs/discuss ?

    Thanks, it gave me a starting point and a list of other people to
bug.  Feel free to post this, and if I forget to send you the results
of this by next July, feel free to send me e-mail asking.

OK, Thanks.  Good luck with the project.

Arnie

<| Post or View Comments |>


userArnold K. Pizer - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 2:53:06 PM (reads: 1757, responses: 0)
On Thu, Nov 06, 2003 at 02:30:40PM -0500, Arnold Pizer wrote:
> >    I'll try load-testing by pushing all classes onto one server to
> >start with next semester, and as soon as I hear a complaint about
> >speed, I'll split them up between the two and mirror changed data
> >between the two nightly.
>
> I'm not sure I totally understand this.  Since the real problem (if you
> have one)  will occur at the times homework is due and this is determined
> on a course by course basis, it would be simple to just move some courses
> to the second server.  There is no need to share data between courses.

    For failover, if necessary.  If one of the machines explodes, I'd
like to be able to have the second one pick up the slack with as
little downtime as possible.  Especially noting that the department
wants to use the system for testing as well as homework, there will be
a collective heart attack if half of our courses drop out the morning
before a test.
 
[...]
    Thanks.

--
System Administration <merlin@math.lsu.edu>;
Louisiana State University
Department of Mathematics

<| Post or View Comments |>


userJohn Jones - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 4:20:43 PM (reads: 1823, responses: 0)
Hi,

As mentioned earlier in the thread, we are servicing a fairly large number of students. I think we are over 4000 this semester. We have two machines - both dual processor pentiums, a 2.66GHz and a 2.40GHz. Earlier this semester, one of the machines was having hardware problems, so we had to shut it down and run off of just one.

Currently, we are running soley on the 2.66GHz machine, and that seems to hold up pretty well with the student load. Other variables which may be relevent to speed:

  • We run dvipng only mode for displaying problems
  • We use vlatex for quicker generation of pdf (faster than dvips and ghostscript - probably comparable to pdflatex)
  • We run a hybrid somewhere between WW 1.8 and 1.9, but not 2.0 (yet)
  • We cache images of graphs. Some of our problem sets are full of images (as many as 8 graphs in a single problem). They are much faster with graph caching.
  • We keep dvipng/graph images for a week, but then delete them. Without that, we ran out of disk space and, well, it wasn't pretty. Of course, if an image is needed again, it is regenerated.
Our load sometimes creeps up for short times, but is mostly fine.

When we were having problems, I was shifting courses back and forth between machines. The course would be unavailable for < 1 minute in the process (disconnect course, tar it up, sftp it, untar, run script to fix permissions).

The biggest problem we ran into with this was that students/teachers would bookmark/link to the login script. When the course moved, those links were dead and students got the course not found error. Also, our main page of links to courses would change when we changed machines. In general that should not be a problem, but some browsers won't refresh a page even if the student shift-clicks on the refresh button (some versions of AOL). They got very frustrated. Even though it was clearly their browser's fault, they blame WeBWorK.

I don't synch course files between the machines. We have RAID mirroring on each machine, so even if it half-explodes, we should be able to recover.

John

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Hardware for WeBWorK  blueArrow
11/6/2003; 8:58:38 PM (reads: 1770, responses: 0)

At Ohio State we currently have around 1100 students this quarter using WeBWorK, with two of our largest courses consisting of 300 students each.  We are using the course management system Moodle as the front end to all WeBWorK functions except for initial course setup.  We haven't had any performance problems and seem to have plenty of reserve capacity.  The hardware specs for our new server are given below.

Zig

sysinfo

Host Name is              webwork2
Host Aliases is           webwork2
Host Address(es) is       140.254.92.37
Host ID is                fe8c255c
System Model is           GenuineIntel 3057 Mhz Intel(R) Xeon(TM) CPU 3.06GHz
Main Memory is            4 GB
Virtual Memory is         4 GB
Number of CPUs is         2
CPU Type is               Intel(R)
App Architecture is       i686
Kernel Architecture is    i686
OS Name is                Linux
OS Version is             2.4.20-20.9bigmem
OS Distribution is        Red Hat Linux release 9 (Shrike)
Kernel Version is         Linux version 2.4.20-20.9bigmem (bhcompile@stripples.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 SMP Mon Aug 18 11:18:32 EDT 2003

sudo /sbin/fdisk -l
Password:

Disk /dev/sda: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1      3939  31639986   fd  Linux raid autodetect
/dev/sda2          3940      4461   4192965   fd  Linux raid autodetect

Disk /dev/sdb: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1      3939  31639986   fd  Linux raid autodetect
/dev/sdb2          3940      4461   4192965   fd  Linux raid autodetect

Disk /dev/sdc: 36.7 GB, 36703932928 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdc1             1      4462  35840983+  83  Linux

Disk /dev/sdd: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdd1             1      4462  35840983+  fd  Linux raid autodetect

<| Post or View Comments |>

inactiveTopicSpurious compiler warning with dvipng mode topic started 8/19/2003; 9:48:54 PM
last post 8/20/2003; 7:46:26 AM
userZbigniew Fiedorowicz - Spurious compiler warning with dvipng mode  blueArrow
8/19/2003; 9:48:54 PM (reads: 929, responses: 1)
I'm getting spurious compiler warnings:

 

Compiler warnings:
* /usr/bin/latex fiedorow-prob3image.tex >>/dev/null 2>>/dev/null -- FAILED in ImageGenerator returned 256 at /web/webwork/system/lib//ImageGenerator.pm line 189.
##More details:
-------- ImageGenerator::render called at /usr/local/apache/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl line 473

when I'm editting certain problems. These problems display fine in the "Do Problem Set Environment". I only get these spurious compiler warnings when I click on "Show Editor" and then on "Refresh Problem" or "Save Updated Version". There aren't any missing images. This seems only to occur with problems which use the LaTeX picture environment.

Any ideas, John?

Zig

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Spurious compiler warning with dvipng mode  blueArrow
8/20/2003; 7:46:26 AM (reads: 1171, responses: 0)
Never mind, John. I figured it out. It is the problem you discussed with Arnie in http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$1593#1594

Unfortunately, the fix discussed there was not implemented in the shipped version of WeBWorK 1.9.

Zig

<| Post or View Comments |>

inactiveTopicQuestions about $newProblemSeed, ensuremath, and answer box in a matrix. topic started 5/20/2003; 12:43:30 PM
last post 5/21/2003; 5:55:40 PM
userJun Wang - Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/20/2003; 12:43:30 PM (reads: 2022, responses: 9)
Hi, I need some help in dealing the following cases.

1. While playing with the MAA tutorial templates, I noticed that $newProblemSeed does not work in typeset2 mode on our system if there are images involed. TEXT mode and "formatted-text" mode show that the problem is changed. However, the images are not updated even after reloading.

2. When dealing with fractions with command "new Fracion()" as used in the 8th grade problems in Rochester CVS, "\ensuremath" is not interpreted by our system. We have latex2e installed.

3. In typeset2 mode, the answer box can not be displayed in a table or in a matrix on our system. Is there a way to resolve this?

Thanks,

Jun

<| Post or View Comments |>


userMichael Gage - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/20/2003; 4:04:40 PM (reads: 2238, responses: 0)
Hi Jun,

(1) When ever you use images the browser caches the images so that they do not need to be downloaded again. (Some browsers have a preference which allows you to turn this "feature" off.) Pressing the shift key while clicking "reload" will force the browser to reload the images (in most browsers). WeBWorK could help with this problem by renumbering the image everytime it is displayed. This would require some work however and is not high on our toDo list, since the problem you are discussing occurs mainly when instructors write problems, not when students view them. For this reason I tend to use the formattted-text mode when writing problems.

(2) I believe that ensuremath is part of Latex2e (see http://www.nerc-essc.ac.uk/~dwcp/Latex/ensuremath.html for example) I suggest trying to debug this problem by writing a tex file directly on your system and processing it with the same tex system that is called by WeBWorK.

(3) Using tth mode is one way to resolve it, but many browsers/OS systems don't have the needed fonts installed. John Jones is working on an improved version of display_matrix that will display the matrices as a table while processing the entries with Tex. You can follow his changes at http://webwork-db.math.rochester.edu/cgi-bin/cvsweb.cgi/webwork/system/courseScripts/PGmatrixmacros.pl

and also download the latest versions.

(If you want to keep up with changes this summer "as they happen" you can link to our CVS as described at http://webhost.math.rochester.edu/webworkdocs/docs/install/how_to_use_cvs

Hope this helps.

-- Mike

<| Post or View Comments |>


userArnold K. Pizer - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 9:30:45 AM (reads: 2240, responses: 0)
Hi Jun,

Let me add one additional comment to Mike's reply about cached images.

Assuming you are using WeBWorK 1.8, if you want to refresh images when you change seeds, you should put
$refreshCachedImages = 1;
into the .pg code for the problem. This disables WeBWorK's caching of images but you still have to handle the browser's caching of images. You can also set this as the default for the whole WeBWorK system or for a single course, but this is not recommended (see below).

In typeset2 (dvipng) and typeset (latex2html) modes, WeBWorK caches the images on the server in order to speed up processing the next time the same problem is viewed. When a problem is viewed, WeBWorK checks that the cached images are newer than the problem .pg code and if not, regenerates the images. Thus if a problem is edited, the images are regenerated. However, since it is very rare for the seeds to be changed, no such check is done with seeds. Thus if a professor changes the seed for a problem, it is up to the professor to delete any cached images for that problem (or to set $refreshCachedImages = 1; for that particular problem if seeds will be changed a lot). It would not be too difficult to change the WeBWorK system code so that when the seed for a problem is changed, all associated cached images are deleted but WeBWorK does not currently work that way.

Here is the documentation on $refreshCachedImages taken from Global.pm:

 

$Global::PG_environment{refreshCachedImages} = 0;
# Set to 0 or 1. If set to 1, the cached images for
# problems will never be used and Latex2html, dvipng, or any new
# modes that use cached images will always be called
# on to create or recreate all images. This can be very time
# consuming so almost never should this variable be set to 1.
# This default can be over ridden for an individual problem by
# setting e.g. refreshCachedImages = 1 in the .pg file for the problem.
# This is the real reason for the variable and is useful for
# conditional problems where the second part of the problem
# will be displayed only if a student answers the first part
# correctly. In this case the cached images would only show
# for the first part so the second part would never appear in
# typeset, etc. mode.

<| Post or View Comments |>


userJun Wang - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 10:32:03 AM (reads: 2227, responses: 0)
Thank you, Mike,

(1), I tried "Shift+reload" on IE5 and Netscape 7.0, but they did not work. Formatted-text mode works fine and I was just wondering if I missed something.

(2). I was referring to some grade 8th problems in Rochester CVS like http://webwork-db.math.rochester.edu/cgi-bin/cvsweb.cgi/rochester_grade8problems/setGrade8/U1orderingNumbers/ordering_numbers_2.pg?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=Rochester. When I copied them to our system, the problems displayed something like "\ensuremath{ \frac{11}{17} }" instead of a fraction. Last night I accidentally fixed it on our system by enclosing them with (...), that is, I changed "\{ $a->print \} \{ans_rule(5)\} \{ $b->print \}$BR" in the template to "\(\{ $a->print \}\) \{ans_rule(5)\}\( \{ $b->print \}\)$BR". However, I don't know why and I thought (...) or $ were not needed in Latex2e.

(3). We will keep up with the changes. Thank you.

Jun

<| Post or View Comments |>


userJun Wang - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 10:41:31 AM (reads: 2221, responses: 0)
Hi, Arnie,

It worked. This fixed my first question. Thank you.

Jun

<| Post or View Comments |>


userJohn Jones - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 12:28:32 PM (reads: 2191, responses: 0)
Hi Jun,

I haven't researched your question about \ensuremath, but I have a few thoughts. \ensuremath is part of latex2e, so it will work as expected in some cases with WeBWorK. In particular, it should work in pdf production.

On the other hand, when WeBWorK makes images from bits of math in a problem, it has to know where those bits of math are. It does it by searching for \( \) and \[ \]. Other ways of invoking math mode will be missed, which includes use dollar signs (which would be hell to support because of their special nature in perl) and \ensuremath.

Looking at the code for EV3, it doesn't look to hard to add support for \ensuremath. After it has dealt with the two basic types of math expressions above, it would then look for \ensuremath{...} and treat it as \(...\). One difficulty may be jumping past matching braces inside the \ensuremath, but I think a suitable regular expression can be made.

John

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 1:35:40 PM (reads: 2214, responses: 0)
Hi Arnie,

<< Thus if a professor changes the seed for a problem, it is up to the professor to delete any cached images for that problem (or to set $refreshCachedImages = 1; for that particular problem if seeds will be changed a lot). It would not be too difficult to change the WeBWorK system code so that when the seed for a problem is changed, all associated cached images are deleted but WeBWorK does not currently work that way. >>

I would request that you make this change. The current situation can easily lead to unpleasant misunderstandings between the professors and students.

Zig

<| Post or View Comments |>


userMichael Gage - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 1:48:36 PM (reads: 2203, responses: 0)
Hi Jun and John,

Jun, I think you have found a "feature/bug" in Fraction.pm. That module has not been tested in the field very much, so I guess I shouldn't be surprised. I expect it will work in Latex2HTML mode which analyzes the entire file, not just the math strings.

We have two choices, remove the ensuremath tags in the Fraction.pm module. This means that fractions will always need to be printed inside math mode e.g. \( \{$a->print} - \{ b->print \} = \{ ans_rule \} \) which is not elegant, but it is consistent.

Alternatively we could also try to make WeBWorK do something more sophisticated along the lines of John's suggestion. This would allow us to write \{$a->print\} when the fraction is used alone. How useful is it to be able to use \{ $a->print \} instead of \(\{ $a->print }\) ? is it worth the extra effort?

-- Mike

<| Post or View Comments |>


userJohn Jones - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 2:17:31 PM (reads: 2211, responses: 0)
Hi,

On

<< Thus if a professor changes the seed for a problem, it is up to the professor to delete any cached images for that problem (or to set $refreshCachedImages = 1; for that particular problem if seeds will be changed a lot). It would not be too difficult to change the WeBWorK system code so that when the seed for a problem is changed, all associated cached images are deleted but WeBWorK does not currently work that way. >>

I think images are deleted automatically if the professor changes a seed through the professor's page. What is not noticed is if the seed is changed by the problem itself. If that possibility is built into a problem, then the problem should set $refreshCachedImages = 1.

John

<| Post or View Comments |>


userJun Wang - Re: Questions about $newProblemSeed, ensuremath, and answer box in a matrix.  blueArrow
5/21/2003; 5:55:40 PM (reads: 2228, responses: 0)
Hi, Mike and John,

John is right and it works in the pdf production of hard copies. The current version is fine to me. I just need to make a note and remember to use math mode, different from other situations such as printing multiple choices. Thanks.

Jun

<| Post or View Comments |>

Forum archive 2000-2006 -> Michael Gage - PG.pm

by Arnold Pizer -
inactiveTopicPG.pm topic started 8/16/2002; 5:23:14 PM
last post 8/16/2002; 5:23:14 PM
userMichael Gage - PG.pm  blueArrow
8/16/2002; 5:23:14 PM (reads: 2827, responses: 0)


NAME

WeBWorK::PG - Invoke one of several PG rendering methods using an easy-to-use API.


SYNOPSIS

 $pg = WeBWorK::PG->new(
$ce, # a WeBWorK::CourseEnvironment object
$user, # a WeBWorK::DB::Record::User object
$sessionKey,
$set, # a WeBWorK::DB::Record::UserSet object
$problem, # a WeBWorK::DB::Record::UserProblem object
$psvn,
$formFields # in &WeBWorK::Form::Vars format
{ # translation options
displayMode => "images", # (plainText|formattedText|images)
showHints => 1, # (0|1)
showSolutions => 0, # (0|1)
refreshMath2img => 0, # (0|1)
processAnswers => 1, # (0|1)
},
);
 $translator = $pg->{translator}; # WeBWorK::PG::Translator
$body = $pg->{body_text}; # text string
$header = $pg->{head_text}; # text string
$answerHash = $pg->{answers}; # WeBWorK::PG::AnswerHash
$result = $pg->{result}; # hash reference
$state = $pg->{state}; # hash reference
$errors = $pg->{errors}; # text string
$warnings = $pg->{warnings}; # text string
$flags = $pg->{flags}; # hash reference


DESCRIPTION

WeBWorK::PG is a factory for modules which use the WeBWorK::PG API. Notable modules which use this API (and exist) are WeBWorK::PG::Local and WeBWorK::PG::Remote. The course environment key $pg{renderer} is consulted to determine which render to use.


THE WEBWORK::PG API

Modules which support this API must implement the following method:

new ENVIRONMENT, USER, KEY, SET, PROBLEM, PSVN, FIELDS, OPTIONS

The new method creates a translator, initializes it using the parameters specified, translates a PG file, and processes answers. It returns a reference to a blessed hash containing the results of the translation process.

Parameters

ENVIRONMENT

a WeBWorK::CourseEnvironment object

USER

a WeBWorK::User object

KEY

the session key of the current session

SET

a WeBWorK::Set object

PROBLEM

a WeBWorK::DB::Record::UserProblem object. The contents of the source_file field can specify a PG file either by absolute path or path relative to the "templates" directory. The caller should remove taint from this value before passing!

PSVN

the problem set version number

FIELDS

a reference to a hash (as returned by &WeBWorK::Form::Vars) containing form fields submitted by a problem processor. The translator will look for fields like "AnSwEr[0-9]" containing submitted student answers.

OPTIONS

a reference to a hash containing the following data:

displayMode

one of "plainText", "formattedText", or "images"

showHints

boolean, render hints

showSolutions

boolean, render solutions

refreshMath2img

boolean, force images created by math2img (in "images" mode) to be recreated, even if the PG source has not been updated. FIXME: remove this option.

processAnswers

boolean, call answer evaluators and graders

RETURN VALUE

The new method returns a blessed hash reference containing the following fields. More information can be found in the documentation for WeBWorK::PG::Translator.

translator

The WeBWorK::PG::Translator object used to render the problem.

head_text

HTML code for the <head> block of an resulting web page. Used for JavaScript features.

body_text

HTML code for the <body> block of an resulting web page.

answers

An AnswerHash object containing submitted answers, and results of answer evaluation.

result

A hash containing the results of grading the problem.

state

A hash containing the new problem state.

errors

A string containing any errors encountered while rendering the problem.

warnings

A string containing any warnings encountered while rendering the problem.

flags

A hash containing PG_flags (see the Translator docs).


METHODS PROVIDED BY THE BASE CLASS

The following methods are provided for use by subclasses of WeBWorK::PG.

defineProblemEnvir ENVIRONMENT, USER, KEY, SET, PROBLEM, PSVN, FIELDS, OPTIONS

Generate a problem environment hash to pass to the renderer.

translateDisplayModeNames NAME

NAME contains


AUTHOR

Written by Sam Hathaway, sh002i (at) math.rochester.edu.

File path = /ww/webwork/webwork2/lib/WeBWorK/PG.pm

<| Post or View Comments |>

Forum archive 2000-2006 -> Dan Maynard - Conditional Problems

by Arnold Pizer -
inactiveTopicConditional Problems topic started 7/20/2002; 10:49:45 AM
last post 7/24/2002; 9:32:06 AM
userDan Maynard - Conditional Problems  blueArrow
7/20/2002; 10:49:45 AM (reads: 1636, responses: 3)
I am currently writing a set of problems that have two parts to them. The student answers the first part, and if that is correct, then after clicking the submit button, a new problem appears based on their previous answer. If the first problem is incorrect, they continue to be asked that question until it is answered correctly. This basically uses just an "if" statement, comparing the student answers with the correct numerical value. It works correctly when the formatted text option in used, but when it is attempted using the typeset option, even if the answers are correct, it displays the test and answer boxes from the previously correctly answered question, not the new text and answer boxes that should be shown for the correct response. I know that the program has entered the correct loop, because up top it says "Answer 1 entered: ><" for the correct amount of Answers for entering the second "if" statement. I was wondering if anyone knows of a more reliable way to do this type of "if correct, then" problem, or if anyone knows of a way to get the page to refresh itself after each submit when the typeset option is chosen...or possibly also just a way to disable the students' ability to choose the typeset option. Thanks for any help

Dan

<| Post or View Comments |>


userGavin LaRose - Re: Conditional Problems  blueArrow
7/22/2002; 1:00:36 AM (reads: 1904, responses: 0)
Hi Dan,

The problem with typeset mode is that in that case LaTeX2HTML is being used to generate an HTML page with the associated Gif images for the equations. This is generated the first time a student views the problem (or when you run l2hPrecreateSet.pl), and isn't rebuilt unless the .pg file changes. Therefore the first time the student visits the problem the page they see is fixed for all subsequent viewings.

I don't know of a work-around for this; if you want to disable typeset mode entirely, it's pretty easy to find where the button allowing that is put into the page and edit it out. See the displayMacros.pl file in the system/courseScripts directory.

Gavin

<| Post or View Comments |>


userDan Maynard - Re: Conditional Problems  blueArrow
7/24/2002; 4:38:03 AM (reads: 1933, responses: 0)
I had looked into editing out the button previously. Unfortunately I only want to disable it on a single problem set, not for the whole course or any other courses. Since I'm not sure exactly how the displayMacros gets called, is there a way to disably it for this particular problem set?

Dan

<| Post or View Comments |>


userArnold K. Pizer - Re: Conditional Problems  blueArrow
7/24/2002; 9:32:06 AM (reads: 1921, responses: 0)
Hi Dan,

You raise a good point. Gavin has explained exactly what is happening. I have changed things so that in the new version of WeBWorK you will be able to write refreshLatex2HTML = 1; (in analogy with showPartialCorrectAnswers = 1;) in the .pg code for a problem to force L2H to be run every time to regenerate the HTML page in typeset mode. Since this is a slow process, you would want to use this sparingly if you have a large class or a slow server. If you really want to use this now, you can download from the CVS repository the new versions of Global.pm, PG.pl, and processProblem8.pl (there are only a few new lines of code and several more of related comments and documentation).

My suggestion for now would be to add a line to the first part of the problem telling students that for this problem, they must use formatted-text mode.

Thanks for the idea. Also, you might want to post an example of your conditional problem. Others may be interested in this type of problem.

Arnie

<| Post or View Comments |>

inactiveTopicShow Editor error in 1.7 topic started 7/12/2002; 2:05:55 AM
last post 7/29/2002; 6:56:40 AM
userSusan Diesel - Show Editor error in 1.7  blueArrow
7/12/2002; 2:05:55 AM (reads: 1623, responses: 3)
Hi,

When I click Show Editor while viewing a problem, I get this error message:

The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

-----------------------------------------------------------------------------


The character '>' was expected. Line 81, Position 5

-- media type, as per [RFC2045] ----^

IE 5.5 or 6 on a PC gives us the error. One of our lab computers does show the source for the problem correctly. It is running IE5 on a Macintosh. What other platform/browswer combinations work?

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/26/2002; 7:13:09 AM (reads: 1919, responses: 0)
I believe this may be caused by using newer versions of CGI.pm. My guess is that you are using a version newer than 2.68. By default, CGI.pm versions 2.69 and higher emit XHTML (http://www.w3.org/TR/xhtml1/. There must be some output from the Show Editor function that is not valid under XHTML.

We will try to track this down.

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/29/2002; 5:56:25 AM (reads: 1947, responses: 0)
Here is a fast fix that you can use until we track down the real problem. This fix works with the latest version of CGI.pm, version 2.81.

In the script problemEditor.pl which is in the directory .../webwork/system/cgi/cgi-scripts/ change the 10th line from

use CGI qw(:standard escapeHTML unescapeHTML);

to

use CGI qw(:standard escapeHTML unescapeHTML -no_xhtml);

Arnie

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/29/2002; 6:56:40 AM (reads: 1961, responses: 0)
Here is the real fix. Simply delete line 408 of the script problemEditor.pl which is in the directory .../webwork/system/cgi/cgi-scripts/

This is the line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

The bug was that the DOCTYPE line is added automatically by the start_html command on line 413 so that the html output had two DOCTYPE commands. With CGI.pm version 2.81, the output is xhtml and having two DOCTYPE commands is not valid xml.

Arnie

<| Post or View Comments |>

Forum archive 2000-2006 -> Gregg Klein - Partial Credit Scenerio

by Arnold Pizer -
inactiveTopicPartial Credit Scenerio topic started 7/2/2002; 6:17:44 PM
last post 7/5/2002; 5:26:40 AM
userGregg Klein - Partial Credit Scenerio  blueArrow
7/2/2002; 6:17:44 PM (reads: 1184, responses: 3)
Can WebWorK be set up so that a particular problem set (or problem) is scored in the following manner. Let's say a problem is worth 5 points initially, but for each time a user tries to submit an answer (wrong one of course) a specified number of points is subtracted.

Thanks in advance.

Gregg

<| Post or View Comments |>


userGavin LaRose - Re: Partial Credit Scenerio  blueArrow
7/3/2002; 1:08:23 AM (reads: 1454, responses: 0)
Hi Gregg,

I wrote an incremental_grader which we used for a while and then dropped in favor of just limiting the number of submissions allowed for a problem. The idea is essentially what you've said: on the first however many submissions full credit should be possible, and then after some number the amount of credit one can get should decrease. We used it to give full credit for up to four submissions, then drop to 70%, 50%, 30% or 10% on the next four, with no credit given after that. I wrote it a while ago, so I won't swear that it's the most elegant way of doing this, but I append it below for your information. I do think it works, at least.

@penalty is actually the amount of credit that one can get on each submission, @penPerc is the same thing but written as a percent because I'm lazy and didn't bother to format the entries in @penalty for printing out. Note that the values of @penPerc are explicitly referenced in the body of the routine, so that if the length of the array changed it would be necessary to also edit that. Also, I had this in a macro file for the course, so all of the backslashes are backslashes instead of double tildes.

I hope this is useful.

Cheers,
Gavin

sub incremental_grader {

# grader to give partial credit on subsequent attempts. all parts of
# the problem must be correct to get credit; if this is done on the
# attempt $n, $penalty[$n] credit is given.

# standard input
my $rh_evaluated_answers = shift;
my $rh_problem_state = shift;
my %form_options = @_;

# the hash %$rh_evaluated_answers contains the answers supplied:
# 'AnSwEr1' => 'supplied answer', 'AnSwEr2' => 'next answer',
# etc.
# the hash %$rh_problem_state is the current state of the problem.

# %form_options might include the user login name, the permission
# level of the user, the studentLogin name for this psvn,
# whether the form is asking for a refresh or is submitting
# a new answer, etc.

# by default, return current problem state
my %problem_state = %$rh_problem_state;

# penalty for subsequent submissions
my @penalty = ( 1, 1, 1, 1, 0.7, 0.5, 0.3, 0.1, 0 );
my @penPerc = ( '100%', '100%', '100%', '100%', '70%', '50%',
'30%', '10%' );

my %problem_result = # initialize result
(score => 0,
errors => '',
type => 'incremental_grader',
msg => "Credit for this problem decreases with " .
"subsequent attempts: on the first four, $penPerc[0] " .
"is possible; " .
"after that, $penPerc[4], $penPerc[5], $penPerc[6]," .
" and " .
"$penPerc[7] may be earned.");

# if answers were submitted, figure out which were correct
if ( $form_options{'answers_submitted'} ) {
my $total = 0;
foreach ( keys %$rh_evaluated_answers ) {
$total += $$rh_evaluated_answers{$_}->{'score'}
if ( defined($$
rh_evaluated_answers{$_}->{'score'}) );
}
my $numPossible = scalar(keys %$rh_evaluated_answers);

my $numTimes = $main::envir{'numOfAttempts'} - 1;
$numTimes = @penalty if ($numTimes > @penalty);

# update score for problem; check if the problem is already
# correct, and if not update it accordingly
my ($inCorrect, $correct, $probScore) = (0, 0, 0);
$correct = $problem_state{'num_of_correct_ans'}
if ( defined($problem_state{'num_of_correct_ans'}) );
$inCorrect = $problem_state{'num_of_incorrect_ans'}
if ( defined($problem_state{'num_of_incorrect_ans'}) );
$probScore = $problem_state{'recorded_score'}
if ( defined($problem_state{'recorded_score'}) );

if ( $total == $numPossible ) {
$probScore = $penalty[$numTimes] if ( ! $correct );
$correct++;
} else {
$inCorrect++;
}

# and we return...
$problem_result{'score'} = $total/$numPossible;
$problem_result{'errors'} = '';
$problem_result{'type'} = 'incremental_grader';
$problem_result{'msg'} = "Credit for this problem decreases" .
" with " .
"subsequent attempts: on the first four, $penPerc[0] is" .
" possible; " .
"after that, $penPerc[4], $penPerc[5], $penPerc[6], " .
"and $penPerc[7] may be earned.";
$problem_state{'recorded_score'} = $probScore;
$problem_state{'num_of_correct_ans'} = $correct;
$problem_state{'num_of_incorrect_ans'} = $inCorrect;
}
return ( %problem_result, %problem_state );
}

<| Post or View Comments |>


userGregg Klein - Re: Partial Credit Scenerio  blueArrow
7/4/2002; 5:16:03 AM (reads: 1438, responses: 0)
Gavin,

Thanks! I will try it. I'm not real sure how to implement (make it work) it but I will take a stab at it. Any advice will be helpful. I am new to webwork. I have not worked with macros before. I tried to make it work but could not. Please help!

Regards,

Gregg

<| Post or View Comments |>


userGavin LaRose - Re: Partial Credit Scenerio  blueArrow
7/5/2002; 5:26:40 AM (reads: 1462, responses: 0)
Hi Gregg,

I ended up with a file of local macros for the course that I was working on and put the incremental grader there. That is, in my .../webwork/courses/CourseName/templates/macros directory I had a file which I called PGextensions.pl that contained the incremental grader subroutine. If you do this, also check in the webworkCourse.ph file in the course directory that the line
$macroDirectory = "${templateDirectory}macros/";
is not commented out.

Then in your problem file include PGextensions.pl in the list of arguments for the loadMacros command at the top of the file and include the line install_problem_grader(~~&incremental_grader); to select the incremental grader.

Let me know if that doesn't work.

As a side note, I think I might have edited something to make the problem always display the number of attempts that had been made at the problem (I think the default is to do it after some number of attempts) so that students at least theoretically could always figure out where they were in terms of the credit they could get for submitting a problem. If you notice that this would be useful I can figure out where that was.

Cheers,
Gavin

<| Post or View Comments |>

Forum archive 2000-2006 -> Bill Ziemer - Bug in ProfLogin.pl !

by Arnold Pizer -
inactiveTopicBug in ProfLogin.pl ! topic started 9/18/2001; 3:42:07 PM
last post 9/18/2001; 10:49:54 PM
userBill Ziemer - Bug in ProfLogin.pl !  blueArrow
9/18/2001; 3:42:07 PM (reads: 1190, responses: 2)
When I go to the Professor's page, I get the error message:

Error: DBglue: getAllProbSetKeysForSet: Can't find index for set number 1

There are 3 problem sets available still, but all are CLOSED status. When the third set went to closed, the error occured. How do I build the set via command line now that buildProbSetDB.pl is no longer operational?

<| Post or View Comments |>


userArnold K. Pizer - Re: Bug in ProfLogin.pl !  blueArrow
9/18/2001; 7:44:17 PM (reads: 1426, responses: 0)
Hi Bill,

This is a strange bug which I have not seen before and I can not imagine how it occured. The fact that the error occured when all sets went closed should be a pure coincidence. There are many examples of courses where all sets are closed, e.g. http://webwork.math.rochester.edu/spring01-mth162/. The index for set 1 lists all the psvn's for set 1 and has nothing to do with due dates, etc.

I am assuming you didn't explicitly delete sets. This message will occur if you delete a set, then use the browser's back button to return to the Prof page (i.e. you do not reload or refresh the Prof page) and ask for info on the set. This will also occur if you delete all sets but then the error messages tells you how to fix this situation.

It seems that somehow your webwork_BD got corrupted. There are various "recovery" techniques that are available and I should probably talk to you off line about these (they have been used once in the last five years to the best of my knowledge). Please try one thing for me. Run export_webwork-database.pl to get a human readable version of the webwork_BD (run it with no parameters and it will tell you the syntax to use). Near the bottom of the output you will see the indexes. Here is what a small one for set 0 looks like. The format is "login = psvn". Do you have an index for set 1? For other sets?

 

[set<>0]
1=940281
apizer=749943
cmlr=631574
gage=615125
jknapp=908125
johnson=184419
mknapp=512230



Arnie

<| Post or View Comments |>


userBill Ziemer - Re: Bug in ProfLogin.pl !  blueArrow
9/18/2001; 10:49:54 PM (reads: 1480, responses: 0)
Thanks for the response. I went through the same thought process, and figured it must be that the database got corrupted somehow. I ran the rebuildProblemSetFromPSVNLog.pl script using an old classlist. It ran, said no changes to data, but I could log into Professor's page after that!

<| Post or View Comments |>