openlab-at-city-tech / webworkqa

WeBWorK integration for WordPress and BuddyPress
GNU General Public License v2.0
4 stars 2 forks source link

Library ID should not be parsed from the problem text #169

Closed boonebgorges closed 3 years ago

boonebgorges commented 5 years ago

See https://github.com/livinglab/webwork-for-wordpress/issues/119#issuecomment-505097865

After https://github.com/livinglab/webwork-for-wordpress/issues/119#issuecomment-447477832, problemSource is part of the POST data that comes from WeBWorK. This, should be used to identify the Library ID, instead of parsing from the content.

This is a pretty easy technical change, but before making it, I want us to be collectively clear about how/whether WeBWorK must be configured to send the problemSource data. I'm not 100% sure whether the mods made by @drdrew42 are hotfixes to his specific WW installations, or whether they're improvement that have been accepted by the WW team and included in the release version of the software, or something in between those two.

drdrew42 commented 5 years ago

So far, my modifications to send more POST data are only local changes.

I will put these into a PR for the WW team for the next release.

Best case scenario, I think, is that we look for the libraryID in both places -- because not all WW installations stay up to date. This means outdated WW versions will still default to sending the libraryID in the body of the problem, and updated WW versions will send it separately in the POST.

boonebgorges commented 5 years ago

Yes, the same thing had occurred to me (look first for problemSource). Please keep me apprised with the progress of the WW PR!

drdrew42 commented 5 years ago

https://github.com/openwebwork/webwork2/pull/957

drdrew42 commented 5 years ago

Updated PR on the WeBWorK side, some key names may have changed slightly.

openwebwork/webwork2#986

Note that the following key-values have been added to the POST package:

drdrew42 commented 5 years ago

162 used emailURL which has now been renamed emailableURL and there is perhaps another change from name to studentName

This issue, #169, uses the renamed problemPath -- taking the place of what was previously problemSource -- in providing a value for our libraryID

119 should use notifyAddresses for sending out notifications when a question is asked

boonebgorges commented 5 years ago

Thanks for your continued work on this, @drdrew42.

I've made some changes so that the plugin now recognizes and stores the new values that you're sending over.

Importantly for the purposes of this ticket, the problemPath variable is now being relied on for libraryID. If problemPath is not available, the plugin tries to pull the path out of the problem content, as things worked originally.

I'm moving this to "testing" status with the caveat that we shouldn't begin any testing until we've confirmed with each other that the WW-Dev (and CT production WW server, when we launch for Spring) are running the most recent patched versions of WeBWorK.

drdrew42 commented 5 years ago

Will do. Thanks for your work on this as well - I’ll update early next week and confirm here. Then testing can begin whenever is convenient.

drdrew42 commented 4 years ago

This is a note to myself that a second course will need to be created in WW I will need to spin up a VM with WW-2.14 to test that the "old" way still works, for those WW installations that may not have updated to WW-2.15 (and won't have the expanded set of key-value pairs).

bree-z commented 3 years ago

Hi Boone - I think this looks good. Just to confirm, I just asked four questions from Functions - Difference Quotient: Problem 1 (http://146.111.135.122/webwork2/WW-Dev/Functions_-_Difference_Quotient/1). They have the following URLs on the test site:

https://hardg.com/webwork/#:problemId=CUNY/CityTech/Precalculus/setDifference_Quotient/intro-diff-quot.pg:questionId=28 https://hardg.com/webwork/#:problemId=CUNY/CityTech/Precalculus/setDifference_Quotient/intro-diff-quot.pg:questionId=29 https://hardg.com/webwork/#:problemId=CUNY/CityTech/Precalculus/setDifference_Quotient/intro-diff-quot.pg:questionId=30 https://hardg.com/webwork/#:problemId=CUNY/CityTech/Precalculus/setDifference_Quotient/intro-diff-quot.pg:questionId=31

Thanks!

boonebgorges commented 3 years ago

Yup, it looks like it's working. Thank you!