Skip to content

Feature incognito mode#112

Merged
flbulgarelli merged 7 commits into
masterfrom
feature-userless-mode
Aug 13, 2020
Merged

Feature incognito mode#112
flbulgarelli merged 7 commits into
masterfrom
feature-userless-mode

Conversation

@flbulgarelli

@flbulgarelli flbulgarelli commented Aug 4, 2020

Copy link
Copy Markdown
Member

🎯 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

  • Added a Mumuki::Domain::Incognito singleton
  • Added an organization flag for enabling this mode - which is actually a laboratory task
  • Added new delegations using a new naming schema when ambiguity may arise - 👥.*_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

@flbulgarelli flbulgarelli force-pushed the feature-userless-mode branch from 1c28aa4 to c0e19b8 Compare August 10, 2020 13:31
Comment thread app/models/guide.rb Outdated
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')

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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 😄

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review it again!

@flbulgarelli flbulgarelli requested a review from luchotc August 12, 2020 17:44
@flbulgarelli flbulgarelli marked this pull request as ready for review August 12, 2020 17:53
end

describe 'next_exercise', organization_workspace: :test do
# TODO this looks weird. Why do we need a non-polymorphic

Copy link
Copy Markdown
Contributor

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.

@julian-berbel julian-berbel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@flbulgarelli flbulgarelli merged commit 19c248b into master Aug 13, 2020
@flbulgarelli flbulgarelli deleted the feature-userless-mode branch August 13, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants