HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... what does source me in setscore
what does source me in setscore
  View type:
I'm trying to use the set score method, but not sure what 'source' refers to? The help says it is

String. Specifies the source of the current score modification.

is that the object of the current quiz question?
When some object (for example, Question object or Test object) sets objective score it also sets kind of "signature" along with score (in fact, it uses Object ID for that). The same objective can be filled by scores from a lot of different objects and/or user-created tasks. The Source field is used to differ the scores within one objective. For example, when learner uses second approach to already completed question (if you allow recurring approaches), then stored score from this question (only from this question!) must be "erased" before new approach. That's where "source" attribute will be used.

Built-in scored objects (questions and test) store "source" attribute automatically (and use Object ID for that). But when you build some complex task and want to set score manually (using SET SCORE action), then you need some task ID as "source" attribute to identify scores from this task in the "heap" (objective). It can be any user-defined ID in this case.

In other words, "source" may be treated as subobjective within objective.

Please note that SET SCORE action has also Add/Replace switch.
thanks very useful
Message options
No additional options