-
-
Notifications
You must be signed in to change notification settings - Fork 166
Feedback form expansion - REVISED #986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Since this is a PR for develop and not planned for inclusion in WW 2.15, I think you may need to:
|
|
This PR has conflicts with develop. I need guidance as to which changes to accept in the Problem.pm file |
|
@drdrew42 -- Andrew could you take a quick look and revise this pull request so that it doesn't have conflicts with develop? Thanks. |
|
Thankfully, that can be done without a development environment ;) |
|
Checked standard reporting of feedback by email. Looks good. |
The setName and problemNumber were unavailable when called from the Feedback page because the calling path contained in $r has changed Perhaps there is a simpler fix than what I have done The bug appeared around August 17, 2019 SHA b231339 "moved email retrieval to WW::Utils and was merged into develop branches around December 29,2019 with PR openwebwork#986 "refactoring...." SHA abf5a80 This was a tough bug to track down
|
I'm essentially using the I think there is an issue with this PR. The Email Instructor messages are no longer returning a link to the precise location from which a student sent the message. For example, if I go into a problem set, go to problem #2, click Email Instructor, and send a test message, I receive a message with this in it: But the link should at least include the problem set and problem number. Also these links have included selectors like this in the past: I think this PR is the source of the change in behavior because the |
|
Seems I too see the email issue, and links now don't go to the problem the email was sent form, as it isn't included in the url anymore. Thanks for sharing this info. |
feedback page. This was introduced in pull request openwebwork#986. That pull request switched from obtaining the set and problem ids cached in the WeBWorK::ContentGenerator::Problem object to attempting to find the set and problem ids from the url parameters. The problem is that the feedback page does not have those url parameters.
Purpose
Our institution uses the feedbackMacro_form function to direct students to ask questions on a Q&A site (https://openlab.citytech.cuny.edu/ol-webwork) where their questions are aggregated based on having the "same" problem (same pg file, different seeds). That way students have an FAQ on a per-problem basis.
We need some additional info from WeBWorK because the Q&A site does not share accounts with WeBWorK.
Description
Okay, so - as suggested ( #957 ) - I restructured my expansion of (the necessary, for our Q&A WordPress plugin) form data sent through the
feedbackMacro_formfunction.I removed my changes from
ContentGenerator.pmand instead expanded the parameters passed tofeedbackMacrowhen it is called fromoutput_email_instructorinCG\Problem.pmandoutput_footerinCG\ProblemUtil\ProblemUtil.pmIn the process, I found multiple clusters of repeated code - so I shifted them into their own subroutines in WeBWorK::Util. The repositioned code now comprises two new subroutines:
fetchEmailRecipientsandgenerateURLs(which are made available through ContentGenerator.pm). These new functions helped to simplify the process of adding to the form data sent through the feedbackMacroPlease forgive the somewhat-large diffs on ContentGenerator.pm and Problem.pm - I have been using Atom as my editor, and it auto-strips trailing whitespace. The only relevant change to ContentGenerator.pm is line 62 (loading the new functions from Util); and in Problem.pm, the only meaningful change is to
output_email_instructorstarting on line 2116.Testing
$courseURLs{feedbackFormURL} = 'http://localhost/test.php';$feedback_button_name = "Test the PR"New data provided
emailableURL => http://localhost/webwork2/CourseID/problemSetName/problemNumber/?showOldAnswers=1&effectiveUser=student&displayMode=MathJax
(this was the only thing instructors missed about the email instructor button - we bring it along so that the Q&A site can include it with the notification email)
randomSeed => 2013
(not used by our Q&A site yet, but may be useful in re-rendering the student's problem -- XMLRPC -- instead of decoding the pg64 string that gets sent)
notifyAddresses =>
Administrator <fake@email.com>;"Prof. Lastname" <lastname@uni.edu>(all users who have permission to receive feedback emails - now our Q&A site is informed of who should receive notification that this user asked a question...)
problemPath => local/folder/some-problem.pg
(this is our unique ID for problems. It maintains a consistent basis for identifying "identical" problems when instructors can remove or reorder problems...)
studentName => active user's Full Name
(because our Q&A site does not share single sign-on with WeBWorK - so we can send notifications to instructors/TAs and they 100% know who the student is)