class Mumuki::Domain::IncognitoClass

Public Class Methods

primary_key() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 157
def self.primary_key
  'id'
end

Public Instance Methods

_read_attribute(key) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 148
def _read_attribute(key)
  return id if key == 'id'
  raise "unknown attribute #{key}"
end
any_granted_roles() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 83
def any_granted_roles
  []
end
build_assignment(exercise, organization) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 128
def build_assignment(exercise, organization)
  Assignment.build_for(self, exercise, organization)
end
can_access_teacher_info_in?(*) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 63
def can_access_teacher_info_in?(*)
  false
end
can_discuss_here?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 55
def can_discuss_here?
  false
end
can_discuss_in?(*) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 59
def can_discuss_in?(*)
  false
end
current_immersive_context_and_content_at(_) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 71
def current_immersive_context_and_content_at(_)
  [nil, nil]
end
current_immersive_context_at(_) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 67
def current_immersive_context_at(_)
  nil
end
currently_in_exam?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 109
def currently_in_exam?
  false
end
ensure_enabled!() click to toggle source

Permissions

# File lib/mumuki/domain/incognito.rb, line 12
def ensure_enabled!
end
ex_student_here?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 23
def ex_student_here?
  false
end
ex_student_of?(*) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 19
def ex_student_of?(*)
  false
end
has_accepted?(term) click to toggle source

It makes terms UI to be shown as if no terms were accepted It does not force any term to be accepted though

# File lib/mumuki/domain/incognito.rb, line 98
def has_accepted?(term)
  false
end
has_role_terms_to_accept?() click to toggle source

It avoids role terms acceptance redirections

# File lib/mumuki/domain/incognito.rb, line 92
def has_role_terms_to_accept?
  false
end
has_student_granted_organizations?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 15
def has_student_granted_organizations?
  false
end
id() click to toggle source

ActiveRecord

# File lib/mumuki/domain/incognito.rb, line 140
def id
  '<incognito>'
end
immersive_organizations_at(_, _ = nil) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 79
def immersive_organizations_at(_, _ = nil)
  []
end
immersive_organizations_with_content_at(_, _ = nil) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 75
def immersive_organizations_with_content_at(_, _ = nil)
  []
end
incognito?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 4
def incognito?
  true
end
interpolations() click to toggle source

Evaluation

# File lib/mumuki/domain/incognito.rb, line 165
def interpolations
  []
end
is_a?(other) click to toggle source
Calls superclass method
# File lib/mumuki/domain/incognito.rb, line 144
def is_a?(other)
  other.is_a?(Class) && other.name == 'User' || super
end
moderator_here?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 51
def moderator_here?
  false
end
new_record?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 153
def new_record?
  false
end
next_exercise_at(guide) click to toggle source

Progress

# File lib/mumuki/domain/incognito.rb, line 116
def next_exercise_at(guide)
  guide.exercises.first
end
pending_siblings_at(content) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 132
def pending_siblings_at(content)
  []
end
profile_completed?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 43
def profile_completed?
  true
end
progress_at(content, organization) click to toggle source

def completed_containers_with_lookahead(*)

raise 'Unsupported operation. Userless mode and progressive display modes are incompatible'

end

# File lib/mumuki/domain/incognito.rb, line 124
def progress_at(content, organization)
  Indicator.new content: content, organization: organization
end
run_submission!(submission, assignment, evaluation) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 169
def run_submission!(submission, assignment, evaluation)
  results = submission.dry_run! assignment, evaluation
  assignment.assign_attributes results
  results
end
student_here?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 31
def student_here?
  false
end
student_of?(*) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 27
def student_of?(*)
  false
end
teacher_here?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 35
def teacher_here?
  false
end
teacher_of?(*) click to toggle source
# File lib/mumuki/domain/incognito.rb, line 39
def teacher_of?(*)
  false
end
visit!(*) click to toggle source

Visiting

# File lib/mumuki/domain/incognito.rb, line 106
def visit!(*)
end
writer?() click to toggle source
# File lib/mumuki/domain/incognito.rb, line 47
def writer?
  false
end