File:  [LON-CAPA] / loncom / html / adm / help / tex / Guts_Apache_Env.tex
Revision 1.3: download - view: text, annotated - select for diffs
Thu Apr 7 06:56:22 2005 UTC (19 years, 3 months ago) by albertel
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_X, version_2_8_99_1, version_2_8_99_0, version_2_8_2, version_2_8_1, version_2_8_0, version_2_7_X, version_2_7_99_1, version_2_7_99_0, version_2_7_1, version_2_7_0, version_2_6_X, version_2_6_99_1, version_2_6_99_0, version_2_6_3, version_2_6_2, version_2_6_1, version_2_6_0, version_2_5_X, version_2_5_99_1, version_2_5_99_0, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_X, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_1_3, version_2_1_2, version_2_1_1, version_2_1_0, version_2_12_X, version_2_11_X, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, version_2_0_X, version_2_0_99_1, version_2_0_2, version_2_0_1, version_2_0_0, version_1_99_3, version_1_99_2, version_1_99_1_tmcc, version_1_99_1, version_1_99_0_tmcc, version_1_99_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, bz6209-base, bz6209, bz5969, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3, GCI_2, GCI_1, BZ5971-printing-apage, BZ5434-fox, BZ4492-merge, BZ4492-feature_horizontal_radioresponse
- ENV -> env

    1: \label{Guts_Apache_Env}
    2: 
    3: The environment is accessible through the global hash named \%env.
    4: In addition to the standard variables placed in the environment by
    5: the Apache server, LON-CAPA places a lot of information in the \%env.
    6: You can see this information by going to \texttt{/adm/test}; the top
    7: part of that screen will show your current \%env. (You may need to
    8: modify \texttt{/home/httpd/lonTabs/htpasswd} before you can view that
    9: handler and change the password for \texttt{lonadm}.)
   10: 
   11: Many of the environment variables are primarily useful to the authentication
   12: and permission routines (such as \texttt{Apache::lonnet::allowed}),
   13: and are very rarely directly manipulated. 
   14: 
   15: Generally, the \%env is informally organized into {}``namespaces'',
   16: such as {}``browser'' (containing browser information), {}``course''
   17: (containing course-specific information), etc. For the following table,
   18: the full name of the variable is the name shown on the left, prepended
   19: by the section it is in. For instance, the first \%env member shown
   20: below is \$env\{'browser.mathml'\}. Only generally useful portions
   21: of the \%env are covered here.
   22: 
   23: \begin{longtable}{|c|c|}
   24: \hline 
   25: \textbf{\%env name}&
   26: \textbf{Description}\tabularnewline
   27: \hline
   28: \endfirsthead
   29: \textbf{browser:}&
   30: \tabularnewline
   31: \hline 
   32: .mathml&
   33: if true, browser support MathML\tabularnewline
   34: \hline 
   35: .os&
   36: indicates OS of browser\tabularnewline
   37: \hline 
   38: .type&
   39: indicates type of browser ({}``ie'', {}``mozilla'', etc)\tabularnewline
   40: \hline 
   41: .version&
   42: version of the browser\tabularnewline
   43: \hline 
   44: \textbf{environment:}&
   45: \tabularnewline
   46: \hline 
   47: .firstname&
   48: user's firstname\tabularnewline
   49: \hline 
   50: .generation&
   51: user's generation ({}``1st'', {}``jr.'', etc)\tabularnewline
   52: \hline 
   53: .id&
   54: institution-specific ID number\tabularnewline
   55: \hline 
   56: .lastname&
   57: user's lastname\tabularnewline
   58: \hline
   59: .middlename&
   60: user's middle name\tabularnewline
   61: \hline
   62: .remote&
   63: 'on' if the user has the remote open\tabularnewline
   64: \hline
   65: \textbf{request:}&
   66: \tabularnewline
   67: \hline
   68: .course.fn&
   69: {}``full name'' of the course directory\tabularnewline
   70: \hline
   71: .course.id&
   72: ID of the course currently logged into\tabularnewline
   73: \hline
   74: .course.sec&
   75: current section of the course the user is in\tabularnewline
   76: \hline
   77: .course.uri&
   78: URI of the top-level map\tabularnewline
   79: \hline
   80: .filename&
   81: requested filename for current request\tabularnewline
   82: \hline
   83: .host&
   84: originating IP of request\tabularnewline
   85: \hline
   86: .role&
   87: full role designation for the course\tabularnewline
   88: \hline
   89: .role.adv&
   90: whether the user is {}``advanced''; generally don't use\tabularnewline
   91: \hline
   92: .role.domain&
   93: domain of the current course\tabularnewline
   94: \hline
   95: \textbf{user:}&
   96: \tabularnewline
   97: \hline
   98: .adv&
   99: whether the user is {}``advanced''; generally don't use\tabularnewline
  100: \hline
  101: .author&
  102: whether the user is an author\tabularnewline
  103: \hline
  104: .domain&
  105: domain the user is from\tabularnewline
  106: \hline
  107: .home&
  108: user's home server\tabularnewline
  109: \hline
  110: .name&
  111: user's login name\tabularnewline
  112: \hline
  113: \end{longtable}
  114: 
  115: Other variables are frequently available, and you can add new ones
  116: easily; see \texttt{Apache::lonnet::appenv()} and friends.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>