Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixing XML formatting

...

you get:

toolOutputsAllUsers.xml

<?xml version="1.0" encoding="UTF-8"?>
<ToolOutputs lessonId="1" name="mc">
<LearnerOutput completedLesson="false" firstName="Mary" lamsUserId="4" lamsUserName="mmm" lastName="Morgan" userName="mmm">
<Activity activityId="6" attempted="true" completed="true" title="MC1">
<ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
</Activity>
<Activity activityId="5" attempted="true" completed="false" title="MC2" />
<Activity activityId="7" attempted="false" completed="false" title="MC3" />
</LearnerOutput>
<LearnerOutput completedLesson="false" firstName="Two" lamsUserId="6" lamsUserName="test2" lastName="Test" userName="test2">
<Activity activityId="6" attempted="true" completed="false" title="MC1" />
<Activity activityId="5" attempted="false" completed="false" title="MC2" />
<Activity activityId="7" attempted="false" completed="false" title="MC3" />
</LearnerOutput>
<LearnerOutput completedLesson="true" firstName="Four" lamsUserId="8" lamsUserName="test4" lastName="Test" userName="test4">
<Activity activityId="6" attempted="true" completed="true" title="MC1">
<ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
</Activity>
<Activity activityId="5" attempted="true" completed="true" title="MC2">
<ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
</Activity>
<Activity activityId="7" attempted="true" completed="true" title="MC3">
<ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
</Activity>
</LearnerOutput>
<LearnerOutput firstName="Jacky" lamsUserId="3" lamsUserName="lamskh01" lastName="Fang" userName="lamskh01">
<Activity activityId="6" attempted="false" completed="false" title="MC1" />
<Activity activityId="5" attempted="false" completed="false" title="MC2" />
<Activity activityId="7" attempted="false" completed="false" title="MC3" />
</LearnerOutput>
<LearnerOutput completedLesson="true" firstName="One" lamsUserId="5" lamsUserName="test1" lastName="Test" userName="test1">
<Activity activityId="6" attempted="true" completed="true" title="MC1">
<ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
</Activity>
<Activity activityId="5" attempted="true" completed="true" title="MC2">
<ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
</Activity>
<Activity activityId="7" attempted="true" completed="true" title="MC3">
<ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
</Activity>
</LearnerOutput>
<LearnerOutput firstName="Three" lamsUserId="7" lamsUserName="test3" lastName="Test" userName="test3">
<Activity activityId="6" attempted="false" completed="false" title="MC1" />
<Activity activityId="5" attempted="false" completed="false" title="MC2" />
<Activity activityId="7" attempted="false" completed="false" title="MC3" />
</LearnerOutput>
<LearnerOutput firstName="Testing" lamsUserId="2" lamsUserName="test" lastName="LDAP" userName="test">
<Activity activityId="6" attempted="false" completed="false" title="MC1" />
<Activity activityId="5" attempted="false" completed="false" title="MC2" />
<Activity activityId="7" attempted="false" completed="false" title="MC3" />
</LearnerOutput>
</ToolOutputs>

