[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
damieng
damieng at source.lon-capa.org
Wed Aug 10 17:05:43 EDT 2016
damieng Wed Aug 10 21:05:43 2016 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
fixed documentation related to map symbs and ids, which do not mean the same thing in lonnavmaps and lonparmset
-------------- next part --------------
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.565 loncom/interface/lonparmset.pm:1.566
--- loncom/interface/lonparmset.pm:1.565 Mon Aug 8 18:19:16 2016
+++ loncom/interface/lonparmset.pm Wed Aug 10 21:05:42 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.565 2016/08/08 18:19:16 damieng Exp $
+# $Id: lonparmset.pm,v 1.566 2016/08/10 21:05:42 damieng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -371,10 +371,10 @@
# (parmval is also used for the log of parameter changes)
##################################################
-# Calls parmval_by_symb, getting the symb from $id (the big hash resource id) with &symbcache.
+# Calls parmval_by_symb, getting the symb from $id with &symbcache.
#
# @param {string} $what - part info and parameter name separated by a dot, e.g. '0.weight'
-# @param {string} $id - big hash resource id
+# @param {string} $id - resource id or map pc
# @param {string} $def - the resource's default value for this parameter
# @param {string} $uname - user name
# @param {string} $udom - user domain
@@ -394,7 +394,7 @@
# (level 1 is the most specific and will have precedence)
#
# @param {string} $what - part info and parameter name separated by a dot, e.g. '0.weight'
-# @param {string} $symb - resource symb
+# @param {string} $symb - resource symb or map src
# @param {string} $def - the resource's default value for this parameter
# @param {string} $uname - user name
# @param {string} $udom - user domain
@@ -597,7 +597,7 @@
}
}
-# cache big hash id -> symb, using lonnavmaps to find association
+# cache resource id or map pc -> resource symb or map src, using lonnavmaps to find association
{
my $symbsid; # course identifier, to initialize the cache only once for a course
my %symbs; # hash id->symb
@@ -607,7 +607,8 @@
undef(%symbs);
}
- # returns the symb corresponding to a big hash id (using lonnavmaps and a cache)
+ # returns the resource symb or map src corresponding to a resource id or map pc
+ # (using lonnavmaps and a cache)
sub symbcache {
my $id=shift;
if ($symbsid ne $env{'request.course.id'}) {
@@ -718,7 +719,7 @@
# Store a parameter value and type by ID, also triggering more parameter changes based on parameter default actions.
#
-# @param {string} $sresid - resource big hash id
+# @param {string} $sresid - resource id or map pc
# @param {string} $spnam - part info and parameter name separated by a dot or underscore, e.g. '0.weight'
# @param {integer} $snum - level
# @param {string} $nval - new value
@@ -737,7 +738,7 @@
# Store a parameter value and type by symb, also triggering more parameter changes based on parameter default actions.
# Uses storeparm_by_symb_inner to actually store the parameter, ignoring any returned error.
#
-# @param {string} $symb - resource symb
+# @param {string} $symb - resource symb or map src
# @param {string} $spnam - part info and parameter name separated by a dot or underscore, e.g. '0.weight'
# @param {integer} $snum - level
# @param {string} $nval - new value
@@ -807,7 +808,7 @@
# Store a parameter value and type by symb, without using the parameter default actions.
# Expire related sheets.
#
-# @param {string} $symb - resource symb
+# @param {string} $symb - resource symb or map src
# @param {string} $spnam - part info and parameter name separated by a dot, e.g. '0.weight'
# @param {integer} $snum - level
# @param {string} $nval - new value
@@ -1364,7 +1365,7 @@
# @param {string} $which - parameter key ('parameter_'.part.'_'.name)
# @param {hash reference} $part - parameter key -> parameter part (can be problem part.'_'.response id for response parameters)
# @param {hash reference} $name - parameter key -> parameter name
-# @param {hash reference} $symbp - resource id -> symb
+# @param {hash reference} $symbp - map pc or resource/map id -> map src.'___(all)' or resource symb
# @param {string} $rid - resource id
# @param {hash reference} $default - parameter key -> resource parameter default value
# @param {hash reference} $defaulttype - parameter key -> resource parameter default type
@@ -1650,16 +1651,16 @@
# Extracts lots of information about all of the the course's resources into a variety of hashes, using lonnavmaps and lonnet::metadata.
# All the parameters are references and are filled by the sub.
#
-# @param {array reference} $ids - resource ids
-# @param {hash reference} $typep - hash resource id (from big hash) -> resource type (file extension)
-# @param {hash reference} $keyp - hash resource id -> comma-separated list of parameter keys from lonnet::metadata
+# @param {array reference} $ids - resource and map ids
+# @param {hash reference} $typep - hash resource/map id -> resource type (file extension)
+# @param {hash reference} $keyp - hash resource/map id -> comma-separated list of parameter keys from lonnet::metadata
# @param {hash reference} $allparms - hash parameter name -> parameter title
# @param {hash reference} $allparts - hash parameter part -> part title (a parameter part can be problem part.'_'.response id for response parameters)
-# @param {hash reference} $allmaps - hash map id (from big hash) -> map src
-# @param {hash reference} $mapp - hash resource id -> enclosing map src
-# @param {hash reference} $symbp - hash map id or resource id -> map src.'___(all)' for a map or resource symb for a resource
-# @param {hash reference} $maptitles - hash map id or src -> map title (this should really be two separate hashes)
-# @param {hash reference} $uris - hash resource id -> resource src
+# @param {hash reference} $allmaps - hash map pc -> map src
+# @param {hash reference} $mapp - hash map pc or resource/map id -> enclosing map src
+# @param {hash reference} $symbp - hash map pc or resource/map id -> map src.'___(all)' for a map or resource symb for a resource
+# @param {hash reference} $maptitles - hash map pc or src -> map title (this should really be two separate hashes)
+# @param {hash reference} $uris - hash resource/map id -> resource src
# @param {hash reference} $keyorder - hash parameter key -> appearance rank for this parameter when looking through every resource and every parameter, starting at 100 (integer)
# @param {hash reference} $defkeytype - hash parameter name -> parameter type
sub extractResourceInformation {
@@ -2260,10 +2261,10 @@
# Used by table mode and overview mode.
#
# @param {Apache2::RequestRec} $r - the Apache request
-# @param {hash reference} $allmaps - hash map id -> map src
-# @param {string} $pschp - selected map id, or 'all'
+# @param {hash reference} $allmaps - hash map pc -> map src
+# @param {string} $pschp - selected map pc, or 'all'
# @param {hash reference} $maptitles - hash map id or src -> map title
-# @param {hash reference} $symbp - hash map id or resource id -> map src.'___(all)' for a map or resource symb for a resource
+# @param {hash reference} $symbp - hash map pc or resource/map id -> map src.'___(all)' or resource symb
sub mapmenu {
my ($r,$allmaps,$pschp,$maptitles,$symbp)=@_;
my %allmaps_inverted = reverse %$allmaps;
@@ -2619,7 +2620,7 @@
# pres_value - &&&-separated parameter values
# prevvisit - '1' if the user has submitted the form before
# pscat (multiple values) - selected parameter names
-# pschp - selected map id, or 'all'
+# pschp - selected map pc, or 'all'
# psprt (multiple values) - list of selected parameter parts
# filter - part of or whole parameter name, to be filtered out when parameters are displayed (unused ?)
# recent_* (* = parameter type) - recent values entered by the user for parameter types
@@ -2635,14 +2636,14 @@
# -------------------------------------------------------- Variable declaration
- my @ids=(); # resource ids
- my %symbp=(); # hash map id or resource id -> map src.'___(all)' for a map or resource symb for a resource
- my %mapp=(); # hash resource id -> enclosing map src
- my %typep=(); # hash resource id (from big hash) -> resource type (file extension)
- my %keyp=(); # hash resource id -> comma-separated list of parameter keys
- my %uris=(); # hash resource id -> resource src
- my %maptitles=(); # hash map id or src -> map title
- my %allmaps=(); # hash map id (from big hash) -> map src
+ my @ids=(); # resource and map ids
+ my %symbp=(); # hash map pc or resource/map id -> map src.'___(all)' or resource symb
+ my %mapp=(); # hash map pc or resource/map id -> enclosing map src
+ my %typep=(); # hash resource/map id -> resource type (file extension)
+ my %keyp=(); # hash resource/map id -> comma-separated list of parameter keys
+ my %uris=(); # hash resource/map id -> resource src
+ my %maptitles=(); # hash map pc or src -> map title
+ my %allmaps=(); # hash map pc -> map src
my %alllevs=(); # hash English level title -> value
my $uname; # selected user name
@@ -4881,15 +4882,15 @@
# The non-type value is always 1.
#
# @param {string} $cat - parameter name
-# @param {string} $pschp - selected map id, or 'all'
+# @param {string} $pschp - selected map pc, or 'all'
# @param {string} $parmlev - selected level value (full|map|general), or ''
# @param {hash reference} $listdata - the parameter data that will be modified
# @param {array reference} $psprt - selected parts
# @param {array reference} $selections - selected sections
# @param {hash reference} $defkeytype - hash parameter name -> parameter type
-# @param {hash reference} $allmaps - hash map id -> map src
-# @param {array reference} $ids - resource ids
-# @param {hash reference} $symbp - hash map id or resource id -> map src.'___(all)' for a map or resource symb for a resource
+# @param {hash reference} $allmaps - hash map pc -> map src
+# @param {array reference} $ids - resource and map ids
+# @param {hash reference} $symbp - hash map pc or resource/map id -> map src.'___(all)' or resource symb
sub secgroup_lister {
my ($cat,$pschp,$parmlev,$listdata,$psprt,$selections,$defkeytype,$allmaps,$ids,$symbp) = @_;
foreach my $item (@{$selections}) {
More information about the LON-CAPA-cvs
mailing list