[LON-CAPA-users] Linked Resources?
raeburn at msu.edu
Tue Jul 2 23:12:55 EDT 2019
The posted example (from 2012) found at:
also works with all versions of LON-CAPA released since 2012.
The first thing I would look at in your local instance of that example from the listserv is to confirm (in course context) that a mapalias is listed for the specific resource in the published sequence which you imported into your course.
The way to check if an alias (for a resource) is available in course context is to click "Content Settings" in the Functions menu when displaying the resource (e.g., p1.problem in the example in the earlier post).
You should see the alias listed in the table cell for:
Row: "Resource alias name for conditions [Part: 0] (mapalias)"
Column: Any User -- Resource Level -- from Enclosing Map or Folder (i.e., right column of the two pink columns).
If you do not see the alias name there ...
If you are author or a co-author for the published sequence, and your course session is on the library server that is also the home server for the the Authoring Space where the published sequence was created, you'll have access to an "Edit" link in the Course Editor. Clicking the "Edit" link will take you to the Authoring Space, where you'll click "Advanced Edit" to launch the Advanced "RAT" which is used to set the mapalias for a resource in a map.
To set a mapalias for a resource you need to click on the square containing the particular resource in the linked set of resources, which will pop-up a window (the "edit" window). Click on "Set Parameters", which will open yet another window (with the title: LON-CAPA Set Resource Parameters in Map). You'll likely need to override pop-up blocking.
In the row: Custom Parameter parameter_0_mapalias you should see the mapalias you previously set listed in the "Default" column. If it is not there, type the desired alias in the "Value" textbox, check the checkbox in the "Set" column, and push the "Save" button. Then in the "Edit" pop-up click "Save changes" and in the main window click "Save map" (the first on the Save actions in the menu above the map of linked resources. Lastly, click "Publish" in the Functions menu at the top of the page.
Currently you can only set a maplias for a resource by including a published map (i.e., a .sequence or .page) imported into a course.
For LON-CAPA 2.12 I have implemented the ability to set a mapalias for a problem within a course using the Course Editor. A mapalias set there (via a "Set Alias" link) behaves the same way as one set in a published sequence, which therefore means you can use an alias without the requirement to use a published map when adding the resource to a course.
> EXT calls and submission calls both seem to be ignoring the $symbparm / $mapalias parameter,
> returning information about the current exercise only.
If information is returned about the current problem, then that means that the mapalias is not being found in the user's course session file, most likely because it is absent from the published sequence file which references the problem.
> Similarly, it did not fix it to set the mapalias explicitly in the course contents.
Settings > "Edit Resource Parameters - Overview Mode"
Settings > " Edit Resource Parameters - Table Mode"
both include a checkbox for "Resource alias name for conditions" in the Miscellaneous box in "Parameter Specification", which permits you to set a parameter for mapalias in a course, any parameter you set there is not used.
See also the discussion here on re-usability:
Note: the current implementation makes a separate call to retrieve the data from the user's home server each time an &EXT() call is used to retrieve data for a resource that is different from the one currently being rendered. As a result, LON-CAPA is currently inefficient when you are acquiring multiple pieces of information for a single resource (distinct from the one being rendered). Temporary storage of data retrieved by the first &EXT() call for a particular resource (for the duration of the user's request) would boost performance for that particular use case.
LON-CAPA Academic Consortium
From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Clinton Bradford <bradfor3 at math.purdue.edu>
Sent: Tuesday, July 2, 2019 3:48:13 PM
To: Discussion list for LON-CAPA users
Subject: [LON-CAPA-users] Linked Resources?
Hello LonCapa ,
Does anyone know how to get linked resources working?
I have copied the example given at http://mail.lon-capa.org/pipermail/lon-capa-users/2012-April/003965.html, changing the path urls appropriately, but even in a student account the link reference does not work. Similarly, it did not fix it to set the mapalias explicitly in the course contents.
EXT calls and submission calls both seem to be ignoring the $symbparm / $mapalias parameter, returning information about the current exercise only.
Any help would be appreciated; has anyone managed to get linked exercises working lately? This is on the Purdue server.
More information about the LON-CAPA-users