Difference between revisions of "OPL Problem Statistics"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 80: Line 80:
   
 
===Contributing your Local Data to WeBWorK's Global Database===
 
===Contributing your Local Data to WeBWorK's Global Database===
The global statistics displayed come from the voluntary contributions of institutions all over the world using WeBWorK. Obviously the more institutions that contribute data, the more accurate the data will be and the more valuable the data will be to instructors when selection problems. Contributing your Local Data to WeBWorK's Global Database is very easy and consists of running the script
+
The global statistics displayed come from voluntary contributions of institutions all over the world using WeBWorK. Obviously the more institutions that contribute data, the more accurate the data will be and the more valuable the data will be to instructors when selection problems. Contributing your Local Data to WeBWorK's Global Database is very easy and consists of running the script
+
<code>upload-OPL-statistics</code> which basically sends a compressed version of your <code>OPL_local_statistics</code> table to WeBWorK's repository.
<code>OPL_local_statistics</code> table
+
====The upload-OPL-statistics script====
 
   
   

Revision as of 23:53, 10 December 2015

Construction.png This article is under construction. Use the information herein with caution until this message is removed.


In a future version of WeBWorK (probably 2.12) the Library Browser will optionally display local and global data about problems, specifically the number of individuals who have attempted the problem, the average number of attempts on the problem and the average status earned on the problem. Local data represents usage at your institution and global data represents the sum of all local data contributions. This page provides information on OPL Problem Statistics for Instructors and WeBWorK Administrators.

The display

The display in the Library Browser looks like

OPL Statistics.png

where obviously the data displayed in the image above is not realistic.

Information for Instructors

