openlab-at-city-tech / webworkqa

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

Ability to post question anonymously #151

Closed boonebgorges closed 5 years ago

boonebgorges commented 5 years ago

Allow students to post their questions anonymously by adding checkbox and text: “Post this question anonymously. Only your professor will see your name.” a. The student’s name will be communicated to faculty in the email notification they receive from OL-WW when a student posts a question.

When students choose to post anonymously (see B1 below) Change question title text (A Question from…) to: “Question from a Student”

boonebgorges commented 5 years ago

I've just pushed a first version of this to openlabdev.org. Here's a brief gif:

Peek 2019-04-29 12-58

A few assumptions and questions:

  1. I assume we want this box unchecked by default.
  2. The "Question from a Student" text is the only indication that a question is anonymous. There's no way for instructors to see the user's actual name, except by looking at the text of the email notification. IMO it would be nice to show this text to instructors, but (a) we don't have fine-grained control that allows us to show the name only the specific instructor for the section, and (b) showing the name without also indicating to the instructor that the question is anonymous (for other students) feels like a recipe for confusion. So it might be worth some additional UI here - maybe anon questions should show the regular "A question from Foo Bar" when viewed by instructors, but there should be a special visual indicator that it's an anonymous question, with some helpful hover text. Or perhaps the generic "Question from a student" text could be kept, but instructors will see an additional bit of UI that shows the user's real name, either statically or on hover/click.
boonebgorges commented 5 years ago

Another item to add to my list:

  1. The 'anonymous' flag applies only for questions. If a faculty member responds, and then the author responds to that response, the response will not be anonymous. Should it be? Perhaps the author's responses should automatically be anonymous when on their own anonymous thread? A manual toggle for anonymous responses seems both cumbersome and likely to lead to bad behavior.
jennaspevack commented 5 years ago
  1. Yes.

  2. How about "Question from a student" text is kept, and the word "student" gets a tooltip with the student's name or the real name just replaces the student text on-focus/on-click?

Maybe use text-decoration: underline #0043af dotted or similar to indicate tooltip/hover?

Not sure if this is what you had in mind...

  1. I think if a student posts a question as anonymous all replies should be the same.
boonebgorges commented 5 years ago

Maybe use text-decoration: underline #0043af dotted or similar to indicate tooltip/hover?

Sounds good. I'll work on this next week.

I think if a student posts a question as anonymous all replies should be the same.

All replies? Or all student replies? Or all replies by the original question author? The latter seems "correct" to me - and maybe the reply title can be something like "Question Author" or something like that, in place of where the user name would be? See screenshot for a reminder of how the reply author names appear.

Screenshot_2019-04-30_13-09-08

jennaspevack commented 5 years ago

Yes, all replies from the anonymous student who originally posted the question.

Just to clarify I'm assuming that if another student replies to a question they don't have the option of posting anonymously. My understanding was that it was just for questions.

"Question Author" sounds good.

boonebgorges commented 5 years ago

All sounds good. Thanks for confirming!

boonebgorges commented 5 years ago

Here's a first pass at the hover tooltip. Visible only to instructors/admins: Peek 2019-05-01 14-33

It's better to make the entire string hover-able, for translation reasons. Note that I'm using the same tooltip styling/behavior as the "Join / login to like" tooltip. @jennaspevack If you're happy with the way this looks, I'll apply it to anonymous replies as well.

boonebgorges commented 5 years ago

The 'Question Author' functionality has now been implemented. (That is: in a thread of replies to an anonymous question, replies written by the original question author have the title 'Question Author' rather than the user's name.) I went ahead and implemented the "real name" tooltip for this as well, though it can easily be changed if we decide we'd like a different UI.

bree-z commented 5 years ago

Thanks, Boone! This is working as expected and the tooltip looks good to me!

@jennaspevack not sure if you want to take a look at the tooltip, but otherwise we can close this, thanks!

jennaspevack commented 5 years ago

Thanks Boone!

The tooltip background color doesn't pass WAVE. Could we change that tooltip box .__react_component_tooltip.type-info to background-color: #c4c4c4 and text color: #000?

And also the little triangle, .__react_component_tooltip.type-info.place-top:after border-top-color: #c4c4c4?

Example: https://www.dropbox.com/s/9qboats98ra0dlt/anonomous-hover.png?dl=0

I noted an issue with the anonymous link style here: https://github.com/livinglab/webwork-for-wordpress/issues/149

boonebgorges commented 5 years ago

Sure thing. I've made the change.

bree-z commented 5 years ago

Thanks, Boone and Jenna!

This looks good to me. When I inspect the element I see:

.__react_component_tooltip.type-info { background-color: #c4c4c4; color: #000; }

I'm not sure where to find react_component_tooltip.type-info.place-top:after border-top-color but the little triangle appears to be the same background color, and I don't see any WAVE contrast errors.

Boone or Jenna, I'll let you decide if that's good enough to close. Thanks! :)

jennaspevack commented 5 years ago

Perfect. Thanks!