The instructions below assume that you have a WeBWorK installation up and running. If not, find out how to set up WeBWorK in their installation manual.
Table of Contents
Plugin installation
- Install and activate the WeBWorK Q&A plugin on your WordPress site.
- (Optional but recommended) Install and activate the WeBWorK Theme, available at https://github.com/openlab-at-city-tech/webwork-theme. Note that webwork-theme is a child theme of Hemingway, which must also be installed for webwork-theme to work.
- Configure WeBWorK (see section below) for connection with the WeBWork Q&A site.
- Create a page on your WordPress site where you want the Q&A functionality to appear, and insert the [webwork] shortcode into the page. For example, on our demo site there is a page called âWeBWorK Q&Aâ where we added the [webwork] shortcode.
- If you are using the WeBWorK Q&A theme or another theme with a âFull Width Templateâ, itâs recommended that you use it for the [webwork] page. WeBWorK Q&A is not currently compatible with sidebars.
- At Dashboard > Settings > Reading, change âYour homepage displaysâ to âA static pageâ, and select the newly-created [webwork] page from the corresponding dropdown.
WeBWorK configuration
- WeBWorK Q&A is enabled by replacing the âEmail Your Professorâ link in WeBWorK with a link to the WeBWorK Q&A page you created above, renaming the button to âAsk For Helpâ.
- You will need the URL for your newly-created [webwork] page. For these instructions, we have assumed that you have set your homepage to display the [webwork] page, so you would use your site URL, for example: https://your.wordpress.site/. If you have chosen another page that is not the homepage, you would use the URL for that page (e.g. https://your.wordpress.site/webwork-page/)
- The Q&A plugin can be enabled site-wide for webwork, or it can be enabled on a course-by-course basis.
- You will need to know the locations of the following configuration files:
- localOverrides.conf is found at /opt/webwork/webwork2/conf/localOverrides.conf when following the standard webwork installation procedure.
- Course.conf is found at the root of each webwork course
- Visit the File Manager after logging into your course
- Use the dropdown to navigate to the root directory for your course (or simply click on the â^â button to the left of the dropdown)
Site-wide configuration
- Edit your webwork ‘localOverrides.conf’ file and add the following lines:
$courseURLs{feedbackFormURL} = 'https://your.wordpress.site/?webwork=1';
- (optional) Rename the button by adding:
$feedback_button_name = 'Ask For Help';
- Any course can âopt-outâ of the Q&A integration by adding the following to their to their course.conf file:
$courseURLs{feedbackFormURL} = '';
(That is a single-quoted empty string. Double-quotes are also okay, just so long as the string is empty.)
Course-by-course configuration
- Edit the course.conf file for your course and add the following line:
$courseURLs{feedbackFormURL} = 'https://your.wordpress.site/?webwork=1';
- (optional) Rename the button by adding the following to course.conf:
$feedback_button_name = 'Ask For Help';
WeBWorK Q&A site configuration
Theme and header image
It is strongly recommended that you use the WeBWorK Q&A theme for the best display of the Q&A functionality. Other themes will work, but may require customization for optimal layout and readability.
The WeBWorK theme comes with a header image but you can also use your own. For the best results, use an image with the same dimensions as the default header.
User accounts
Users must have accounts on your WordPress site or multisite installation and must be logged in to post questions or replies on the WeBWorK Q&A site. Users with Administrator accounts (typically instructors or tutors) will be able to mark answers as âcorrect.â They can also see student names when questions are posted anonymously, flag questions as incomplete, and edit or delete other usersâ questions and replies.
Using LaTeX outside the Q&A functionality
The WeBWorK Q&A plugin handles LaTeX on the Q&A site without the need for a separate LaTeX plugin. However, if you would like to use LaTeX outside of the Q&A functionality, e.g. for documentation or other instructions, you will need to install a LaTeX plugin. This site and the example site both use WP QuickLaTeX, but any WordPress LaTeX plugin will work.
Questions? Comments? Need Help?
Please contact the WeBWorK Q&A team via our support forum if you need help or wish to provide feedback.