Statistics are only displayed for OPL problems for which local and/or global data exists (you will not see all 0's). Data is not collected nor displayed for non OPL problems. The display of local and/or global data can be disabled for an individual course or for all courses. If you are not seeing any data please ask your WeBWorK administrator to enable the display of data.

Following is a description of the data displayed.

GLOBAL Usage

Global data on problem usage is contributed by many institutions using WeBWorK all over the world. The Usage figure is the total number of individuals from contributing institutions who have attempted this problem at least once. A high figure represents a problem which has been assigned to many students and is both popular with instructors and likely bug free.

GLOBAL Attempts

The Attempts figure is the global average of the number of attempts (both correct and incorrect) individuals take on this problem. A high figure may represent a difficult problem. Note that problems with multiple parts may have higher average attempts since many students will submit an answer to each part before continuing and each such submittal counts as an attempt.

GLOBAL Status

The Status figure is the global average of the Status individuals have earned on this problem. The Status is the percentage correct (from 0% to 100%) recorded for the problem. A low figure may represent a difficult problem. The Status is often fairly high since many students will work on a problem until they get it correct or nearly so.

Reviewing a problem and looking at both the average Attempts and average Status should give instructors valuable information about the difficulty of the problem.

LOCAL Usage

Local data on problem usage is generated and maintained by your institution. The Usage figure is the total number of local individuals who have attemtped this problem at least once. A high figure represents a problem which has been assigned to many students and is both popular with instructors at your institution and likely bug free. Local data is generated when your systems admin runs the standalone script update-OPL-statistics or, assuming the display of local data is enabled, the script OPL-update.

LOCAL Attempts

The Attempts figure is the local average of the number of attempts (both correct and incorrect) individuals at your institution take on this problem. A high figure may represent a difficult problem. Note that problems with multiple parts may have higher average attempts since many students will submit an answer to each part before continuing and each such submittal counts as an attempt.

LOCAL Status

The Status figure is the local average of the Status individuals at your institution have earned on this problem. The Status is the percentage correct (from 0% to 100%) recorded for the problem. A low figure may represent a difficult problem. The Status is often fairly high since many students will work on a problem until they get it correct or nearly so.

Reviewing a problem and looking at both the average Attempts and average Status should give instructors valuable information about the difficulty of the problem.

Information for WeBWorK Administrators

Enabling and Disabling the display of OPL Problem statistics

The display of both global and local OPL Problem statistics in the Library Browser is enabled by default for all courses in the defaults.config file:

$problemLibrary{showLibraryGlobalStats} = 1;
$problemLibrary{showLibraryLocalStats} = 1;

Either or both can be disabled by setting the above values to zero (0) in the localOverrides.conf file.

Either or both can be enabled or disabled for an individual course by setting the above values to one (1) or zero (0) in the course's course.conf file.

Generating Global OPL Problem statistics

Global OPL Problem statistics data is contained in a file ('give name of file') which is distributed with the OPL. Downloading the current version of the OPL with git will automatically retrieve the latest version of this file. Assuming $problemLibrary{showLibraryGlobalStats} = 1 is set for the server, then whenever the script OPL-update is run to update the OPL, the file ('give name of file') will be processed and a MySQL table OPL_global_statistics will be created which contains the global data for display.

Generating Local OPL Problem statistics

No local OPL Problem statistics data will be displayed unless this data is first generated for your server.

This data is generated in one of two ways. First, if $problemLibrary{showLibraryLocalStats} = 1 is set for the server, then whenever the script OPL-update is run to update the OPL, the local OPL Problem statistics data will be automatically generated. The second method is to run the standalone script update-OPL-statistics. Actually running OPL-update when $problemLibrary{showLibraryLocalStats} = 1 just calls update-OPL-statistics after indexing all the OPL problems. Either method creates a MySQL table OPL_local_statistics which contains the local data for display. All scripts are found in the standard directory /opt/webwork/webwork2/bin/. While the script update-OPL-statistics can be be run at any time and as often as one wants, it is recommended that script be run at the end of every term or semester after WeBWorK assignments due dates have passed. Note that no data will be collected for assignments whose due date has not passed at the time the script is run nor will any data be collected from archived courses. This is the reason we recommend running the script update-OPL-statistics at the end of semesters.

How Accurate Local Data is Maintained

Data is collected from all closed (due date has passed) homework sets and this is done in such a way that old data (e.g. from courses deleted since the last time the script was run or from courses that are reused by deleting old students and adding new ones or just old courses that remain on the server) is saved and new data is properly appended.

Specifically the script update-OPL-statistics first checks whether the MySQL table OPL_problem_user exists and creates it if it does not exist. If this table exists, new data will be appended to it. Maintaining this table is the key to maintaining accurate local OPL problem statistics data at your institution. If you bring a new server online, even if you choose not to bring over the whole webwork database, you should definitely transfer over the OPL_problem_user table.

The OPL_problem_user table contains rows with the following type of data

+--------------+-----------+--------+------------+------------+--------------------------------------------------+--------+-----------+-------------+---------------+
| course_id    | user_id   | set_id | due_date   | problem_id | source_file                                      | status | attempted | num_correct | num_incorrect |
+--------------+-----------+--------+------------+------------+--------------------------------------------------+--------+-----------+-------------+---------------+
| myTestCourse | admin     | test   | 1447649940 |          1 | Library/Rochester/setDerivatives7Log/mec1.pg     |      1 |         1 |           1 |             1 |
+--------------+-----------+--------+------------+------------+--------------------------------------------------+--------+-----------+-------------+---------------+

This is a subset of the data contained in the CourseName_problem_user, CourseName_problem and CourseName_set tables. After the OPL_problem_user table is updated with new information, the update-OPL-statistics script reads through the OPL_problem_user table and collects information on usage and average status and average number of attempts and puts this information in a new table OPL_local_statistics (first deleting an old version if it exists). For example, if the OPL_problem_user table contains only the information above, then the OPL_local_statistics table would look like

+--------------------------------------------------+--------------------+------------------+----------------+
| source_file                                      | students_attempted | average_attempts | average_status |
+--------------------------------------------------+--------------------+------------------+----------------+
| Library/Rochester/setDerivatives7Log/mec1.pg     |                  1 |                2 |              1 |
+--------------------------------------------------+--------------------+------------------+----------------+

This sample table shows only one student attempted the problem and they got it 100% correct after 2 attempts (not very realistic but it illustrates the point). The Library Browser uses the information in the OPL_local_statistics table to display the the local information illustrated in the screen shot above. Global information comes from the OPL_global_statistics table which has exactly the same structure as the OPL_local_statistics table.

Contributing your Local Data to WeBWorK's Global Database

The global statistics displayed come from voluntary contributions of institutions all over the world using WeBWorK. Obviously the more institutions that contribute data, the more accurate the data will be and the more valuable the data will be to instructors when selection problems. Contributing your Local Data to WeBWorK's Global Database is very easy and consists of running the script upload-OPL-statistics which basically sends a compressed version of your OPL_local_statistics table to WeBWorK's repository.

The upload-OPL-statistics script

so, as you can see, there is no student identifying data being requested.

In order to get this project (which is a small and independent part of the WeBWorK "Big Data" project) off the ground, we need global data. Hence this personal request for data from your institution.

If you are interested in contributing (and we hope you are), the process is very easy. First download two scripts with the following commands:

wget --no-check-cert https://raw.githubusercontent.com/goehle/webwork2/dbscript/bin/update-OPL-statistics wget --no-check-cert https://raw.githubusercontent.com/goehle/webwork2/dbscript/bin/upload-OPL-statistics

You can put them in /opt/webwork/webwork2/bin/ if you want. They should run on any recent version of WeBWorK but have only been tested on 2.7, 2.9 and 2.10. Run perl update-OPL-statistics which generates the OPL_local_statistics table. In the future you should probably run update-OPL-statistics at the end of every semester. It harvests data from all closed (due date has passed) homework sets and is written so that old data (e.g. from courses deleted since the last time the script was run or from courses that are reused by deleting old students and adding new ones or just old courses that remain on the server) is saved and new data is properly handled. It does not retrieve data from archived courses.

Then maybe you should contact your IRB office and tell them that you are planning on contributing data and show them the OPL_local_statistics table (or the sample above) so they can see that no student identifying data is involved. After receiving their blessing, to upload the data, run the command perl upload-OPL-statistics

That's it. Your local data will get sent to a server that Geoff Goehle (who has written most of the code for this project) is maintaining. The resulting OPL_global_statistics table will be distributed as part of the OPL.

If you are interested in seeing how this actually works in the Library Browser, do the following on your development system.

git checkout origin/develop git pull http://github.com/goehle/webwork2.git dbscript Update localOverrides.conf from localOverrides.conf.dist and run apachectl restart

Then run update-OPL-statistics if you haven't run that yet. Also it's a good idea to first update the OPL if you haven't done that in awhile. Either turn off the global data option (in localOverrides.conf) or create a fake OPL_global_statistics table, e.g a copy of OPL_local_statistics (maybe very soon with your help we will have a real OPL_global_statistics table available). Note that if no data is available for a problem you are looking at in the Library Browser, you will not see labels with 0's displayed.

Thanks for any help you can give us with this and feel free to write with any questions, comments or suggestions.

Sincerely,

Arnie