[LON-CAPA-admin] "Version discrepancy"

Stuart Raeburn raeburn at loncapa.org
Tue Jun 2 19:50:05 EDT 2020


Paul,

When a LON-CAPA course session is set up, immediately after a user 
pushes the "Select" button from the Roles/Courses screen to select a 
role in a course, LON-CAPA will examine all the resources in the course 
(and the links between them) and will store that information in the 
user's course session file.

If a particular resource is included more than once in a course, then as 
part of the process of establishing the user's course session, a 
determination will be made of which version of each resource should be 
used.  By default the most recent version of a published resource is used.

Specific resource versions in use in a course can either defined based 
on the filename included in the src attribute for a resource tag in a 
.sequence file (or a .page file for a composite page), or in settings in 
the course itself, set via Course Editor > Content Utilities > 
"Check/Set Resource Versions"(stored in internally in the 
resourceversions.db GDBM file for the course, on the course's home server).

If a resource occurs multiple times in a course then LON-CAPA enforces a 
rule that the same version of the resource will be used in all instances 
of that resource in the course.

The message:

Version discrepancy: resource 
/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu 
prob04.problem included in both version mostrecent and version 1. Using 
version mostrecent.

will be displayed to a Course Coordinator if a sequence file contains 
resource 
src="/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.1.problem"

but the version to be used in the course (i.e., stored in the 
resourceversions.db GDBM file for the course) has been set to "mostrecent".

This message is not shown to students after selecting a student role in 
a course.

To eliminate this message a Course Coordinator could either: (a) 
explicitly set the version to be used in the course to 1 for each of:

/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob10.problem
/res/msu/physicslib/msuphysicslib/69_CircuitsAC_1_LR_LC/msuprob08.problem

using:
Course Editor > Content Utilities >  "Check/Set Resource Versions"

and selecting "All Resources (possibly large output)" in the "Change 
display" box and pushing Display.  Then the Course Coordinator would 
select 1 in the "Set Version to be used in Course" dropdown list for 
each of those three resources, and push "Save changes".

or

(b) If the five instances of msu-prob4.problem, two instances of 
msuprob08.problem, and single instance of msu-prob10.problem in the 
course were all imported as resources into the course (i.e., are not 
present because they are included in published sequence imported, as is, 
into the course), then you could use command line access to remove the 
version number from the src attribute for the resource tag for each 
instance.

To do so you would need to edit the appropriate sequence files in:

/home/httpd/lonUsers/ndsu/<1>/<2>/<3>/<course 
number>/userfiles/default_<folderID>.sequence

where <1>, <2>, and <3> are the first three characters in the unique 
course number, and folder ID is the unique number (a UNIX timestamp, or 
derived from one).

After making those changes:
e.g.,
replace 
src="/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.1.problem"

with

src="/res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem"

any users with an active session in the course would need to push the 
"re-select" button on the Roles/Courses screen to start a new course 
session.

Note: all submission data are stored by the unique resource instance 
identifier (aka symb), which has the format:

folder_id_resource

where resource is the path to the un-versioned resource (excluding the 
leading /res/), e.g.,
msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem

so what version of a resource is in use in a course has no impact on the 
ids used for storage of submissions, parameters etc. for a particular 
instance of a resource in a course.

Stuart Raeburn
LON-CAPA Academic Consortium

On 6/1/20 11:20 AM, Paul Omernik wrote:
> Hello,
> 
> I'm running into the following errors, and the version checking modules 
> only seem to change the errors, not resolve them:
> 
>     The following problems occurred:
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob10.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/69_CircuitsAC_1_LR_LC/msuprob08.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/66_Inductance_MagEnergy/msu-prob04.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
>     Version discrepancy: resource
>     /res/msu/physicslib/msuphysicslib/69_CircuitsAC_1_LR_LC/msuprob08.problem
>     included in both version mostrecent and version 1. Using version
>     mostrecent.
> 
> 
> How do I resolve these discrepancies?
> 
> Paul
> 
> _______________________________________________
> LON-CAPA-admin mailing list
> LON-CAPA-admin at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin
> 


More information about the LON-CAPA-admin mailing list