• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Learning DITA

Free DITA training

Free DITA training

  • Log in
  • Register
  • Newsletter
  • Profile
  • Privacy
  • Home
  • About
  • Courses
  • News
  • Resources
    • Recordings
  • Questions?
  • Contact

Interaction types

Posted on 09.21.18

The Learning and Training specialization Lesson 4: Elements for questions and responses Interaction types

 

Interactions in the learningDomain2 can include the following parts:

  • A question
  • Images (optional)
  • Correct and incorrect answer element tags
  • Feedback for correct and incorrect answers (optional)

Notice the use of 2 as in learningDomain2, lcTrueFalse2, and so on. An earlier version of L&T used <learningDomain>. The <learningDomain2> elements are more flexible and allow block elements like <p> within question elements.

The bulk of the interaction will be the question content. Different types of questions have different elements:

  • <lcTrueFalse2>: true-false question
  • <lcSingleSelect2>: multiple-choice question with a single correct answer
  • <lcMultipleSelect2>: multiple-choice question with more than one correct answer
  • <lcMatching2>: two columns of information that students must match into related pairs
  • <lcSequencing2>: a series of items that students must rearrange into the correct order
  • <lcOpenQuestion2>: a question that requires a written answer (such as short answer or essay responses)
  • <lcHotspot2>: an image with mapped regions on which students must click

Below is an example of a single select question.

<learningAssessment id="la_l1_t1_ingredient_quality">
    <title>Ingredient quality</title>
    <learningAssessmentbody>
        <lcInteraction id="lcInteraction_sqq_xws_rcb">
            <lcSingleSelect2>
                <lcQuestion2>Do not use grains that are contaminated
                                with:</lcQuestion2>
                <lcAnswerOptionGroup2 id="lcAnswerOptionGroup2_skb_bxs_rcb">
                    <lcAnswerOption2>
                        <lcAnswerContent2>Molds</lcAnswerContent2>
                        <lcFeedback2>Not just molds, but weed seeds and dirt 
                                        too.</lcFeedback2>
                    </lcAnswerOption2>
                    <lcAnswerOption2>
                        <lcAnswerContent2>Weed seeds</lcAnswerContent2>
                        <lcFeedback2>Not just weed seeds, but molds and dirt 
                                        too.</lcFeedback2>
                    </lcAnswerOption2>
                    <lcAnswerOption2>
                        <lcAnswerContent2>Dirt</lcAnswerContent2>
                        <lcFeedback2>Not just dirt, but molds and weed seeds 
                                        too.</lcFeedback2>
                    </lcAnswerOption2>
                    <lcAnswerOption2>
                        <lcAnswerContent2>All of the above</lcAnswerContent2>
                        <lcCorrectResponse2/>
                    </lcAnswerOption2>
                </lcAnswerOptionGroup2>
            </lcSingleSelect2>
        </lcInteraction>
    </learningAssessmentbody>
</learningAssessment>

Note: Note that with an “all of the above” type answer, use the lcSingleSelect2 interaction type, rather than lcMultipleSelect2. If you use the lcMultipleSelect2 and a student selects all correct answers (with or without the “all of the above” selection), most learning management systems (LMS) will mark this as an incorrect response.

Practice

