ka-lite icon indicating copy to clipboard operation
ka-lite copied to clipboard

Content Rating appears before user has engaged with the content at all

Open rtibbles opened this issue 9 years ago • 8 comments

Branch: 0.15.x

Expected Behaviour: We should only elicit feedback about content once a user has actually engaged with it in some way.

Current Behaviour: We ask them for feedback before they have pressed play or attempted to answer any questions.

rtibbles avatar Sep 10 '15 16:09 rtibbles

How would you prioritize this? Could it potentially wait for 0.16? It doesn't seem outside the realm of possibility for 0.15, but it's a slightly more substantial change.

MCGallaspy avatar Sep 10 '15 20:09 MCGallaspy

I think we could triage it until 0.16.

rtibbles avatar Sep 10 '15 20:09 rtibbles

I think this was fixed? Will try to find PR.

MCGallaspy avatar Dec 08 '15 02:12 MCGallaspy

Not fixed. Question @rtibbles: What does it mean for content to be "interacted with"? Can I say that a rating should only be available if the user has either a VideoLog or an ExerciseLog for the content item being viewed? Do we create ExerciseLogs alike for Khan exercises and Perseus assessment items?

MCGallaspy avatar Dec 09 '15 21:12 MCGallaspy

Yes and yes.

On Wed, 9 Dec 2015, 13:43 Michael Gallaspy [email protected] wrote:

Not fixed. Question @richard https://github.com/richard: What does it mean for content to be "interacted with"? Can I say that a rating should only be available if the user has either a VideoLog or an ExerciseLog for the content item being viewed? Do we create ExerciseLogs alike for Khan exercises and Perseus assessment items?

— Reply to this email directly or view it on GitHub https://github.com/learningequality/ka-lite/issues/4408#issuecomment-163403416 .

rtibbles avatar Dec 09 '15 23:12 rtibbles

@rtibbles you suggested moving rating logic from the ContentAreaView to the ContentWrapperView, in order to take advantage of that latter's log model and avoid making redundant requests. The simplest solution is to make a second request. An alternate solution is to use the fact that TopicContainerOuterView contains both views, and so a reference to ContentWrapperView can be made from the ContentAreaView through their mutual parent. Alternate alternate solution is to remove the ContentAreaView entirely. Moving the rating logic to another view could mean changing its layout (or at least where its container element is positioned).

The solutions are listed by increasing complexity. If I make a second request, is it an unmergeable offense in your opinion?

MCGallaspy avatar Dec 10 '15 02:12 MCGallaspy

I had started to address this here: https://github.com/MCGallaspy/ka-lite/commit/52de9a5e0faf8a4a5362ad222e2ce53e668d36f9

Commit msg:

Modify should_show_rating, now returns a jQuery promise
Starts to address #4408. First, should_show_rating becomes a promise
since it *might* need to make a request. Secondly, it attempts to
determine whether a user has *interacted* with a content item before,
by fetching the associated XLogCollection. (X is Video or Exercise.)

Next step is to call show_rating if a *new* XLog is created when
initially one wasn't found -- though we may wish to take a different
approach entirely which requires only *one* request to the
XLogCollection api endpoint by folding ContentArea into another view.

Also the tests would have to be changed to reflect this new behavior.

MCGallaspy avatar Dec 11 '15 00:12 MCGallaspy

Cleared the milestone, acknowledging that this is a real issue. However, it's of course still up to a sane user to actually rate contents, having obtained some kind of understanding of it :)

benjaoming avatar Apr 13 '17 21:04 benjaoming