Planet WeBWorK

WeBWorK::Summer 2013

John Travis - Fri, 05/17/2013 - 06:42
The WeBWorK project is gearing up for a very busy summer.  It looks like close to 100 people (and unofficially many more of course) are taking part in one of several WeBWorK activities.

The MAA PREP workshop on Problem Authoring will be late May through June.  This online course has been wildly popular and the enrollment cap extended due to tremendous demand.  Forty two students will be taking part in this online course led by Gavin "Gateway" LaRose, Paul "PG" Pearson, Davide "Yoda" Cervone and myself (with no nickname since this is my blog post).

The code camp WeBWorK::Ann Arbor will be held the first week in June with over twenty participants.  The results of this meeting will show up in future releases although some of the back-end items may not be so apparent.

John Jones and Jeff Holt have a project for cleaning up the Open Problem Library.  This will involve a number of folks in June.

A second code Camp WeBWorK::Vancouver is still in the planning stage but will take place the last week in June and will be a good option for WeBWorK developers on the west coast.  Interested folks are encouraged to contact organizer Djun Kim at UBC.

The MAA PREP workshop on Model Courses will be in early June.  This course will be held at the MAA Headquarters in Washington DC and will be a great opportunity to both develop course creation skills and to network with others in various WeBWorK leadership roles.  Enrollment is nearing a full complement of 20 participants with advance registration still in effect till May 20.

Any WeBWorK users who plan to attend Mathfest are encouraged to help out with the exhibit hall booth.  Plans are also in the works for a social gathering.  Please contact me if you are interested in either.
Categories: Planet WeBWorK

Upcoming Summer 2013 WeBWorK development meetings

John Travis - Thu, 04/18/2013 - 14:48
As an open-source project, WeBWorK continues to improve due to the efforts of its numerous contributors.  This summer, two code camps are being planned to assist in that effort.

WeBWorK::Ann Arbor - June 1-3
Organizer:  Gavin LaRose, University of Michigan

Some suggested projects:
  • Documentation
  • Procedures
  • Wiki
  • Model courses
  • Answer evaluation
  • Database structure
  • Mastery learning set type
  • HTML5 applets

  • Finish the instructor UI -- make it functional and ready for final graphic design
  • Finalize restful API for the database calls.
  • Macros
  • Something you are interested in working on!

WeBWorK::Vancouver - June 27-30
Organizer: Djun Kim, University of British Columbia

Some suggested projects:

  • Finish the instructor UI -- make it functional and ready for final graphic design
  • Finalize restful API for the database calls.

  • Database re-design
  • Something you are interested in working on!

If you would like to participate in one or both of these or to perhaps organize another such gathering, please contact the listed organizer or send a note to me at travis@mc.edu.  The WeBWorK grant will cover travel and housing costs and perhaps meals.  Do not feel that you have to be a "WeBWorK expert" since there are avenues for plugging in at all levels.
Feel free to post questions or suggestions on the WeBWorK forums
Categories: Planet WeBWorK

Answers, Themes and Essays, Oh My!

Michael Gage - Fri, 04/05/2013 - 19:04
Hello everyone.  Geoff Goehle on Mike Gage's blog again.  Mike wanted us all to write a bit about what we got done at WeBWorK::Raleigh.  My time was split up between several different projects: adding comments to essay answers, modifying the Show Past Answers page to be suitable to students, and creating the math4 theme. I will talk about  each after the break.
Read more »
Categories: Planet WeBWorK

Answers, Themes and Essays, Oh My!

Geoff Goehle - Fri, 04/05/2013 - 11:32

Hello everyone.  Geoff Goehle on Mike Gage's blog again.  Mike wanted us all to write a bit about what we got done at WeBWorK::Raleigh.  My time was split up between several different projects: adding comments to essay answers, modifying the Show Past Answers page to be suitable to students, and creating the math4 theme. I will talk about  each after the break.