Code Block
languagehtml/xml
themeEclipse
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<ToolOutputs lessonId="1" name="mc">
    <LearnerOutput completedLesson="false" firstName="Mary" lamsUserId="4" lamsUserName="mmm" lastName="Morgan" userName="mmm">
        <Activity activityId="6" attempted="true" completed="true" title="MC1">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="1" type="long" />
        </Activity>
        <Activity activityId="5" attempted="true" completed="false" title="MC2" />
        <Activity activityId="7" attempted="false" completed="false" title="MC3" />
    </LearnerOutput>
    <LearnerOutput completedLesson="false" firstName="Two" lamsUserId="6" lamsUserName="test2" lastName="Test" userName="test2">
        <Activity activityId="6" attempted="true" completed="false" title="MC1" />
        <Activity activityId="5" attempted="false" completed="false" title="MC2" />
        <Activity activityId="7" attempted="false" completed="false" title="MC3" />
    </LearnerOutput>
    <LearnerOutput completedLesson="true" firstName="Four" lamsUserId="8" lamsUserName="test4" lastName="Test" userName="test4">
        <Activity activityId="6" attempted="true" completed="true" title="MC1">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
        <Activity activityId="5" attempted="true" completed="true" title="MC2">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
        <Activity activityId="7" attempted="true" completed="true" title="MC3">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
    </LearnerOutput>
    <LearnerOutput firstName="Jacky" lamsUserId="3" lamsUserName="lamskh01" lastName="Fang" userName="lamskh01">
        <Activity activityId="6" attempted="false" completed="false" title="MC1" />
        <Activity activityId="5" attempted="false" completed="false" title="MC2" />
        <Activity activityId="7" attempted="false" completed="false" title="MC3" />
    </LearnerOutput>
    <LearnerOutput completedLesson="true" firstName="One" lamsUserId="5" lamsUserName="test1" lastName="Test" userName="test1">
        <Activity activityId="6" attempted="true" completed="true" title="MC1">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="1" type="long" />
        </Activity>
        <Activity activityId="5" attempted="true" completed="true" title="MC2">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
        <Activity activityId="7" attempted="true" completed="true" title="MC3">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
    </LearnerOutput>
    <LearnerOutput firstName="Three" lamsUserId="7" lamsUserName="test3" lastName="Test" userName="test3">
        <Activity activityId="6" attempted="false" completed="false" title="MC1" />
        <Activity activityId="5" attempted="false" completed="false" title="MC2" />
        <Activity activityId="7" attempted="false" completed="false" title="MC3" />
    </LearnerOutput>
    <LearnerOutput firstName="Testing" lamsUserId="2" lamsUserName="test" lastName="LDAP" userName="test">
        <Activity activityId="6" attempted="false" completed="false" title="MC1" />
        <Activity activityId="5" attempted="false" completed="false" title="MC2" />
        <Activity activityId="7" attempted="false" completed="false" title="MC3" />
    </LearnerOutput>

</ToolOutputs> 

Calling:
http://<your-lams>:8080/lams//services/xml/LessonManager?&serverId=xxx&courseId=xxx&username=test1&datetime=xxx&hashValue=xxx&lang=en&country=AU&method=authoredToolOutputsAllUsers&lsId=1
You get:
authoredToolOutputsAllUsers.xml

...

Code Block
languagehtml/xml
themeEclipse
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<ToolOutputs lessonId="1" name="mc">
    <LearnerOutput completedLesson="true" firstName="One" lamsUserId="5" lamsUserName="test1" lastName="Test" userName="test1">
        <Activity activityId="6" attempted="true" completed="true" title="MC1">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="1" type="long" />
        </Activity>
        <Activity activityId="5" attempted="true" completed="true" title="MC2">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
        <Activity activityId="7" attempted="true" completed="true" title="MC3">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="false" type="boolean" />
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
    </LearnerOutput>

</ToolOutputs>

Calling:
http://<your-lams>:8080/lams//services/xml/LessonManager?&serverId=xxx&courseId=xxx&username=test1&datetime=xxx&hashValue=xxx&lang=en&country=AU&method=authoredToolOutputsUser&lsId=1&outputsUser=testXYZ

...

Code Block
languagehtml/xml
themeEclipse
<?xml version="1.0" encoding="UTF-8"?>

<ToolOutputs lessonId="1" name="mc">
    <LearnerOutput completedLesson="true" firstName="One" lamsUserId="5" lamsUserName="test1" lastName="Test" userName="test1">
        <Activity activityId="6" attempted="true" completed="true" title="MC1">
            <ToolOutput description="Are learner's answers all correct?" name="learner.all.correct" output="true" type="boolean" />
        </Activity>
        <Activity activityId="5" attempted="true" completed="true" title="MC2">
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
        <Activity activityId="7" attempted="true" completed="true" title="MC3">
            <ToolOutput description="Learner's total mark" name="learner.mark" output="0" type="long" />
        </Activity>
    </LearnerOutput>

</ToolOutputs>

Get Gradebook for Lesson or Course

...

Code Block
languagehtml/xml
themeEclipse
linenumberstrue
<GradebookMarks>
    <Lesson
        lessonId="13"
        lessonName="Big lesson"
        lessonMaxPossibleMark="4"
    >
        <Learner
            extUsername="alex"
            userTotalMark="3"
        >
        </Learner>
    </Lesson>
</GradebookMarks>

...