NAME

lonparmset - Handler to set parameters for assessments and course


SYNOPSIS

lonparmset provides an interface to setting course parameters.


DESCRIPTION

This module sets coursewide and assessment parameters.


INTERNAL SUBROUTINES

parmval()

Figure out a cascading parameter.

Inputs: $what - a parameter spec (incluse part info and name I.E. 0.weight) $id - a bighash Id number $def - the resource's default value 'stupid emacs

Returns: A list, the first item is the index into the remaining list of items of parm valuse that is the active one, the list consists of parm values at the 14 possible levels

14- General Course 13- Map or Folder level in course 12- resource default 11- map default 10- resource level in course 9 - General for section 8 - Map or Folder level for section 7 - resource level in section 6 - General for group 5 - Map or Folder level for group 4 - resource level in group 3 - General for specific student 2 - Map or Folder level for specific student 1 - resource level for specific student

parmval_by_symb()
reset_caches()
cacheparmhash()
parmhash()
symbcache()
preset_defaults()
date_sanity_info()
storeparm()

Store a parameter by symb

    Takes
    - symb
    - name of parameter
    - level
    - new value
    - new type
    - username
    - userdomain
log_parmset()
storeparm_by_symb_inner()
valout()

Format a value for output.

Inputs: $value, $type, $editable

Returns: $value, formatted for output. If $type indicates it is a date, localtime($value) is returned. $editable will return an icon to click on

plink()

Produces a link anchor.

Inputs: $type,$dis,$value,$marker,$return,$call

Returns: scalar with html code for a link which will envoke the javascript function 'pjump'.

page_js()
startpage()
print_row()
print_td()
print_usergroups()
parm_control_group()
extractResourceInformation() :

Given the course data hash, extractResourceInformation extracts lots of information about the course's resources into a variety of hashes.

Input: See list below:

  • ids : An array that will contain all of the ids in the course.
  • typep : hash, id->type, where ``type'' contains the extension of the file, thus, problem exam quiz assess survey form.
  • keyp : hash, id->key list, will contain a comma separated list of the meta-data keys available for the given id
  • allparms : hash, name of parameter->display value (what is the display value?)
  • allparts : hash, part identification->text representation of part, where the text representation is ``[Part $part]''
  • allkeys : hash, full key to part->display value (what's display value?)
  • allmaps : hash, ???
  • fcat : ???
  • defp : hash, ???
  • mapp : ??
  • symbp : hash, id->full sym?
    isdateparm()
    parmmenu()
    partmenu()
    usermenu()
    displaymenu()
    mapmenu()
    levelmenu()
    sectionmenu()
    keysplit()
    keysinorder()
    keysinorder_bytype()
    keysindisplayorder()
    standardkeyorder()
    assessparms() :

    Show assessment data and parameters. This is a large routine that should be simplified and shortened... someday.

    Inputs: $r

    Returns: nothing

    Variables used (guessed by Jeremy):

  • pscat: ParameterS CATegories? ends up a list of the types of parameters that exist, e.g., tol, weight, acc, opendate, duedate, answerdate, sig, maxtries, type.
  • psprt: ParameterS PaRTs? a list of the parts of a problem that we are displaying? Used to display only selected parts?
  • @catmarker contains list of all possible parameters including part #s
  • $fullkeyp contains the full part/id # for the extraction of proper parameters
  • $tempkeyp contains part 0 only (no ids - ie, subparts) When storing information, store as part 0 When requesting information, request from full part
    tablestart()
    tableend()
    extractuser()
    parse_listdata_key()
    listdata()
    date_interval_selector()
    get_date_interval_from_form()
    default_selector()
    string_selector()
    dateshift()
    newoverview()
    secgroup_lister()
    overview()
    clean_parameters()
    date_shift_one()
    date_shift_two()
    parse_key()
    header()

    Output html header for page

  • print_main_menu()
    output_row()

    Set portfolio metadata

    order_meta_fields()
    addmetafield()
    setrestrictmeta()
    get_added_meta_fieldnames()
    get_deleted_meta_fieldnames()
    defaultsetter()
    components()
    load_parameter_names()
    parm_change_log()
    handler() :

    Main handler. Calls &assessparms subroutine.