Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • External data is handled via a set of interfaces. Most of this passes through the EvalExternalLogic interface
  • The following types of external data are planned to be supported:
    • External Users
      • Users are handled in the system as a unique id (referred to as userId)
      • the userId is a String and must be unique and must not change
      • this data can come from anywhere but included implementation is to use the Sakai UserDirectoryService
      • Data requested:
        • Current userId
        • Username from userId
        • User DisplayName from userId
        • Is userId a super admin
    • External Sites/Permissions
      • Determining who can take an evaluation is handled by associating a collection of users (a context) with an evaluation via an AssignContext
      • A context is a unique id for a collection of users and must not change
      • Contexts and the users within them are requested via the external interface
      • Determining who can take an evaluation or be evaluated is done via permissions within that context
      • Included implementation uses Sakai Sites and Authz
      • Data requested:
        • Current context
        • Does userId have a permission in a context
        • get DiplayTitle by context
        • Create a Context object from a context
        • Get userIds for all users in a context with a permission
        • Get all contexts which a userId has a specific permission in
    • External Courses/Enrollments
      • External courses and enrollments are handled via an interface which sits behind the EvalExternalLogic interface
        (and is quite close to the EvalExternalLogic interface)
      • This data is passed into the system via the methods in the EvalExternalLogic API
      • This allows courses and enrollments to be passed into the system via an implemented API from any system that can answer the questions asked by the API
      • Example: EvaluationImpl => ExternalLogic => ExternalLogicImpl => ContextProvider => ContextProviderImpl => Sakai CourseManagementProvider
      • Data requested:
        • Get userIds for all users in a course with a permission (take_eval or be_evaluated)
        • Get all courses which a userId has a specific permission in (take_eval or be_evaluated)
        • Get a count of all courses which a userId has a specific permission in (take_eval or be_evaluated)
        • Get a Context from a unique course id
    • External Hierarchy structure and courses
      • The hierarchy of courses, departments, colleges, schools, etc. are handled via an interface which sits behind the EvalExternalLogic interface
      • A hierarchy level is represented by a levelId which must be unique and must not change
      • Users may have access to various levels of the hierarchy, by default the system assumes that having access to a level of the hierarchy gives the user access to all levels beneath that level as well
      • Data requested:
        • the top level id of the hierarchy (there must be one only) (maybe optional)
        • all hierarchy level ids directly beneath a specific level id
        • the parent level id of a specific level id
        • the set of userIds which have a specific permission to a set of hierarchy levels
        • the set of hierarchy levels which a specific userId has a specific permission in
          • Permissions: View data, Start evaluations, Control templates/items/scales
        • the set of eval groups (Contexts) beneath a specific level id
    • External Scales/Items/Templates
      • TBD
    • External Scales/Items/Templates
      • TBD

Hierarchy

  • The system should support a hierarchy of evaluation groups and parent groups that is configurable and can have as many layers as necessary
  • Ideally this will be provided through Sakai, however, initially, it will have to be done separately

Locking

  • The locking logic is designed to make it easier to know if an entity should or should not be changed or removed
    • Locked entities can never be removed via the APIs and should not be removed with direct access to the DB
    • Locked entities can never be modified except in special cases (evaluations are a special case)
      • Some evaluation settings can be adjusted even if the evaluation itself is locked, these settings are detailed in the code comments
    • Locking should never be modified directly on an object via a save method (e.g. saveItem())
      • This means setLocked should almost never be called outside the logic layer
      • There is a circumstance where you might set a lock on an entity from the view layer when creating expert items, but this is a special case and unique in the current design
    • The locking for an entity is controlled by other entities so in most cases entities should not lock themselves
      • The notable exception to this is when an expert item or scale is created that should not be removed
  • Lock methods
    • Entities must use the lock methods to lock other entities
    • DAO Lock methods should not be called outside the logic layer despite the fact that they are accessible via APIs
  • Locking process
    • The locking process is a chain of entities that lock entities "behind" themselves in the chain when they are locked
    • Entities will use the lock methods to lock other entities
    • When a chain of locks or unlocks is triggered this will be referred to as a lock cycle
    • Locking happens when the lock state of an entity not at the end of a chain changes
      • Locked - entity will now lock all associated entities below itself in the chain
      • Unlocked - entity will now unlock all associated entities below itself that are not locked by other locked entities
        • Unlock cycles are much more intensive that lock cycles
  • Chain of entities
    • Scale (Only locked and unlocked by other entities, never locks anything, end of the chain)
    • Item (Items are locked once they are used in any locked template, they can only unlock if they are not used in any locked templates, lock and unlock associated scales)
    • Template (Templates are locked once they are used in a single evaluation, they can only unlock if they are not used in any locked evaluations, lock and unlock associated items)
    • Evaluation (Evaluations are locked once there is a single response associated with them, can only unlock if they have no associated responses, lock and unlock the associated template)
    • Responses (In general, Responses will be created locked and therefore their creation is the trigger point for most lock cycles, lock and unlock the associated evaluation)

...