Guide to the Tutor Message format (v4) > Media Logging > <context_message> (media logging)

3.2. <context_message> (media logging)

3.2.1. Media embedded within a tutor
3.2.2. Media not embedded within a tutor
3.2.3. XML examples of <context_message>

The context message establishes the context for a following sequence of tool and tutor messages. Please refer to Section 2.4, “<context_message>” for primary details on the context message if you are not familiar with it.

An example of a complete context message for video logging is included at the end of this section.

3.2.1. Media embedded within a tutor

If the media is embedded within a tutor, the context message should already be logged for the problem (see Section 2.4, “<context_message>”) and the <context_message> name attribute will be START_PROBLEM.

3.2.2. Media not embedded within a tutor

If the media is not embedded within a tutor, then a context message should be logged per media object and the name attribute of a <context_message> element should be one of the values from the following table:

Table 5. Recommended values for the <context_message> name attribute for a media object

 ValueDescription 
LOAD_VIDEOShould be logged when the video is actually loaded on the page
LOAD_AUDIOShould be logged when the audio is actually loaded on the page
LOAD_MEDIAUse if neither video or audio (e.g., vector-based animation). Should be logged when the media is actually loaded on the page
START_VIDEOShould be logged when the user first interacts with the video
START_AUDIOShould be logged when the user first interacts with the audio
START_MEDIAUse if neither video or audio (e.g., vector-based animation). Should be logged when the user first interacts with the media

[Note]Note

We recommend that you log a context message describing the load event (when the media object finishes loading) and, later, a tool message when the user first interacts with the media object. Alternatively, you may choose to omit logging the load event: in this case, you should still log a context message before the tool message, but its name attribute value will start with "START". For XML examples of these approaches see Example A.2, “Media logging: Logging the load video event (media not in a tutor)” and Example A.3, “Media logging: Logging the start video event (no load event) (media not in a tutor)”.

In addition, the problem's <name> element (contained in the dataset <level> hierarchy) should contain a unique identifier for that media object. DataShop recommends that the file name of the media be used as the problem name.

[Note]Note

This use of the <problem> element may change in future versions of the Tutor Message format to more accurately indicate the type of information being presented to the student.

3.2.3. XML examples of <context_message>

Example 1. Context message for a video clip not embedded in a problem/tutor

The following is an example of a context message for a video clip not embedded in a problem/tutor.

<context_message 
   context_message_id="02CE3AE5-F6D5-9177-913F-C34730F1096C" 
   name="LOAD_VIDEO">
   <dataset>
      <name>Example Media Dataset</name> 
      <level type="unit">
         <name>Stoichiometry</name>
         <level type="section">
            <name>What are moles?</name>
            <problem>
               <name>mymovie.flv</name>
            </problem>
         </level>
      </level>
   </dataset>
</context_message>

Example 2. Context message for a video clip embedded in a problem/tutor

The following is an example of a context message for a video clip embedded in a problem/tutor.

<context_message 
   context_message_id="02CE3AE5-F6D5-9177-913F-C34730F1096C" 
   name="START_PROBLEM">
   <dataset>
      <name>Learn a Language Fall 2007</name> 
      <level type="unit">
         <name>Learning Logging</name>
         <problem><name>Translating Tech Talk</name></problem>
      </level>
   </dataset>
</context_message>