[LON-CAPA-users] EXT question

lon-capa-users@mail.lon-capa.org lon-capa-users@mail.lon-capa.org
Tue, 12 May 2009 18:24:20 -0400

<div>Ray, this is basically what I am looking for. What is the painful stri=
ng?<br><br>I tried setting the mapalias for the first problem to "BusProble=
m". This problem has a partid inputMyMass with numericresponse id myMass.<b=
r><br>Then in the second problem I tried a number of things like<br><br>$v1=
 =3D &amp;EXT('user.resource.resource.inputMyMass.myMass.submission', &amp;=
EXT("BusProblem"));<br>$v3 =3D &amp;EXT('user.resource.resource.inputMyMass=
.myMass.submission', &amp;EXT("resource.BusProblem"));<br>$v4 =3D &amp;EXT(=
'user.resource.resource.inputMyMass.myMass.submission', &amp;EXT("resource.=
map.BusProblem"));<br>$v5 =3D &amp;EXT("BusProblem.inputMass.myMass.submiss=
ion");<br><br>but with no success yet.<br><br>It feels like if I could just=
 get the syntax of the second parameter, it would suddenly start to work. O=
r, if someone knows the form of the Very Painful String, that is fine too (=
although not as cool and clean). I can deal with painful if it works.<br><b=
r>I have used the example code from the albertel EXT examples for some time=
; they work great for retrieving values from partids in the current problem=
. The difficulty here is retrieving values from a separate problem.<br><br>=
I have not been trying to do this as a sequence, since there are no decisio=
ns being made based on the information; just using it as parameters to the =
parts of the various problems. I guess I could look at putting all the prob=
lems in a straight line sequence with the mapalias. Ray (or whoever!), any =
examples of how this is done (setting the mapalias, retrieving a value from=
 another resource)? Hmm, I don't know how I can look at someone else's RAT =
examples. <br><br><br>Getting closer,<br>brew<br><br></div><font color=3D"#=
990099">lon-capa-users-admin@mail.lon-capa.org wrote: -----<br><br></font><=
blockquote style=3D"border-left: 2px solid rgb(0, 0, 0); padding-right: 0px=
; padding-left: 5px; margin-left: 5px; margin-right: 0px;">To: lon-capa-use=
rs@mail.lon-capa.org<br>From: Ray Batchelor &lt;batchelo@sfu.ca&gt;<br>Sent=
 by: lon-capa-users-admin@mail.lon-capa.org<br>Date: 05/12/2009 05:24PM<br>=
Subject: Re: [LON-CAPA-users] EXT question<br><br><font size=3D"3" face=3D"=
monospace">Well, if you are calling a parameter from within the same proble=
m<br>resource, i.e. from a part of the same problem in which your &amp;EXT =
is<br>located, then the the ",'something goes here'" can be omitted.<br><br=
>The 'something goes here' is, in principle, a very long (tediously so)<br>=
string which identifies a specific (problem) resource within your<br>course=
. &nbsp;However it is simpler to include such a problem resource<br>within =
a published sequence in which the specific resource is<br>identified by a "=
map alias" parameter. &nbsp;You can set this parameter in<br>the advanced R=
AT for any given resource holder in the sequence to be<br>published. &nbsp;=
Once you include that published sequence in your course,<br>then the specif=
ic resource's "map alias" parameter (string) cam be<br>used in your &amp;EX=
T call to retrieve some status or other (such as<br>'submission') relating =
to any partID.responseID for that resource.<br><br>I do not know the up-to-=
date state of this facility, but it seems to<br>work in those cases where I=
 have required it.<br>I have only used it in published sequences, although =
I believe at some<br>point it was intended to work by setting the map alias=
 directly in the<br>course parms. &nbsp;The latter never worked for me, but=
 setting the 'map<br>alias' as an authored parameter of the published seque=
nce does work<br>fine.<br><br><br>Map aliases need to be unique within a co=
urse. So choose them memorably.<br><br>That's my two bit's worth.... I hope=
 it made sense.<br><br>Cheers,<br>Ray<br><br><br><br><br>On Tue, May 12, 20=
09 at 7:15 AM, &nbsp;&lt;Robert=5FBrewington@er.monroe.edu&gt; wrote:<br>&g=
t; Once again, I am trying to use the powerful &amp;EXT construct to retrie=
ve<br>&gt; information from LonCapa. I think this is supposed to be possibl=
e, but I<br>&gt; can't guess the syntax after a couple of hours.<br>&gt;<br=
>&gt; The setup:<br>&gt;<br>&gt; Problem1.problem<br>&gt; &lt;problem&gt;<b=
r>&gt; &lt;part id=3D"A"&gt;<br>&gt; &lt;numericresponse id=3D"answer"&gt;<=
br>&gt; ...<br>&gt;<br>&gt; Problem2.problem<br>&gt; &lt;problem&gt;<br>&gt=
;<br>&gt; &lt;script&gt;<br>&gt; $answerFromA =3D &amp;EXT('user.resource.r=
esource.A.answer.submission', 'something<br>&gt; goes here');<br>&gt; &lt;/=
script&gt;<br>&gt;<br>&gt; The script line is my problem - I don't know wha=
t to put in the second<br>&gt; parameter of the EXT call, to retrieve the s=
ubmitted value of A.answer. I<br>&gt; know that the enclosing map is given =
by &amp;EXT('resource.map'); how do I<br>&gt; navigate to the Problem1.A.an=
swer?<br>&gt;<br>&gt; Thanks for any clues,<br>&gt; brew<br>&gt;<br>&gt; =
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F LON-CAPA=
-users mailing list<br>&gt; LON-CAPA-users@mail.lon-capa.org<br>&gt; <a hre=
lon-capa.org/mailman/listinfo/lon-capa-users</a><br><br><br><br>-- <br>Raym=
ond J. Batchelor, Ph.D.<br>Department of Chemistry<br>Simon Fraser Universi=
ty<br>Burnaby, BC<br>Canada<br>V5A 1S8<br>=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>LON-CAPA-users mailing list<br>LON-CAP=
A-users@mail.lon-capa.org<br><a href=3D"http://mail.lon-capa.org/mailman/li=