<div dir="ltr"><div><div><div><div>I tried this out with the symb and it works exactly as described.  And, looking at this resource's usage in last year's course, you can see that the symb's are unique.  <br><br>The lack of re-usability of the code is a big downside, but, until I get the time to figure out sequences and map aliases, I think I will probably have to live with it.  Fortunately, it's only a cut and paste of the symb(s).<br><br></div>Thanks,<br></div>Bob Gonzales<br></div>Binghamton University<br></div>Chemistry Dept<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 2:56 PM, Mills, Douglas G <span dir="ltr"><<a href="mailto:dmills@illinois.edu" target="_blank">dmills@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Stuart. The situation I actually have in mind is in our lab<br>
courses we have sequences of Prelab, lab, postlab which refer to each<br>
other.  However, in perhaps one or two rare situations, it would be handy<br>
to refer to data in one of the other sequences (so lab 4 pulling a couple<br>
of answers from postlab 3, for example).  I have not attempted this<br>
assuming that they could only access answers within their own sequences,<br>
but perhaps based on what you're saying, I *could* refer to the mapalias<br>
in a different sequence within the course if needed. I guess that still<br>
runs a risk if ever someone wanted to use the lab 4 sequence without the<br>
lab 3 sequence, but they build on each other anyway and it doesn't seem<br>
likely they'd be used separately.  Does that seem reasonable and doable?<br>
<span class="">Thanks,<br>
<br>
Doug<br>
<br>
Douglas Mills<br>
Director of Instructional Technology<br>
Department of Chemistry<br>
University of Illinois<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>On 12/15/15, 1:43 PM, "<a href="mailto:lon-capa-users-bounces@mail.lon-capa.org">lon-capa-users-bounces@mail.lon-capa.org</a> on behalf<br>
<span class="im HOEnZb">of Stuart Raeburn" <<a href="mailto:lon-capa-users-bounces@mail.lon-capa.org">lon-capa-users-bounces@mail.lon-capa.org</a> on behalf of<br>
<a href="mailto:raeburn@msu.edu">raeburn@msu.edu</a>> wrote:<br>
<br>
</span><div class="HOEnZb"><div class="h5">>Doug,<br>
><br>
>For the purposes of re-usability, if an authored LON-CAPA problem<br>
>incorporates dependencies on a student's submission(s) to other<br>
>problem(s) in the current course, then arguably you should be working<br>
>with published sequences, and you should be importing those published<br>
>sequences into the course.<br>
><br>
>For the case of a published sequence imported into a course the symb<br>
>will *not* contain the course ID, so yes it is independent of the<br>
>course.  However, it is not true to say that it is unique to the<br>
>resource, as it is in fact unique to the instance of the resource.<br>
><br>
>A symb is constructed from map___id___res, where map is the enclosing<br>
>sequence (or composite page), id is the unique id assigned to the<br>
>resource in the map, and res is the resource.  So you could have two<br>
>different published maps in a course, with both containing the same<br>
>resource, but each instance of the resource would have a unique symb<br>
>(maps will be different).  Similarly, you could have a single sequence<br>
>in a course containing multiple instances of the same resource, and<br>
>again, each instance would be unique (the ids would be different).<br>
><br>
>Anyway, because the symb needs to be unique, quite a number of lines<br>
>of LON-CAPA code are employed in ensuring that you do not end up with<br>
>two instances of the same published map in a single course, when using<br>
>the Course Editor clipboard to copy and paste with nested folders.<br>
><br>
>In my previous reply I mentioned that if you are using folders<br>
>generated in the Course Editor instead of published sequences then<br>
>there is no support for mapaliases, and you need to use a symb.<br>
><br>
>Of course, the problem with the symb in this case, is that it does<br>
>include the course ID, which means that authored resources that<br>
>include calls to &submission() in the script block, and have a<br>
>hard-coded symb as the sixth argument are not going to be re-usable.<br>
>If you built resources that way (I wouldn't recommend it), you would<br>
>want to publish with custom rights, with use restricted to a single<br>
>course (i.e., the one featured in the symb arg in &submission() calls).<br>
><br>
>It is actually possible to use Simple Problems within a course (with<br>
>type set to numerical) and within the Scripting section include calls<br>
>to &submission() which contain a sixth arg, providing the symb for<br>
>another resource in a folder in the course, e.g.,<br>
><br>
>$a = &submission('numerical','numericalsegment','',<br>
>'','','uploaded/msu/40326912a251e547fmsul1/default_1449967894.sequence___6<br>
>___lib/templates/simpleproblem.problem');<br>
><br>
>But that's counter to the LON-CAPA philosophy of re-usability.<br>
><br>
><br>
>Stuart Raeburn<br>
>LON-CAPA Academic Consortium<br>
><br>
><br>
>Quoting "Mills, Douglas G" <<a href="mailto:dmills@illinois.edu">dmills@illinois.edu</a>>:<br>
><br>
>> Just to confirm -- it appears to me that the symb is unique to the<br>
>> resource and independent of the course, is that correct?<br>
>><br>
>> Thanks,<br>
>><br>
>> Doug<br>
>><br>
>> Douglas Mills<br>
>> Director of Instructional Technology<br>
>> Department of Chemistry<br>
>> University of Illinois<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On 12/14/15, 4:57 PM, "<a href="mailto:lon-capa-users-bounces@mail.lon-capa.org">lon-capa-users-bounces@mail.lon-capa.org</a> on<br>
>>behalf<br>
>> of Stuart Raeburn" <<a href="mailto:lon-capa-users-bounces@mail.lon-capa.org">lon-capa-users-bounces@mail.lon-capa.org</a> on behalf<br>
>>of<br>
>> <a href="mailto:raeburn@msu.edu">raeburn@msu.edu</a>> wrote:<br>
>><br>
>>> Bob,<br>
>>><br>
>>> The syntax is described in the LON-CAPA Script Functions help item:<br>
>>> e.g.,<br>
>>><br>
>>><a href="http://loncapa.chem.binghamton.edu/adm/help/Problem_LON-CAPA_Functions.h" rel="noreferrer" target="_blank">http://loncapa.chem.binghamton.edu/adm/help/Problem_LON-CAPA_Functions.h</a><br>
>>>lp<br>
>>><br>
>>> To access a student's submissions in a different problem you need to<br>
>>> supply a sixth argument -- a maplias, and the call is:<br>
>>><br>
>>><br>
>>>&submission($partid,$responseid,$version,$encode,$cleanupnum,$mapalias);<br>
>>><br>
>>> In the case of a published sequence, where you have authoring or<br>
>>> co-authoring rights, you can set a mapalias for a particular resource<br>
>>> in the sequence using the Advanced Editor in Authoring Space (prior to<br>
>>> publication).<br>
>>><br>
>>> If there is no mapalias set you can use the (much longer) unique<br>
>>> identifier of the resource instance (known as the "symb"). If you are<br>
>>> using a folder added via the Course Editor rather than a published<br>
>>> sequence, there is currently no mechanism to set a mapalias for a<br>
>>> particular resource instance in the folder (which is actually still a<br>
>>> sequence internally in LON-CAPA), so you will have to use the "symb".<br>
>>><br>
>>> You can display a list of "symb"s in a course using:<br>
>>> Course Editor > Content Utilities >  List Resource Identifiers<br>
>>> (the "symb"s are in the "Identifier" column).<br>
>>><br>
>>><br>
>>> Stuart Raeburn<br>
>>> LON-CAPA Academic Consortium<br>
>>><br>
>>><br>
>>> Quoting Bob Gonzales <<a href="mailto:rgonzal@binghamton.edu">rgonzal@binghamton.edu</a>>:<br>
>>><br>
>>>> Hi,<br>
>>>><br>
>>>> The release notes for 2.11.1 say this about &submission():<br>
>>>><br>
>>>> &submission() in one problem can access submissions by the same<br>
>>>>student<br>
>>>>     in a different problem.<br>
>>>><br>
>>>> Does this mean any problems in a course that the student has access to<br>
>>>> or<br>
>>>> do the problems still have to be in a sequence?<br>
>>>><br>
>>>> If a sequence is not required then what would be the the syntax of the<br>
>>>> call?<br>
>>>><br>
>>>> Thanks,<br>
>>>> Bob Gonzales<br>
>>>> Binghamton University<br>
>>>> Chemistry Dept<br>
>>><br>
>>> _______________________________________________<br>
>>> LON-CAPA-users mailing list<br>
>>> <a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>
>>> <a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
>><br>
>> _______________________________________________<br>
>> LON-CAPA-users mailing list<br>
>> <a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>
>> <a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
><br>
>_______________________________________________<br>
>LON-CAPA-users mailing list<br>
><a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>
><a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
<br>
_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" rel="noreferrer" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br>
</div></div></blockquote></div><br></div>