[LON-CAPA-users] using &submission() between problems

Bob Gonzales rgonzal at binghamton.edu
Tue Dec 15 15:44:04 EST 2015


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.

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).

Thanks,
Bob Gonzales
Binghamton University
Chemistry Dept


On Tue, Dec 15, 2015 at 2:56 PM, Mills, Douglas G <dmills at illinois.edu>
wrote:

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


More information about the LON-CAPA-users mailing list