java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.ims.ss.random.RandomizationControls
All Implemented Interfaces:
Serializable

public final class RandomizationControls extends Object implements Serializable
Represents the randomization controls for a learning activity within the SCORM IMS Simple Sequencing (IMSSS) schema. Randomization controls define how and when child activities within a sequence are randomized for the learner.

Randomization controls can help to increase the variability of the learning experience by allowing activities to be reordered or selectively presented. For example, they can be used to shuffle assessment questions or to ensure that the learner sees different content each time they access the activity.

The randomization controls include settings for:

  • Randomization timing – determining when randomization occurs (e.g., on each new attempt).
  • Selection timing – controlling when activities are selected for presentation.
  • Child reordering – allowing the order of child activities to be changed.
  • Selection count – specifying how many child activities are selected from the available pool.

The IMSSS namespace is specified by IMSSS.NAMESPACE_URI, following the SCORM 2004 standards for sequencing and navigation.

See Also:
  • Constructor Details

    • RandomizationControls

      public RandomizationControls()
      Default constructor for the RandomizationControls class. Initializes a new instance with default settings.
  • Method Details

    • getRandomizationTiming

      public RandomizationTiming getRandomizationTiming()
      Retrieves the current randomization timing setting for the instance.
      Returns:
      the RandomizationTiming value representing when randomization should occur. Possible values include NEVER, ONCE, ON_EACH_NEW_ATTEMPT, or UNKNOWN.
    • setRandomizationTiming

      public void setRandomizationTiming(RandomizationTiming randomizationTiming)
      Sets the randomization timing for the instance, determining when randomization should occur.
      Parameters:
      randomizationTiming - the RandomizationTiming value specifying the timing for randomization. Possible values include: - NEVER: randomization never occurs - ONCE: randomization occurs once - ON_EACH_NEW_ATTEMPT: randomization occurs on each new attempt - UNKNOWN: default/unrecognized value
    • getSelectionTiming

      public RandomizationTiming getSelectionTiming()
      Retrieves the current selection timing setting for the instance.
      Returns:
      the RandomizationTiming value representing when selection should occur. Possible values include NEVER, ONCE, ON_EACH_NEW_ATTEMPT, or UNKNOWN.
    • setSelectionTiming

      public void setSelectionTiming(RandomizationTiming selectionTiming)
      Sets the selection timing for the instance, determining when selection should occur.
      Parameters:
      selectionTiming - the RandomizationTiming value specifying the timing for selection. Possible values include: - NEVER: selection never occurs - ONCE: selection occurs once - ON_EACH_NEW_ATTEMPT: selection occurs on each new attempt
    • isReorderChildren

      public boolean isReorderChildren()
      Determines whether the children of the relevant element or structure should be reordered.
      Returns:
      true if children reordering is enabled; otherwise, false.
    • setReorderChildren

      public void setReorderChildren(boolean reorderChildren)
      Specifies whether the children of the relevant element or structure should be reordered.
      Parameters:
      reorderChildren - a boolean value indicating if reordering of children should be enabled. If true, the children will be reordered; if false, they will remain in their original order.
    • getSelectCount

      public Integer getSelectCount()
      Retrieves the current select count for the instance.
      Returns:
      the number of selected elements or null if no select count is set.
    • setSelectCount

      public void setSelectCount(Integer selectCount)
      Sets the select count for the instance, specifying the number of elements to be selected.
      Parameters:
      selectCount - the number of elements to be selected, or null if no select count is set.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object