openlab-at-city-tech / webworkqa

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

403 on "question answered my question" #102

Closed moui72 closed 7 years ago

moui72 commented 7 years ago

Tested on Windows 10 / Chrome 60+ http://openlabdev.org/webwork-playground/#:problemId=local/ComplexFractions-Method2/single-binomial-easy.pg:questionId=11132

I'm not 100% of the intended functionality here. When I am logged in as faculty, all responses on all questions have the "this answered my question" checkbox. However if I click that checkbox for a response to a question that I did not ask, it will visually look like it worked, but a page refresh will revert the question to unanswered. The javascript console reveals that in fact the AJAX POST request is being met with a 403 response from the server. It seems like boxes I am not allowed to check should be hidden, and if I should be allowed to check this, there's an access control issue on the backend.

index.js?ver=4.8-1.7.11:7898 POST http://openlabdev.org/wp-json/webwork/v1/responses/11494 403 (Forbidden)
boonebgorges commented 7 years ago

Related: #98

You're correct that users should only see the checkbox if they have the ability to mark a response as an "answer".

Can I get clarification on which direction we're going here? Should faculty members have the ability to mark responses as answers? Keep in mind that we're not able to distinguish between faculty members teaching different sections.

moui72 commented 7 years ago

I'll ping @jennaspevack and @drdrew42 via email

drdrew42 commented 7 years ago

Yes, I believe that faculty members should have the ability to check off this box. Especially so if our only alternative is to leave it solely to the student-owner of the question.

jennaspevack commented 7 years ago

Sounds good to me!

boonebgorges commented 7 years ago

Thanks for the clarification, all. This should now be resolved.

moui72 commented 7 years ago

yep!