Class ResultItem


  • public class ResultItem
    extends Object
    In order to provide more detail about learning unit runs - which enables better analytics and personalisation - learning app developers are strongly encouraged to provide a list of ResultItem instances to describe each significant user interaction during a learning unit run.

    Where it makes sense, all items that were presented to the user should be included, even if the user did not provide a response to the item due to the unit being cut short, e.g. by a timeout.

    Since different learning units vary greatly in nature, there is no one-size-fits-all solution to capturing their results. This is why all fields in this class are optional: each should be provided only if it will hold sensible values.

    There are learning units that cannot described in terms of a list of ResultItem instances at all. If you encounter such a unit, you are invited to contact EIDU to see if the data model can be extended to cover your use case.

    • Field Detail

      • id

        @Nullable
        public final String id
        Optional. Identifies the item within the learning unit being played. The ID _must_ be stable and unique, i.e. in all runs of the learning unit, it must refer to the same challenge and that challenge only. Depending on the structure of the learning unit, this may be an index ("0", "1", "2", ...) or the same as challenge or something else.
      • challenge

        @Nullable
        public final String challenge
        Optional. A description of the challenge, e.g. "2 + 4".
      • givenResponse

        @Nullable
        public final String givenResponse
        Optional. The response given by the learner, e.g. "5".
      • correctResponse

        @Nullable
        public final String correctResponse
        Optional. The correct response to the challenge, e.g. "6".
      • score

        @Nullable
        public final Float score
        Optional. A score between 0.0f and 1.0f that describes how the learner did in the challenge.
      • durationInMs

        @Nullable
        public final Long durationInMs
        Optional. The time it took the learner to give a response after being presented with the challenge.
      • timeToFirstActionInMs

        @Nullable
        public final Long timeToFirstActionInMs
        Optional. The time it took until the learner began responding to the challenge after being presented with it. This is important because it can be a good predictor of the learner's engagement.
    • Constructor Detail

      • ResultItem

        public ResultItem​(@Nullable
                          String id,
                          @Nullable
                          String challenge,
                          @Nullable
                          String givenResponse,
                          @Nullable
                          String correctResponse,
                          @Nullable
                          Float score,
                          @Nullable
                          Long durationInMs,
                          @Nullable
                          Long timeToFirstActionInMs)
        Creates a new ResultItem instance.
        Parameters:
        id - Optional, see id.
        challenge - Optional, see challenge.
        givenResponse - Optional, see givenResponse.
        correctResponse - Optional, see correctResponse.
        score - Optional, see score.
        durationInMs - Optional, see durationInMs.
        timeToFirstActionInMs - Optional, see timeToFirstActionInMs.