Forum .LRN Q&A: Re: Problems integratin IMS-LD and IMS-QTI

Collapse
Posted by Jose Pablo Escobedo Del Cid on
Hi Javier,

Try with this type: imsqti_item_xmlv2p0

Actually, in the code we have this:


if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} { ... }

We did that based on what we read in the spec of IMS-LD:

3.1. Packaging Items
...
"The cp:type of the cp:resource must be imsqti_item_xmlv2p0 or imsqti_item_xmlv2p1 depending on what version of the specification the item conforms to." (http://www.imsglobal.org/question/qtiv2p1pd2/imsqti_intgv2p1pd2.html

Regards

Collapse
Posted by javier morales on
Hi Jose,

I tried to do what you said, and it's not working.

I defined the resource like imsqti_xmlv1p1 or imsqti_item_xmlv2p0, but it seems that it is another thing.

I define the imsmanifest.xml file from the test with this part:

...
        <resources>
                <resource identifier="RESOURCE1" type="imsqti_xmlv1p1" href="imsqti-impeval.xml">
                        <file href="imsqti-impeval.xml" />
                </resource>
        </resources>
...

Then in the imsmanifest from the course I define this test, as a new activity with one resource, like:

...                                        <imsld:learning-activity identifier="LA-task4.1" isvisible="true">
                                              <imsld:title>4.1. Impressionism Evaluation</imsld:title>
                                                <imsld:environment-ref ref="ENV-webquestart"/>
                                                <imsld:activity-description>
                                                        <imsld:item identifierref="resource-impressionism-eval" isvisible="true">
                                                                <imsld:title>Impressionism Eval</imsld:title>
                                                        </imsld:item>
                                                </imsld:activity-description>
                                                <imsld:complete-activity>
                                                        <imsld:user-choice />
                                                </imsld:complete-activity>
                                        </imsld:learning-activity>

...
                <resource type="imsqti_xmlv1p1" identifier="resource-impressionism-eval" href="resources/imsqti-impeval.zip">
                        <file href="resources/imsqti-impeval.zip"/>
                </resource>
...

Do I have to do anything else?? Where is the problem??

Thanks, javier

Hi Javier,

In the assessment tcl code, please check if you have the following code into the "as-callback-procs.tcl" file:

--------
ad_proc -public -callback imsld::import -impl qti {} {
this is the imsld qti importer
} {
if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
return [as::qti::register_xml_object_id \
-xml_file $tmp_dir/$res_href \
-community_id $community_id]
}
}
--------

This code must be executed when parsing the manifest and a QTI resource is detected. If you have this code and you have checked that is being executed while parsing, then we should go deep into the problem.

Cheers,
Luis

Hi Luis,

I found in the file

/dotlrn/packages/assessment/tcl/as-callback-procs.tcl

the next:

...
ad_proc -public -callback imsld::import -impl qti {} {
    this is the imsld qti importer
} {
        if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
            return [as::qti::register_xml_object_id \
                        -xml_file $tmp_dir/$res_href \
                        -community_id $community_id]
        }
}
...

It seems the same...

Now I know, that I have the same code, which is the way to check if it's being executed??

I'm new in this "world" of OpenACS and dotLRN and I really don't know if it's something of the platform or just, that I'm making any mistake in my code.

I'm trying to find a course that could upload without problems, but I didn't have lucky yet...

Regards, javier