KB1296 - Creating a direct link to a WeBWorK activity

Usually, a WeBWorK course is integrated with a Moodle course by using a pre-configured External Tool created by eLSupport. While this provides Students with an easy, "no login" way to get to the front page of their Instructor's WeBWorK course, it's got a limitation that the Student must navigate through the WeBWorK course to find the specific Homework Sets or Gateway Quizzes that they need to complete.

But what if you want to lead your Students directly to one specific Homework Set or Gateway Quiz, to make their navigation easier?​​​​

H​​​ere's a solution that makes navigation a bit easier, but has issues with scoring in the Moodle grader report.)

Creating a direct link to a WeBWorK activity

Here's how to create a custom External Tool to take your users directly to an individual WeBWorK activity:

  • On a new browser tab, open VCC's WeBWorK system by surfing to https://webwork.vcc.ca/webwork2/
  • In the list of courses, click on your WeBWorK course. (In this example, we're using showing the "WeBWorK-Experience-Course")
    (You may need to login to access WeBWorK.)
    You will see a screen like this:

  • Click on the Homework Set or Gateway Quiz that you want to create a direct link to. You'll be taken to the first page of that set or quiz.
  • Copy the URL from the address bar (e.g. https://webwork.vcc.ca/webwork2/WeBWorK-Experience-Course/WeBWorK_Sample_Problems/).
    This is the direct web link that leads into the activity.
  • In your Moodle course, with editing turned on, add a new "External Tool" activity:

  • You'll see the "Adding a new External Tool" setup page:

  • In the "Activity Name" field, enter a name for this WeBWorK activity (e.g. the name of the activity as seen in WeBWorK).
  • Click the little "Show more..." link to expand the other available options.
    • For "Launch Container", select "New window" (so that WeBWorK opens in its own tab/window).
  • In "Tool URL" field, paste in that WeBWorK activity URL.
  • Farther down the page, expand "Privacy" and decide if you want to allow the user's name and email address to be provided to this tool.
    If you want this tool to publish a grade back to Moodle, leave "Accept grades from the tool" enabled.
  • Expand "Grade" if you want to change the activity's maximum Grade (for the Moodle course Gradebook).
  • Save your settings.

Back in your Moodle course, click on the new External Tool to ensure that your WeBWorK activity opens properly in a separate browser tab or window.
You can add these direct links wherever they would help your Students. 

Issue: Incorrect scoring on individual activity links

IMPORTANT: The marks shown in the Moodle Gradebook on these individual direct links do not match the grades you will see in WeBWorK. WeBWorK's grades are correct, and in this case, Moodle's grades on each of these direct activities are not correct.

Even though each of these manually-created individual activity links will show up as a separate grade item in the Moodle course's Gradebook, the scores transmitted to Moodle are not the individual scores for one activity - they remain the combined total score from all the activities in the WeBWorK course. (This limitation is due to the version of LTI used to connect WeBWorK to Moodle.)

This screen shows that Student Bilbo has earned 4 out of 5 on his Homework Set, yet that score doesn't show up as such in the Moodle Gradebook:

In the screen above, you can see that Bilbo's score on the "WeBWorK Sample Problems" homework set is 4.00 out of 5. Below that, his total score for all the WeBWorK activities he had completed is 6.25 out of 10.

Over in the Grader Report of the Moodle course where we integrated this activity, the grading item for the direct link external tool we just added should reflect that "4 out of 5" mark that we see in WeBWorK, but it does not. In fact, you will see that all the gradable items for WeBWorK custom external tool activities will reflect the student's total score of all activities.


  • This method can provide an easier path for your learners to access the WeBWorK activities that are most relevant to them.
  • Because of the scoring issue above, if you need to use this method, it may be advisable to either not publish grades from WeBWorK into Moodle (by disabling the setting "Accept grades from the tool" in the External Tool, or by hiding or removing the related grade item in your course's Gradebook Setup page. (You may also tell your learners to disregard the WeBWorK scores in Moodle's Gradebook, and trust the grades that they see inside WeBWorK itself.