[Building Sakai] Using web service to import test

Qu, Yuanhua yq12 at txstate.edu
Wed Aug 4 18:43:58 PDT 2010


I think I might find the reason why it failed me in the first place. --  It is "The format of the assessment file that is going to import".

I tried with another file called importTest.txt as per attachment  (I guess this is the Word2QTI format) as per http://confluence.sakaiproject.org/display/QTI/Home  and used the same perl script to call the web service and the test was imported with the questions in the importTest.txt.  It has the test and all the questions in the site now.

Well, Is there a web service created for importing the exported assessment like exportAssessment.xml directly?  Any quick pointer to let me know which method to call if I need to write my own web service for this purpose?

Thanks.

-Qu


On 8/4/10 8:13 PM, "Qu, Yuanhua" <yq12 at txstate.edu> wrote:

I was looking at http://jira.sakaiproject.org/browse/SAM-942 and saw that Earle was able to import assessment by using the services included in the patch.  I didn't have the luck and would like to see if you know what might be wrong in my case.

I'm using sakai2.6.2 and applied both patches for SamLite APIs and web services.  I'm using Perl script to call the service to import the assessment in file exportAssessment.xml



open FILE, "data/exportAssessment.xml" or die $!;
my $siteid = '5f852a89-eb01-4b0e-8f2f-f581eea945fc';
while (<FILE>) {
        $data .= $_;
}
close FILE;

my $result = $scriptsoap->createAssessment($session, $siteid, "", "WS test creation 3", "first test created by WS", "Default Assessment Type", $data)->result;




I did see test named "WS test creation 3" created in the site, but the question was not imported into the test.

I have no problem importing the assessment by using "Import" button in the site.  Any help would be appreciated?

Thanks.

-Qu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100804/7988c105/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exportAssessment1.xml
Type: video/x-flv
Size: 459 bytes
Desc: exportAssessment1.xml
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100804/7988c105/attachment.flv 


More information about the sakai-dev mailing list