Comments on Essay AnswersOne of the most requested features for essay questions is the ability for instructors to comment on student answers and so we decided to add this ability to the system.  If you go to the grader page for an essay problem (links to which can now be found by clicking on the set name in the main set list page) you will see the following
As before instructors can mark problems correct, or set the score manually.  Now you can also add a comment to each answer by typing in the left hand box.  You can use LaTeX formatting in your comment using \( and \) and clicking on Preview will show you a formatted version of your comment using MathJax.  Once the grades are saved the student will be able to see your comment if they revisit the original problem page as we see here.
An additional feature is that students can input formatted mathematics using back-ticks ( ` ) as seen in the text box above.  This uses the EV3P processor to format the equations. Note:  If you grade students answers before the submission period is complete then your comment will disappear if the student submits a new answer.  This is intentional since each comment is attached to a specific answer.  Students can still see old comments by viewing past answers.  Past AnswersThere is now the ability to let students to use the "Show Past Answer" functionality.  This can be enabled by setting $permissionLevels{view_answers} = 'student'; in course.conf or localOverrides.conf.  Show Past Answers behaves slightly differently for students.  The two big changes are that they cannot view answers from other students and the answers are no longer colored according to correctness.  The Show Past Answer functionality remains the same for professors (or any one with access to the instructor tools).  Math4 ThemeThe math4 theme basically gives the current WeBWorK interface a bit of a spit shine.  All of the navigation elements are in the same place, but the Twitter Bootstrap css/js scheme has been integrated to give everything a little more style. 
One of the most interesting aspects of this, especially for those of you thinking about creating your own themes, is that this was (very nearly) all done by editing just those files in htdocs/themes/math4.  In particular, clever use of javascript can accomplish a great deal in terms of changing the look of WeBWorK.  For example, lets do a before and after.  Here is the homework sets editor (with the new bootstrap based tabbing menu)Now we will make several changes.  First we will get a new bootstrap theme (superhero) from Bootswatch and put the bootstrap.css file in the /htdocs/themes/math4 folder.  Now we change system.template to use the new bootstrap file using the line <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/themes/math4/bootstrap.css"/>
Next, we have to go into the math.css file and remove or change all of the existing background colors so that the new Bootstrap colors will shine through.  For example we have to remove background:white from .body.  Finally, lets change the table style to add stripes and borders.  We do this by adding classes using jQuery in the math4.js file via the line$('.set_table').addClass('small-table-text table table-condensed table-striped table-bordered');After doing some other tweaks and modifications this is the end result.
There are a great many things that can be done using javascript.  We can dynamically modify the class (and consequently the format) of an object based on its contents.  For example, the code
 if($('.problem_set_table th:contains("Test Score")').length > 0) {$('.problem_set_table').addClass('small-table-text'); }will  cause the Homework Set list to have smaller text in the table when there is a Test Score column (i.e. when there is a gateway set assigned).  We can also use javascript to replace html elements we don't like without modifying the underlying perl modules.  For example, the code
$('td a:has(img[src$="edit.gif"])').each(function () { $(this).html($(this).html().replace(/<img.*>/," <i class='icon-pencil'></i>")); });replaces all of the pencil gifs in with a cleaner pencil icon.  The sky really is the limit here, but the price is doing lots of javascript. 
Categories: Planet WeBWorK

Statistics::RserveClient, a new Perl interface to R

Djun Kim - Sun, 03/31/2013 - 13:25

I'm pleased to announce the first public beta release of Statistics::RserveClient, a Perl module providing an interface for interacting with the powerful open-source R platform for statistical computation.

Using RserveClient, a Perl applications can make a connection to a (possibly remote) Rserve server, send R commands as strings, and receive the results of the evaluation as Perl data structures.

Since Rserve communicates via a binary protocol, computations can return plots and other binary data.

Using RserveClient is straightforward:

read more

Categories: Planet WeBWorK

Statistics::RserveClient, a new Perl interface to R

Djun Kim - Sun, 03/31/2013 - 13:25
I'm pleased to announce the first public beta release of Statistics::RserveClient, a Perl module providing an interface for interacting with the powerful open-source R platform for statistical computation. Using RserveClient, a Perl applications can make a connection to a (possibly remote) Rserve server, send R commands as strings, and receive the results of the evaluation as Perl data structures. Since Rserve communicates via a binary protocol, computations can return plots and other binary data. Using RserveClient is straightforward:
Categories: Planet WeBWorK

VMWare support coming to Vagrant

David Gage - Thu, 03/14/2013 - 14:14

Looks like VMWare support is coming to Vagrant.

Vagrant was mentioned on WeBWorK’s devel list awhile back as a possiblilty for easy dev installs for our developers. At the time I looked at it and decided against putting energy into it because I thought VitrualBox was kind of clunky (I have no argument or evidence to support that by the way…) and the stand alone DMG we had worked well enough for a quick mac dev distro.
I’ve been using VMWare to play with SmartOS for awhile, I’ve also got a couple ubuntu WeBWorK installs on it, and I really like it so far.

If Vagrant is going to support it and, possibly even more exciting, cloud options I think it could become an extreamly useful tool for WeBWorK developers and maybe even for the folks managing WeBWorK installs around the world.

It looks like these new features are set to land sometime in the middle of March, so I’ll keep an eye on it and hopfull have some setups for WeBWorK soon after it’s available.

~WhyThePlatypus

Categories: Planet WeBWorK

WeBWorK::Raleigh -- March 7-11, 2013

Michael Gage - Wed, 03/13/2013 - 21:06
WeBWorK developers from across the US and Canada gathered in Raleigh, NC to work on polishing new WeBWorK features -- some for immediate release and some for later.  The event was hosted at North Carolina State University.  Alina Duca, a faculty member of the NCSU mathematics department, handled local arrangements.  Thank you Alina.

The mathematics department building, SAS Hall, is truly gorgeous, well equipped, light and airy.  I think it's the nicest facility we've used so far at a code camp.

There were a lot of exciting developments. The details will be rolled out over the next couple of weeks as we create thorough descriptions for each feature.

Read more »
Categories: Planet WeBWorK

openwebwork at Raleigh

David Gage - Wed, 03/13/2013 - 12:38

We just finished up another webwork code camp, WeBWorK::Raleigh::2013.
It’s always such a blast, especially when we get to work in such a nice environment. The NC State math building is fantastic.

We’re trying out a new workflow based on git flow that Djun Kim and Davide Cervone put together. There should be a write up for it up on the wiki in the next few days if there aren’t already. It looks like it will be much easier to maintain… of course coming from what we were doing that’s not a hard sell.

The main thing I’m excited about is getting a new WeBWorK API written down. If we can standardise how we send requests and what data we’re guarenteed to get back then a new back end and as many apps and tools that tie into it as we want wont be far behind.

Here’s the API so far. Any and all pull requests, forks, and suggestions help! The idea is to specify what the request and response will be at a minimum so that applications can use it knowing what to expect at the least, but without limiting them to only what’s in the API.

oh! Djun also set up openwebwork.org. It’s really nice to have a good looking face for the project :)

~WhyThePlatypus

Categories: Planet WeBWorK

WeBWork, Raleigh, NC, 2013

Anneke Bart - Mon, 03/11/2013 - 12:27


We just completed a 3-day workshop on WeBWorK. It's interesting to see the directions this is taking.
  • We can now assign free response questions. This was more or less introduced last summer if I remember correctly and the feature has been tested by several people. The submitted answers are listed, and each answer can be graded by choosing a grade 0-25-50-75-100 form a drop down menu. One of my colleagues who tried it said it was fast to grade and easy to use.
  • Instructors can use "achievements" if they choose to. This will assign "badges" to students if they do certain things. For instance if they work a certain number of problems, do problems before a certain time in the morning, etc. This is part of the so-called game-ification of WeBWorK. I have not tried it yet, but when I asked my students last Fall more than half indicated they might find this kinda fun.
  • There are now more problem sets for statistics. Problem sets have been classroom tested at several colleges and universities and are ready to be rolled out. This will be very nice to have as we may expect to be teaching more stats courses due to the increased requirements at the MCAT. 
  • Related to the previous item is work being done to incorporate the statistics package R into WeBWorK. This is still some time off (months???), but that will help developers create more problems more easily.
Those are some of the big ticket items, but there is a lot going on behind the scenes!
Categories: Planet WeBWorK

Summer WeBWorK workshop opportunities

John Travis - Fri, 02/22/2013 - 07:06

In conjunction with the Mathematical Association of America, the WeBWorK leadership team is sponsoring two development workshops this summer dealing with problem authoring and with course creation.
The first is an online-only course "Authoring Effective Homework Problems with WeBWorK" held on Mondays in June and deals with problem authoring starting with the very basics and moving to more advanced techniques.   Information on this workshop is available at http://www.maa.org/prep/2013/homework_ww.html .
The second is the course "Building Model Courses for Online Homework with WeBWorK" which focuses more on how to set up a coherent collection of problems sets for a course.  This workshop involves a couple of online meetings and culminates with a 3.5 day intensive component at the MAA headquarters in DC.  Information on this workshop is available at http://www.maa.org/prep/2013/courses_ww.html .
Registration for any of the MAA PREP workshops is available using the link following the workshop list at http://www.maa.org/prep/2013/ 
Categories: Planet WeBWorK

Math Achievements and WeBWorK

Michael Gage - Thu, 02/21/2013 - 19:06
Now that WeBWorK version 2.5.1.3 is making its way onto more and more servers, I (being Geoff Goehle from Western Carolina University) wanted to write a bit about a new feature available to professors that want to add a bit of fun to the homework process.  WeBWorK instructors now have the ability to create and award "Math Achievements" and "Math Levels" to students for solving homework problems and for practicing good WeBWorK behavior.  In a nutshell, students can earn achievements by meeting preset goals.  For example, they might earn an achievement for solving 3 homework problems in a row without any incorrect submissions, or for solving a problem after taking an 8 hour break.  Earning achievements and solving problems earns students points and after a student gets enough points they will be given a new "Math Level".  After the break I will talk a bit more about what the achievements are and go into detail about how to enable them, modify them, and even create your own achievements.
Read more »
Categories: Planet WeBWorK

Math Achievements and WeBWorK

Geoff Goehle - Thu, 02/21/2013 - 11:31

Now that WeBWorK version 2.5.1.3 is making its way onto more and more servers, I (being Geoff Goehle from Western Carolina University) wanted to write a bit about a new feature available to professors that want to add a bit of fun to the homework process.  WeBWorK instructors now have the ability to create and award "Math Achievements" and "Math Levels" to students for solving homework problems and for practicing good WeBWorK behavior.  In a nutshell, students can earn achievements by meeting preset goals.  For example, they might earn an achievement for solving 3 homework problems in a row without any incorrect submissions, or for solving a problem after taking an 8 hour break.  Earning achievements and solving problems earns students points and after a student gets enough points they will be given a new "Math Level".  After the break I will talk a bit more about what the achievements are and go into detail about how to enable them, modify them, and even create your own achievements.


As I said, achievements are earned by meeting certain goals.  For example, in the following table I have a partial list of achievements available to students.
As you can see there are a variety of achievements, from the relatively mundane like "Perfect 10" to the more exotic like "Night Owl".  When students earn one of these achievements they are given a notification like the one shown below.
Earning achievements and solving problems in WeBWorK gives the students points.  After students earn enough points they are rewarded with a new level, like the one shown above.


 Students can see what achievements are available and check out their progress to the next level by visiting the Achievements link in the Main Menu. (When achievements are enabled this link will be placed under the Grades link.)  A partial screen shot of the Achievements page is shown below.
One of the additional features of this page is that students can click on the button Enable Facebook Integration to integrate the Math Achievements with Facebook.  What this does is give students the opportunity to post a message to their timeline whenever they earn a new achievement or level.   Update:  Facebook integration is still possible, however, because of the way Facebook works its much more complicated to set up. In general these systems are intended to add an element of play and positive reinforcement to WeBWorK. They are actually an example of a larger trend known as gamification.  I won't talk much about the theory behind gamification or the philosophy of this particular implementation here.  Viewers who are interested in learning more about these things should consider reading my paper Gamification and Web Based Homework which is published in the journal PRIMUS.   This paper can be found here.  Rather, in the rest of this post we will take a deeper look at how instructors using WeBWorK (version 2.5.1.3 or higher) can enable, modify and create achievements. 

First, to enable the achievement system visit the Course Configuration link at the bottom of the Main Menu.  In the General category there should be two options Enable Course Achievements and Achievement Points Per Problem.  (If these options are not visible then it is likely that you do not have a new enough version of WeBWorK.)  By changing the value of Enable Course Achievements to True you will turn on the achievement system.  The Achievement Points Per Problem option controls how many achievement points are rewarded for every problem students completely solve.  (This is in addition to points earned through achievements.)Note: By default the Achievement Points Per problem is set to 5.  This value is such that if the default level thresholds are used in a course with approximately 200-230 problems per semester then most students will get to level 9 or 10 by the end of the course.  If you use fewer or more than 200 problems in your courses then you should adjust the Achievement Points Per Problem value in ratio to 200. If you add in additional custom achievements, or change the number of points awarded for achievements then this also affects how quickly students will earn levels.
Once the achievements have been enabled students can see the available achievements, their earned achievements, their current level, their progress to the next level, and enable facebook integration by following the Achievements link in the main menu.  For instructors, managing achievements is done by following the Achievement Editor link under Instructor Tools.  (You may have to reload to see these links.)  By default there will be no achievements listed in the Achievement Editor.  Depending on your set up you may be able to import a  default set of achievements by clicking Import achievements from... and selecting Default_achievements.axp.  (You can also assign the achievements to your students at this time.  Achievements will not be visible to students until they are assigned.)  If you do not have Default_achievements.axp listed in the Import drop down menu then you should download the tar.gz files here and here. The first archive should be uploaded and unpacked using the File Manager into the templates directory. (This is the default directory when you enter File Manager.)  The second should be uploaded and unpacked into the html directory. (This is can be found by clicking on the ^ button to go up a directory from templates.)  Once you have done this you should have the ability to import the default achievements as described above.


After you have imported these achievements and assigned them to your students, either during import or by using the appropriate Achievement Editor option, you should be good to go.  With one exception these achievements are intended to run independently of the content of the course.
The one exception to this are the "Challenge" achievements.  These achievements are awarded for completing challenge problems.  If you don't want to have challenge problems then delete or disable these 11 achievements.  If you do want to have challenge problems then create a set called Challenge with 10 problems and the challenge achievements will work automatically. 
If you ever want to take a closer look at which achievements are being earned, or if you are using achievement levels to award extra credit, then you can actually save the student achievement data to a csv file.  This can be done using the scoring option on the Achievement Editor page.  Once you score achievements the results are saved to a file in the scoring folder, which can be accessed from the File Manager after using the ^ button to go up a directory from templates.  Two other things you can do on the Achievement Editor page are to import and export achievements.  Exporting achievements saves all of the achievement metadata to a file in the achievements folder.  To move achievements to a different course you should then create an archive from the achievements folder and extract it into the templates folder of the other class.  The achievement metadata can then be imported as above.  (Note: you may also need to copy over the achievement folder in the html directory to bring the achievement icons along as well.)


Those of you feeling a bit more adventurous might want to start editing the existing achievements, or even creating your own achievements.  In many ways editing achievement data is similar to editing homework data.  If you click the links in the Edit Users column then you will be presented with a list of the students, as well as their individual achievement data.  By checking the appropriate boxes you can change which achievements are assigned to which students and even manually award and revoke achievements from individual users.  (Note: This will appropriately update their achievement score.)   While most of this is self explanatory, you may find that the "Counter" column is largely empty.  This is used in achievements which have a numerical counter associated to them.  For example there is an achievement for finishing 100 homework problems.  For this achievement the Counter column would contain a number indicating how many problems each student has solved.  This value can also be edited and is used to create progress bars which students can see on the Achievement page.


As for editing the global achievement data, this can be done by clicking on the pencil next to the achievement name or by using the "Edit" option in the Achievement Editor page.  You will end up on a page with a table like the one shown below.

This table has a lot going on.  The left most column contains the current icon of each achievement.  The file name for the icon is contained in the third text bar in the right most column.  These icon files are all located in the "html/achievements" directory.  If you put in the wrong file name then you will end up with broken image links.  If you don't put in any filename into the Icon File entry then you will get a default icon.  Next the Edit link in the right most column brings you to the achievement "evaluator" which I will talk about later.  In the second column you have the Achievement ID, which you cannot edit and is not visible to students.  We also have the Achievement Name, which is the visible title attached to the achievement.  The achievement category is in the third text box in the second column and has a special purpose.
Achievements are always sorted (and evaluated) alphabetically, first by category and then by Achievement ID.  This is why the Achievement ID's and categories (usually) start with numbers.  There is also a subtle visual grouping of achievements into categories on the student Achievement page.  Since there are lots of achievements its useful to be able to sort them by "type".  There are two special categories that deserve to be singled out.  Achievements in the "secret" category will not be visible to the students until after they are earned and are for fun/surprise achievements.  There is also a "level" category.  These are the achievements which are used to determine/control a students Math Level.  If you do don't want to use levels then delete or disable these achievements before assigning any data.  If you want to change the thresholds for levels, you can do that by editing the achievement evaluator for the level achievements. 
Moving on, the third column has controls for if the achievement is enabled or not, how many achievement points the achievement is worth, and, if the achievement is the type which uses a counter, the "goal" for that counter.  For example, in the "Perfect 10" achievement for solving 10 problems, the counter field is 10.  In the last column we have the field which contains a description of the conditions necessary to earn the achievement, the name of the achievement evaluator file, and the name of the icon file for the achievement.  By editing this data you can change a lot about how your achievements look and feel, and even modify the activation conditions for counting type achievements. However, in order to really alter how achievements behave, or to make your own, you will need to edit the evaluator files.


Achievements are implemented into webwork as follows.  Every time a student submits a problem WeBWorK goes through the list of assigned achievements for that student.  For each achievement it loads up a perl script, called the achievement evaluator, and runs that script (in a Safe container).  If the script returns 1 then the achievement is awarded and if it returns 0 then the achievement is not awarded.  This means that all of the heavy lifting for assigning achievements is done by these perl script achievement evaluators.  The evaluators are assigned to a particular achievement as described above and the evaluator files are all stored in the achievements directory in the course templates folder.  At heart an achievement evaluator is nothing more than a perl script that returns a true or false value.  For example, here is the evaluator script for an achievement which is awarded when a student finishes a homework set (100% on every problem) between midnight and 2am.

my @timeData = localtime(time);

#test to see if it is between midnight and 2am
#return 0 if it isn't
if ($timeData[2] > 1) {
     return 0;
}

#if it is check to see if we have finished the set
#return 0 if we haven't
foreach my $problemRecord (@setProblems) {
     if ($problemRecord->status != 1) {
          return 0;
     }
}
    
#if we got this far then the student should be awarded the
#achievement
return 1;


As you can see, the script is fairly straightforward.  The only mysterious bit is how it is checking to see if the students have completed their homework.  When these scripts are run there are a variety of environment variables available.  Some of these variables can be modified so that changes to the variables will persist between calls to the evaluator, and some cannot be modified (or rather they can be modified but changes will not be saved anywhere).  I have listed most of the available environment variables below.  Something to note is that many of the variables (like $problem and $set) have the same structure as in the main WeBWorK code.  

  • $problem : the problem data (changes to this variable will not be saved!)
    This variable contains the problem data.  It is a hash pointer with the following values (not all values shown)
    • $problem->status : the score of the current problem
    • $problem->problem_id : the id of the current problem
    • $problem->set_id : the id of the set containing the problem
    • $problem->num_correct : the number of correct attempts
    • $problem->num_incorrect : the number of incorrect attempts
    • $problem->last_answer : the last answer submitted (stored in a funky format)
    • $problem->max_attempts : the maximum number of allowed attempts
  • $set : the set data (changes to this variable will not be saved!)
    This variable contains the set data.  It is a hash pointer with the following values. (not all values shown)
    • $set->open_date : when the set was open
    • $set->due_date : when the set is due
  • @setProblems : the problem data for all the problems from this set. (changes to this variable will not be saved!)
    This is an array of problem hashes.  Each element of the array has the same structure as the $problem variable above
  • $counter : the user specific counter associated to this achievement (changes to this variable will be saved!)
    If this achievement has a counter associated to it (i.e. solve 20 problems) then this is where you store the students counter for this achievement.  This variable will initially start as the empty string.
  • $maxCounter : the goal for the $counter variable for this achievement (changes to this variable will not be saved!)
    If this achievement has a counter associated to it then this variable contains the goal for the counter.  Your achievement should return 1 when $counter >= $maxCounter.  These two variables are used to show a progress bar for the achievement. 
  • $localData : this is a hash which stores data for this user and achievement  (changes to this variable will be saved!)
    This hash will persist from evaluation to evaluation.  You can store whatever you like in here and it can be accessed next time this evaluator is run.  Two things to keep in mind. The data in this hash will not be accessible by other achievements.  If you plan to store something in this hash you have to write code to initialize the data. 
  • $globalData : this is a hash which stores data for all achievements  (changes to this variable will be saved!)
    This hash will persist from evaluation to evaluation and, like $localData, you can store whatever you like in here.  This data will be accessible from every achievement and is unique to the user.  Like $localData, you need to initialize any variable you plan on using in this hash.  There are two variables stored in this hash that are maintained by the system. 
    • $globalData->{completeSets} : This is the number of sets which the student has earned 100% on.
    • $globalData->{completeProblems} : This is the number of problems which the student has earned 100% on.
  • Warning: The achievements are always evaluated in the order they are listed on the achievement editor page.  To make matters more complicated, achievements which have already been earned are not evaluated at all.  The up-shot of this is that when modifying variables in $globalData you need to either write your code so it doesnt matter which order the evaluators are run in, or you need to pay very close attention to which evaluators are run and when. 

There are a lot of variables available for use in the evaluator.  What is more, it is relatively easy to change the main WeBWorK code to make more variables available to the evaluators.  The only real limitation is that the variable has to be something already lying around inside WeBWorK somewhere.  Two special variables that deserve to be highlighted are $localData and $globalData.  These variables are special because they persist across calls to the evaluator and are generic hashs so that anything can be stored inside.  For example, what follows is the code to an evaluator which checks to see if the student has solved a problem after taking an 8 hour break.

# Initialize the lastattempttime variable.  
# Note: $localData always starts out empty so often
# you will have to include initialization code.
$localData->{lastattempttime} = time() 
      unless $localData->{lastattempttime};

#Check to see if problem was already previously finished, or if 
#they started a different problem or if the time interval isn't 
#long enough.  If so, reset the lastattempttime, lastset and
#lastproblem variables and return false. Otherwise return true
if ($problem->num_correct > 1 ||
$problem->set_id ne $localData->{lastset} || 
$problem->problem_id ne $localData->{lastproblem} ||
abs($localData->{lastattempttime} - time()) < 28800 ){
        #Note: We don't have to initialize the lastset or  
        # lastproblem hash element because ne will return 
        # true if they are undefined.
        $localData->{lastattempttime} = time();
        $localData->{lastset} = $problem->set_id;
        $localData->{lastproblem} = $problem->problem_id;
return 0;
} else {
return 1;
}


Again the code for the evaluator is fairly short.  In fact most evaluators are even simpler than this one.  A common type of achievement that has not been included in the default achievement package, even though the evaluator files and icon files are both present in their respective achievement folders, are those achievements which reward students for solving specific problems, or a certain number of a certain collection of problems.  For example, the following code awards an achievement for solving a particularly hard optimization problem. 
#List the problem/s which will count toward this achievement #as a nested hash, with the set name and problem number as keysmy %validproblems = (     'SetNameHere' => {            '1' => 1,     '3' => 1, },  );
#Check and see if this problem was solved for the first time#and is in the above list of valid problems.  If so return 1.if ($validproblems{$problem->set_id} &&    $validproblems{$problem->set_id}{$problem->problem_id} &&    $problem->status == 1 &&    $problem->num_correct == 1) {        return 1; }
return 0;   

While the code is simple enough, it will depend on the structure of an individual course.  The instructor needs to go to the evaluator and manually enter which sets and which problems count for this achievement.  This type of evaluator can also be modified, for example, to give achievements for solving 20 derivative problems.  For instructors interested in customizing achievements, these are a good place to start.  They are easy to create and will integrate the achievement system with the content of your course, which will in turn increase its effectiveness. 

In general the open ended nature of the achievement evaluators means that the types of achievements that can be created are really only limited by the instructors imagination and their tolerance for perl code.  Once achievements have been implemented they can be exported and imported using the Achievement Editor menu.  It is the author's hope that there might one day be, for example, school specific achievements which are passed around from class to class.  If you have any questions about the achievement system feel free to email me at goehle@gmail.com.  Good luck with your Math Achievements, I hope the current setup treats you well, and to all you students out there, Happy Cheevo Hunting!
Categories: Planet WeBWorK

Setting up mDNS on SmartOS

David Gage - Fri, 02/01/2013 - 06:36

I’ve been working with smartOS alot through VMWare Fusion on my macbook. I was getting sick of looking up IP addresses so I poked around and sure enough mdns was there the whole time..

It took me a bit to figure out how to enable it on the VMs, turns out it’s straightforward. Just running this in a VM should do it.

I also put together a quick script to let me make and name new nodes quickly.

enjoy!

~WhyThePlatypus

Categories: Planet WeBWorK

Upcoming JMM 2013 activities

John Travis - Thu, 11/08/2012 - 19:51
Several activities and sessions involving WeBWorK are scheduled for the Joint Mathematics Meetings in San Diego this coming January:

MAA Minicourse #15:
Thursday January 10, 2013, 1:00 p.m.-3:00 p.m./Saturday January 12, 2013, 1:00 p.m.-3:00 p.m.
WeBWorK: An open source alternative for generating and delivering online homework problems. Room 29D, Mezzanine Level, San Diego Convention CenterPresenters: John Travis, Mississippi College Jason Aubrey, University of Missouri


MAA Session on Assessing the Effectiveness of Online Homework 
Saturday January 12, 2013, 8:00 a.m.-10:55 a.m.Room 5B, Upper Level, San Diego Convention Center
Organizers: 
Jason Aubrey, University of Missouri
John Travis, Mississippi College 
Joanne Peeples, El Paso Community College 
Exhibit Hall BoothWednesday January 9 - Saturday January 12aMAA PavilionContact John Travis travis@mc.edu if you would like to volunteer to help at the booth or if you would like to schedule a presentation at the booth.

BIO SIGMAAReception and Business Meeting, Friday, 6:00 p.m.–7:00 p.m.Guest Lecture, Friday, 7:00 p.m.–8:00 p.m. by Joseph M. Mahaffy, San Diego State University, Modeling and calculus for the life sciences with WeBWorK computer labs.
Wednesday January 9, 2013, 8:00 a.m.-10:40 a.m.
MAA General Contributed Paper Session: Mathematics and Technology, I
 
Room 5B, Upper Level, San Diego Convention Center: 

Wednesday January 9, 2013, 2:15 p.m.-4:50 p.m.
MAA Session on Research on the Teaching and Learning of Undergraduate Mathematics, I
 
Room 3, Upper Level, San Diego Convention Center

Thursday January 10, 2013, 2:00 p.m.-4:00 p.m.
MAA Poster Session of Projects Supported by the NSF Division of Undergraduate Education
 
Exhibit Hall B2, Ground Level, San Diego Convention Center
Categories: Planet WeBWorK

MAA PREP workshop “Authoring Effective Homework Problems With WeBWorK” approved

Paul T. Pearson - Wed, 10/03/2012 - 13:44

The workshop Authoring Effective Homework Problems with WeBWorK, for which I am one of four program directors, was approved by the MAA’s Professional Enhancement Program (PREP), which is partially funded by the NSF. Participants in this series of five online workshops during the month of June 2013 will develop the technical skills necessary to identify, edit, and create high-quality WeBWorK problems. If you are a faculty member interested in participating in this workshop series, please feel free to contact me with any questions. Participants are encouraged to register with interested colleagues in the same university or community. We will only be able to accommodate a limited number of participants, so early registration is encouraged. The other three program directors for this workshop series are Davide Cervone of Union College, Gavin LaRose of the University of Michigan, and John Travis of Mississippi College.


Categories: Planet WeBWorK

Essay Answers in WeBWorK

Michael Gage - Fri, 09/28/2012 - 13:39

Hello everyone,
Geoff Goehle here, writing on Mike's blog.  This post is to advertise a new upcoming feature in WeBWorK, the ability to write and grade “essay” or “discussion” style questions.  Quite a few WeBWorK problems already contain open ended questions, but because answers to these could not be graded by a computer they were not recorded. Now the “Pgessaymacros.pl” macro provides the ability to record these answers and present them to the instructor for manual grading. Follow the jump to see a demonstration of essay answers in action. Read more »
Categories: Planet WeBWorK

Essay Answers in WeBWorK

Geoff Goehle - Fri, 09/28/2012 - 11:30

Hello everyone,
Geoff Goehle here, writing on Mike's blog.  This post is to advertise a new upcoming feature in WeBWorK, the ability to write and grade “essay” or “discussion” style questions.  Quite a few WeBWorK problems already contain open ended questions, but because answers to these could not be graded by a computer they were not recorded. Now the “Pgessaymacros.pl” macro provides the ability to record these answers and present them to the instructor for manual grading. Follow the jump to see a demonstration of essay answers in action. Suppose we would like to implement the problem:The cost to download data using your phone is a linear function of the amount of data downloaded. Suppose it costs $10 to download 1 gigabyte and $12 to download 2 gigabytes.  Find a formula for the cost C in terms of the amount downloaded D.  What do the slope and y-intercept of this function represent?  Normally we could put the second question in the text of the problem, but we could not expect an answer.  However, the following PG code will provide a place for students to submit their interpretations of the slope and y-intercept
DOCUMENT();loadMacros("PG.pl","PGbasicmacros.pl","PGanswermacros.pl","MathObjects.pl");#Load the Essay MacrosloadMacros("PGessaymacros.pl");
$m = random(2,5);$b = random(20,30);Context("Numeric");Context()->variables->add(D => 'Real');$F = Formula("$m D + $b");$y1 = $F->eval(D=>1);$y2 = $F->eval(D=>2);
BEGIN_TEXTThe cost to download data using your phone is a linear function of the amount of data downloaded. Suppose it costs $y1 dollars to download 1 gigabyte of data and $y2 dollars to download 2 gigabytes of data.$PARFind a formula for the cost C in terms of the amount downloaded D. $BRC=\{ans_rule()\}$PARWhat do the slope and y-intercept of this function represent? $BR\{#Put an Essay Box where ever you want a essay type answer\}\{essay_box()\}END_TEXT
ANS($F->cmp());#Essay Boxs use the essay_cmp evaluator.ANS(essay_cmp());ENDDOCUMENT(); If we render this problem and submit an answer we get the following. Notice that the problem is providing a text area for us to input our interpretation. Once we hit submit the text response is saved and we get message saying that this portion of the problem will need to be graded at a later time.  The problem informs us that all of our answers are correct, but if we were to look at the status we would only have 50%.  Also, notice that the answer preview does render some Latex correctly. (Its a bit finicky though...)

After students have answered the essay question a “Needs Grading” link will appear on the instructor's statistics page for the homework set which contains this question. Because the link only appears when there are new answers, and because professor answers are not saved to the answer database by default, the link will only appear after a student submits an answer. After clicking on the grading link you will be presented with a page that contains the following.  Normally there would be many more students listed here, but this gives you the basic idea. Notice that the professor doesn't have any answers recorded. If we look at the student's answer we can see that they got the formula part of the question correct (because of the green text) and their score is currently at 50 percent. The Latex content from the essay response is formatted correctly (again this feature is a bit fragile). After reading their response we can choose to set the student's score to any value using the drop box, or we can click the checkbox to mark the problem correct.
There is still some functionality left to be added to this feature. For example, there currently isn't any way to provide comments back to students and, as usual, there are bugs and glitches to track down. Once its finished, though, this feature should allow instructors who use WeBWorK to ask a wider variety of questions and get students to do more than just “find the right answer”.  
Categories: Planet WeBWorK

Plus de 150 questions webwork traduites en français

Sebastien Labbe - Tue, 08/28/2012 - 01:00
Plus de 150 questions webwork traduites en français
Categories: Planet WeBWorK

Code camp (WeBWorK::Winona)

Paul T. Pearson - Sun, 08/05/2012 - 12:24

I’m attending WeBWorK::Winona code camp for WeBWorK developers from Aug. 5th to 8th. Aaron Wangberg, Alina Duca and I are working on performing statistical analyses of WeBWorK data and visualizing the results. During the code camp, I wrote code that generates a bar graph (in scalable vector graphics format) of some of the statistics on the WeBWorK stats page as a proof-of-concept. Future work in this direction will be to enhance the look and functionality of all of the homework statistics WeBWorK provides to students and teachers by creating a performance dashboard. This dashboard will have easy-to-understand graphs and tables and will provide professors with the real-time data analysis they need to make just-in-time teaching decisions. Independently, Alina Duca put together a model differential equations course from the DE’s problems that I authored during the past year (thanks, Alina!).


Categories: Planet WeBWorK

Pages

Subscribe to WeBWorK aggregator - Planet WeBWorK