Now you can practice creating an assessment question.

  1. Make a copy of the file lca_practice_start.dita and open it in your editor.

    Note: If you are using a DITA-aware text editor, make sure you are in text mode, rather than author or visual mode.

    You should see this:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE learningAssessment PUBLIC "-//OASIS//DTD DITA Learning Assessment//EN" 
         "learningAssessment.dtd">
        <learningAssessment id="lca_practice">
           <title>Feed Quality Source</title>
           <learningAssessmentbody> </learningAssessmentbody>
        </learningAssessment>

    Notice that the !DOCTYPE declaration calls out the learningAssessment DTD.

    After the required title is the <learningAssessmentbody>

  2. Inside the <learningAssessmentbody> add the <lcInteraction> element and give it an id attribute.
    <!DOCTYPE learningAssessment PUBLIC "-//OASIS//DTD DITA Learning Assessment//EN" 
        "learningAssessment.dtd">
    <learningAssessment id="lca_practice">
        <title>Feed Quality Source</title>
        <learningAssessmentbody>
            <lcInteraction id="lcInteraction_practice"> 
            </lcInteraction>
        </learningAssessmentbody>
    </learningAssessment>
  3. Now you can decide what type of assessment question you will add. For this practice exercise, add a <lcMultipleSelect2> question.
    <!DOCTYPE learningAssessment PUBLIC "-//OASIS//DTD DITA Learning Assessment//EN" 
        "learningAssessment.dtd">
    <learningAssessment id="lca_practice">
        <title>Feed Quality Source</title>
        <learningAssessmentbody>
            <lcInteraction id="lcInteraction_practice">
                <lcMultipleSelect2>
                </lcMultipleSelect2>
            </lcInteraction>
         </learningAssessmentbody>
    </learningAssessment>
  4. Next, you can add the question into the <lcQuestion2> element.
    . . .
    <lcMultipleSelect2>
        <lcQuestion2>Good commercially prepared duck feed can be found where? 
                    (answer all that apply):</lcQuestion2>
    </lcMultipleSelect2>
    . . .
    
  5. Start adding the group of answer choices. First, add the <lcAnswerOptionGroup2> element and an id. Then, add the <lcAnswerOption2> element and the <lcAnswerContent2> element with the text of the first answer option.
    . . .
    <lcMultipleSelect2>
    <lcQuestion2>Good commercially prepared duck feed can be found where? 
                    (answer all that apply):</lcQuestion2>
            <lcAnswerOptionGroup2 id="lcAnswerOptionGroup2_practice">
                <lcAnswerOption2>
                    <lcAnswerContent2>Local feed stores.</lcAnswerContent2>
                 </lcAnswerOption2>
            </lcAnswerOptionGroup2>
    </lcMultipleSelect2>
    . . .
    
  6. Now, if the answer option is correct, you can tag it as a correct answer choice.
    . . .
    <lcMultipleSelect2>
    <lcQuestion2>Good commercially prepared duck feed can be found where? (answer all that apply):</lcQuestion2>
            <lcAnswerOptionGroup2 id="lcAnswerOptionGroup2_practice">
                <lcAnswerOption2>
                    <lcAnswerContent2>Local feed stores.</lcAnswerContent2>
                    <lcCorrectResponse2/>
                 </lcAnswerOption2>
            </lcAnswerOptionGroup2>
    </lcMultipleSelect2>
    . . .
    
    You can add as many <lcAnswerOption2> elements as you need, and all of them can be tagged as correct.
  7. Try adding another correct answer option.
    . . .
    <lcAnswerOptionGroup2 id="lcAnswerOptionGroup2_practice">
        <lcAnswerOption2>
            <lcAnswerContent2>Local feed stores.</lcAnswerContent2>
            <lcCorrectResponse2/>
         </lcAnswerOption2>
         <lcAnswerOption2>
            <lcAnswerContent2>Mixed on the farm from bulk 
                                 ingredients.</lcAnswerContent2>
            <lcCorrectResponse2/>
         </lcAnswerOption2>
    </lcAnswerOptionGroup2>
    . . .
    
  8. To create an answer choice that is not a correct answer, omit the <lcCorrectResponse/> element. Then, provide feedback by using the <lcFeedback2> element.(It will appear if the student chooses the wrong answer.)
    . . .
    <lcAnswerOptionGroup2 id="lcAnswerOptionGroup2_practice">
        <lcAnswerOption2>
            <lcAnswerContent2>Local feed stores.</lcAnswerContent2>
            <lcCorrectResponse2/>
        </lcAnswerOption2>
        <lcAnswerOption2>
            <lcAnswerContent2>Mixed on the farm from bulk ingredients.</lcAnswerContent>
            <lcCorrectResponse2/>
        </lcAnswerOption2>
        <lcAnswerOption2>
            <lcAnswerContent2>From the back of a stranger’s truck.</lcAnswerContent2>
            <lcFeedback2>The more you know about the source, age, storage history, and the seller,
                            the better off you are. The back of a stranger's truck has none of this
                            information.</lcFeedback2>
        </lcAnswerOption2>
    </lcAnswerOptionGroup2>
    . . .
    
Practice
  1. Now try an exercise on your own. Open the file lesson3/lc_task_exercise_start.dita and use it to convert the following assessment question from The DITA task topic type LearningDITA course into a DITA <learningAssessment> topic.
    The answer choices are matched correctly in this preview.

    Question

    Match the child elements with their uses.

    <chhead> Header row
    <chrow> Body row
    <choptionhd> Option in a header row
    <chdeschd> Description in a header row
    <choption> Option in a body row
    <chdesc> Description in a body row

  2. Check your file lesson/lca_exercise_start.dita against the completed sample file lesson4/lca_exercise.dita
Contributors
  • Simon Bate, Scriptorium
  • Gretyl Kinsey, Scriptorium
  • Kaitlyn Heath, Scriptorium
Previous Topic
Back to Lesson
Next Topic

sidebar

Blog Sidebar

  • Scriptorium logo
    Maximize the value of your content. Read more.
  • Scriptorium logo
    Already in DITA and need support? Contact us.
RSSLinkedin

Want to add content? Join the ditatraining GitHub repository.

  • Home
  • News
  • Contact
  • Privacy
  • Cookie Policy

Maintained by Scriptorium Publishing

Logo and site presentation © 2015–2023 Scriptorium Publishing. Content based on the open-source DITA training project.

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}