openlab-at-city-tech / webworkqa

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

Updates to faculty email notification #162

Closed boonebgorges closed 5 years ago

boonebgorges commented 5 years ago
boonebgorges commented 5 years ago

cc @drdrew42 - Can you give me the format for the URL that will be needed for the first of these bullet points? I'm assuming it's just the question URL (where the original "Ask a Question" link was clicked)?

drdrew42 commented 5 years ago

This is a link that should be provided as part of the POST data from WeBWorK when the "Ask for Help" button is clicked.

It is the URL for the question, with a few additional parameters - primarily euser=foobar - which cause the URL to make "foobar" the effective user (showing their randomized version of the problem, along with making their previous responses available).

boonebgorges commented 5 years ago

Thanks, @drdrew42. Can you confirm that it's returnUrl in https://github.com/livinglab/webwork-for-wordpress/issues/119#issuecomment-447477832? That URL, which has the format /webwork2/AchievementTesting/MAAtutorial/5/?key=gC3lBzgIJa9dKLstW8EL5LuBOUBdCgK6&effectiveUser=aparker&displayMode=MathJax&showOldAnswers=1&user=aparker, is relative to the web root, and contains user and effectiveUser params, but not euser.

bree-z commented 5 years ago

Looks like we need @drdrew42 's feedback for this one.

And is this something I can test on WeBWorK playground? Currently I don't see any email notifications in either the OpenLab email or my own email.

Thanks!

drdrew42 commented 5 years ago

No, it is emailURL that should be sent to the instructor. It only specifies effectiveUser, which allows for the instructor to log in with their own account (and still 'pretend' to be this student).

returnURL is only for immediate use, to return the user back to their previous page. The URL contains a key-value that will expire. I should actually remove it from being passed to OL in the first place. No one should be attempting to log into WeBWorK with a pre-defined user (especially if it is not yourself - that is why we have effectiveUser).

boonebgorges commented 5 years ago

Thanks, @drdrew42 . A version of this is now ready to test on openlabdev.org. The relevant text of the instructor email is:

`To read and reply to the question, visit http://openlabdev.org/webwork-playground/wp-login.php?redirect_to=http%3A%2F%2Fopenlabdev.org%2Fwebwork-playground%2F%23%3AproblemId%3Dlocal%2FComplexFractions-Method2%2Fsingle-binomial-easy.pg%3AquestionId%3D11862.

To view the student's work on this question in WeBWorK, visit http://mathww.citytech.cuny.edu/webwork2/WW-Dev/ComplexFractions-Method2/16777216/?effectiveUser=bgorges.`

boonebgorges commented 5 years ago

@bree-z The WW-Dev course on openlabdev.org wasn't associated with any email addresses. I've now associated it with your work bree.bz email, so you should get notifications.

bree-z commented 5 years ago

Thanks, Boone! I am getting notifications, and can confirm the following:

  1. If a student posts a question anonymously, I see the student's name in the email.
  2. If not logged in to WW playground, I'm prompted to log in, and then am taken to the question. If logged in already, I'm taken directly to the question.
  3. The text to view the student's work on the question in WeBWorK appears in the email notification and if I click on the link I end up at the correct question.

One question though: I'm not sure what I'm supposed to see on the WW question page. I just see the question, but should there be anything else, like what the student has attempted? However, I'm not sure I'm doing the "attempted work" part correctly. Here's what I did:

Student

WWQuestionStudentView

Faculty

WWQuestionFacultyView

drdrew42 commented 5 years ago

This is working as it should - the key is noticing in the upper right-hand corner, "logged in as bzuckerman" and underneath "acting as student1"

If "student1" had actually submitted answers (only available during the "open" window for the problem set - this is due to certain unfortunate WeBWorK structures) instead of checking answers, then the student responses would appear in the answer blanks when viewing the problem as the instructor. Furthermore, there is the button at the bottom, "Show Past Answers", which again is unfortunately limited to viewing submitted answers, and does not show checked answers. UGH!

Your confusion here is certainly understandable.

boonebgorges commented 5 years ago

Cool - it sounds like this is, in fact, working as expected :-D