-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature incognito mode #112
Conversation
1c28aa4
to
c0e19b8
Compare
app/models/guide.rb
Outdated
@@ -52,7 +52,8 @@ def pending_exercises(user) | |||
on assignments.exercise_id = exercises.id | |||
and assignments.submitter_id = #{user.id} | |||
and assignments.submission_status = #{Mumuki::Domain::Status::Submission::Passed.to_i}"). | |||
where('assignments.id is null') | |||
where('assignments.id is null'). | |||
order('public.exercises.number asc') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ordering logic it's related to next_exercise
, not to pending_exercises
.
It's an important distinction because we'll use indicators to easily get pending_items but ordering logic is not included there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I had that doubt 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review it again!
end | ||
|
||
describe 'next_exercise', organization_workspace: :test do | ||
# TODO this looks weird. Why do we need a non-polymorphic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we aren't using indicators for this one as progress is shared between organizations.
This change was made and had to be rolled back because of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
🎯 Goal
Implement a polymorphic
Incognito
user - in a null-object style - and the foundations of an incognito mode. This concept is required for allowing a userless mode.📝 Details
Mumuki::Domain::Incognito
singleton.*_at(
📚)
methods for user messages that take a content - as opposed to 📚.*_for(
👥)
methods that are content messages that take an user as argument🔙 Backward compatibility
This PR should be 100% backwards compatible, since it does not remove any method nor it alters semantics
👀 See also
mumuki/mumuki-laboratory#1450