openlab-at-city-tech / webworkqa

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

Problem won't load on WW-playground site when logged into WW as student user #43

Closed bree-z closed 7 years ago

bree-z commented 7 years ago

This is similar to but slightly different from #32. I log into WW as student1, go to a problem and click Ask for Help. I log into openlabdev as teststudent and I just see “Loading…”

webwork URL: http://mathww.citytech.cuny.edu/webwork2/WW-Dev/ParabolaVertices-CtS/1/?key=L4c46MYurbvgOXuEFiK06cO1Saicn55C&user=student1&effectiveUser=student1

openlabdev URL: http://openlabdev.org/webwork-playground/?post_data_key=webwork_post_data_7a39635151fdd030ef68019c40a5acd0#/problem/

If I close the tab, go back to the WW problem, and click Ask for Help again, the problem still doesn't load.

I tried a few different problem sets, and also tried not submitting any answers, or after submitting a wrong answer.

I don't have this problem when logged into my own account.

studentuserloading

boonebgorges commented 7 years ago

Thanks for the detailed report, @bree-z !

@drdrew42 This problem is being caused because the source problem doesn't contain the "library ID" in the problem text. I am using this ID to individuate problems on the WP side, so it's critical that it exist. The code that I'm using to parse out the problem is here: https://github.com/livinglab/webwork-for-wordpress/blob/fb1653c68f398e07730a505ab88abbfaed066b7d/classes/Server/Util/ProblemFormatter.php#L291 - basically, anything that comes before .pg. It could be hidden with CSS, but it needs to be present.

In the long run, we can think about whether there's a better system for individuation than this, or whether we can come up with a more consistent standard for listing the library ID in the problem text. But for now we must ensure that it exists in one way or another.

drdrew42 commented 7 years ago

Whew. Okay, I've found the configuration setting that enables the display of the problem path for all users, not just instructor accounts. This should now be resolved.

moui72 commented 7 years ago

seems to be working

boonebgorges commented 7 years ago

Thanks!