[Building Sakai] Using web service to import test

Steve Swinsburg steve.swinsburg at gmail.com
Fri Aug 6 16:39:45 PDT 2010


I like this one:

createAssessmentFromText()
createAssessmentFromExportFile()

or similar.

So long as it makes sense, futureproof and and is javadocced.

If you send them to me afterwards I can review and get them into the web
services bundle.

cheers,
Steve



On Sat, Aug 7, 2010 at 4:01 AM, Qu, Yuanhua <yq12 at txstate.edu> wrote:

>
>  I updated the JIRA http://jira.sakaiproject.org/browse/SAM-942  with our
> patch.
>
> I agree that word2qti is kind of confusing, therefore, I added a comment in
> the SamLite.jws
>
>        “ Create assessment from a word2qti formatted text”
>
>         Hope that explains a little when people using the service.
>
> Yes, Earle, creating two endpoints for different inputs works for me.  I
> like the createAssessment method name and people may pick up the one fit
> into their needs by the paramenters, Earle has very detailed description for
> each paramenter and that helps.
>
> Or how about following if we don’t want to overloaded method:
>
> createAssessmentFromText()
> CreateAssessmentFromExportFile()
>
>
> -Qu
>
>
>
>
>
>
>
> On 8/6/10 10:46 AM, "Nate Angell" <nangell at rsmart.com> wrote:
>
> Love it! I'm just unsure how deep the word2qti naming schema goes, or how
> dramatic it would be to change it.
>
> - Nate
>
> On Aug 6, 2010, at 8:37 AM, Earle Nietzel <Earle.Nietzel at marist.edu>
> wrote:
>
> Nate you didn't know I am secretly working for M$!
>
> But how about createTextAssessment?
>
> Earle
>
>
>
> From:        Nate Angell <nangell at rsmart.com>
> To:        Earle Nietzel <Earle.Nietzel at marist.edu>
> Cc:        Sakai-Dev <sakai-dev at collab.sakaiproject.org>
> Date:        08/06/2010 11:28 AM
> Subject:        Re: [Building Sakai] Using web service to import test
> Sent by:        sakai-dev-bounces at collab.sakaiproject.org
> ------------------------------
>
>
>
> Too bad we call it word2qti when it doesn't really have anything to do with
> MS Word. text2qti makes more sense.
>
> - Nate
>
> On Aug 6, 2010, at 8:20 AM, Earle Nietzel <*Earle.Nietzel at marist.edu* <
> mailto:Earle.Nietzel at marist.edu <Earle.Nietzel at marist.edu>> > wrote:
>
> Hi Qu,
>
> Maybe we should create 2 WS endpoints one that supports the Word2QTI for
> those that need to import plain text assessments and then another endpoint
> which imports assessments already in the IMS xml format?
>
> Maybe these endpoints make sense:
>
> public boolean createWordAssessment(String sessionid, String siteid, String
> siteproperty, String title, String description, String template, String
> data)
> public boolean createXmlAssessment(String sessionid, String siteid, String
> siteproperty, String title, String description, String template, String
> xmldata)
>
> regards,
> Earle
>
>
>
> From:        "Qu, Yuanhua" <*yq12 at txstate.edu* <mailto:yq12 at txstate.edu<yq12 at txstate.edu>>
> >
> To:        Karen Tsao <*ktsao at stanford.edu* <mailto:ktsao at stanford.edu<ktsao at stanford.edu>>
> >
> Cc:        Sakai-Dev <*sakai-dev at collab.sakaiproject.org* <
> mailto:sakai-dev at collab.sakaiproject.org<sakai-dev at collab.sakaiproject.org>>
> >, "*earle.nietzel at marist.edu* <mailto:earle.nietzel at marist.edu<earle.nietzel at marist.edu>>
> " <*earle.nietzel at marist.edu* <mailto:earle.nietzel at marist.edu<earle.nietzel at marist.edu>>
> >
> Date:        08/06/2010 10:13 AM
> Subject:        Re: [Building Sakai] Using web service to import test
> ------------------------------
>
>
>
> Thanks Karen.
>
> With your guide, I just made it working the way I wanted  -  Importing the
> exported assessment qti xml file directly into a site.   I add another
> XmlUtil.readDocument(File file) and did some modification with SamLite.jws.
>
> If it is useful, I’ll clean up the change and make a patch to the JIRA
>  SAM-942.
>
> Thanks again for your help.
>
> -Qu
>
> On 8/5/10 1:22 PM, "Karen Tsao" <*ktsao at stanford.edu* <ktsao at stanford.edu>
> > wrote:
>
> Hi Yuanhua,
>
> Please take a look at XmlUtil.readDocument. It gets you the Document
> object. Once you have the document, skip those SamiLite process and pass it
> directly into qtiService.createImportedAssessment (the new API that Earlie
> created) . That is, commented out following lines:
>
> SamLiteService samLiteService = (SamLiteService)
> ComponentManager.get("org_sakaiproject_tool_assessment_services_samlite_SamLiteService");
>
> ...
> QuestionGroup questionGroup =
> samLiteService.parse(FormattedText.escapeHtml(title, false),
> FormattedText.escapeHtml(description, false), FormattedText.escapeHtml(data,
> false));
> ...
>
> Please give this a try and let me know if this works for you.
>
> Thanks,
> Karen
>
>
> On Wed, Aug 4, 2010 at 6:43 PM, Qu, Yuanhua <*yq12 at txstate.edu* <
> yq12 at txstate.edu> > wrote:
>
> 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* <
> 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* <yq12 at txstate.edu> <*
> http://yq12@txstate.edu* <http://yq12@txstate.edu/> > > wrote:
>
> I was looking at *http://jira.sakaiproject.org/browse/SAM-942* <
> 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
>
>
>
> _______________________________________________
> sakai-dev mailing list
> *sakai-dev at collab.sakaiproject.org* <sakai-dev at collab.sakaiproject.org>
> *http://collab.sakaiproject.org/mailman/listinfo/sakai-dev* <
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev>
>
> TO UNSUBSCRIBE: send email to *
> sakai-dev-unsubscribe at collab.sakaiproject.org* <
> sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of
> "unsubscribe"
>
>
> _______________________________________________
> sakai-dev mailing list
> *sakai-dev at collab.sakaiproject.org* <
> mailto:sakai-dev at collab.sakaiproject.org<sakai-dev at collab.sakaiproject.org>>
>
> *http://collab.sakaiproject.org/mailman/listinfo/sakai-dev* <
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev>
>
> TO UNSUBSCRIBE: send email to *
> sakai-dev-unsubscribe at collab.sakaiproject.org* <
> mailto:sakai-dev-unsubscribe at collab.sakaiproject.org<sakai-dev-unsubscribe at collab.sakaiproject.org>>
> with a subject of "unsubscribe"
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org <
> mailto:sakai-dev at collab.sakaiproject.org<sakai-dev at collab.sakaiproject.org>>
>
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev <
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev>
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100807/b62aa9d3/attachment.html 


More information about the sakai-dev mailing list