-
Notifications
You must be signed in to change notification settings - Fork 0
SLG User Progress
User progress updates upon task completion.
SLGUserProgress
class handles the progress of a user. This class contains a set of ids of completed tasks (which basically is a progress of a user) and provides methods such as markTaskAsCompleted
, updateScore
, updateSubtopicScore
and updateTopicScore
to manipulate the progress.
When you've successfully submitted the task, checkResult
method within SLGTaskView
triggers an event, which is handled by a model (cause each task's view has a corresponding task object). SLGSubtopic
and SLGTopic
observe #taskCompleted
, verify completion (using methods isCompleted
, onSubtopicCompleted
and onTopicCompleted
), and trigger update of the view if needed.
The check of whether you deserve a score is simply a chain of calls isCompleted
method on every level of the hierarchy (as reflected in a domain model).