[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Institutional_Integration_Identity_Management.tex
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 29 Jul 2008 21:07:29 -0000
This is a MIME encoded message
--raeburn1217365649
Content-Type: text/plain
raeburn Tue Jul 29 17:07:29 2008 EDT
Modified files:
/loncom/html/adm/help/tex
Institutional_Integration_Identity_Management.tex
Log:
- Fix some carets.
- Eliminate deep nesting (was causing printing to fail).
--raeburn1217365649
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20080729170729.txt"
Index: loncom/html/adm/help/tex/Institutional_Integration_Identity_Management.tex
diff -u loncom/html/adm/help/tex/Institutional_Integration_Identity_Management.tex:1.3 loncom/html/adm/help/tex/Institutional_Integration_Identity_Management.tex:1.4
--- loncom/html/adm/help/tex/Institutional_Integration_Identity_Management.tex:1.3 Tue Jul 29 14:14:24 2008
+++ loncom/html/adm/help/tex/Institutional_Integration_Identity_Management.tex Tue Jul 29 17:07:29 2008
@@ -179,27 +179,27 @@
\texttt{if (\$srchby eq 'uname') \{}
\begin{quotation}
-\texttt{if (\$srchterm =\~{} /^\textbackslash{}w\{2,8\}\$/)
+\texttt{if (\$srchterm =\~{} /\^{}\textbackslash{}w\{2,8\}\$/)
\{}
\begin{quotation}
\texttt{if (\$srchtype eq 'contains') \{}
-\begin{quotation}
-\texttt{\$condition = \char`\"{}WHERE MSUNetID LIKE '\%\$srchterm\%'\char`\"{};}
-\texttt{\$ldapfilter = '(uid={*}'.\$srchterm.'{*})';}
-\end{quotation}
+\texttt{~~\$condition = \char`\"{}WHERE MSUNetID LIKE '\%\$srchterm\%'\char`\"{};}
+
+\texttt{~~\$ldapfilter = '(uid={*}'.\$srchterm.'{*})';}
+
\texttt{\} elsif (\$srchtype eq 'begins') \{}
-\begin{quotation}
-\texttt{\$condition = \char`\"{}WHERE MSUNetID LIKE '\$srchterm\%'\char`\"{};}
-\texttt{\$ldapfilter = '(uid='.\$srchterm.'{*})';}
-\end{quotation}
+\texttt{~~\$condition = \char`\"{}WHERE MSUNetID LIKE '\$srchterm\%'\char`\"{};}
+
+\texttt{~~\$ldapfilter = '(uid='.\$srchterm.'{*})';}
+
\texttt{\} else \{}
-\begin{quotation}
-\texttt{\$condition = \char`\"{}WHERE MSUNetID = '\$srchterm'\char`\"{};}
-\texttt{\$ldapfilter = '(uid='.\$srchterm.')';}
-\end{quotation}
+\texttt{~~\$condition = \char`\"{}WHERE MSUNetID = '\$srchterm'\char`\"{};}
+
+\texttt{~~\$ldapfilter = '(uid='.\$srchterm.')';}
+
\texttt{\}}
\end{quotation}
\texttt{\}}
@@ -210,41 +210,41 @@
\{}
\begin{quotation}
\texttt{if (\$srchtype eq 'contains') \{}
-\begin{quotation}
-\texttt{if (\$dbflag) \{}
-\begin{quotation}
-\texttt{my \$quoted\_last = \$dbh->quote('\%'.\$srchterm.'\%');}
-\texttt{\$condition = \char`\"{}WHERE LastName LIKE \$quoted\_last\char`\"{};}
-\end{quotation}
-\texttt{\}}
+\texttt{~~if (\$dbflag) \{}
+
+\texttt{~~~~my \$quoted\_last = \$dbh->quote('\%'.\$srchterm.'\%');}
+
+\texttt{~~~~\$condition = \char`\"{}WHERE LastName LIKE \$quoted\_last\char`\"{};}
+
+\texttt{~~\}}
+
+\texttt{~~\$ldapfilter = '(sn={*}'.\$srchterm.'{*})';}
-\texttt{\$ldapfilter = '(sn={*}'.\$srchterm.'{*})';}
-\end{quotation}
\texttt{\} elsif (\$srchtype eq 'begins') \{}
-\begin{quotation}
-\texttt{if (\$dbflag) \{}
-\begin{quotation}
-\texttt{my \$quoted\_last = \$dbh->quote(\$srchterm.'\%');}
-\texttt{\$condition = \char`\"{}WHERE LastName LIKE \$quoted\_last\char`\"{};}
-\end{quotation}
-\texttt{\}}
+\texttt{~~if (\$dbflag) \{}
+
+\texttt{~~~~my \$quoted\_last = \$dbh->quote(\$srchterm.'\%');}
+
+\texttt{~~~~\$condition = \char`\"{}WHERE LastName LIKE \$quoted\_last\char`\"{};}
+
+\texttt{~~\}}
+
+\texttt{~~\$ldapfilter = '(sn='.\$srchterm.'{*})';}
-\texttt{\$ldapfilter = '(sn='.\$srchterm.'{*})';}
-\end{quotation}
\texttt{\} else \{}
-\begin{quotation}
-\texttt{if (\$dbflag) \{}
-\begin{quotation}
-\texttt{my \$quoted\_last = \$dbh->quote(\$srchterm);}
-\texttt{\$condition = \char`\"{}WHERE LastName = \$quoted\_last\char`\"{};}
-\end{quotation}
-\texttt{\}}
+\texttt{~~if (\$dbflag) \{}
+
+\texttt{~~~my \$quoted\_last = \$dbh->quote(\$srchterm);}
+
+\texttt{~~~~\$condition = \char`\"{}WHERE LastName = \$quoted\_last\char`\"{};}
+
+\texttt{~~\}}
+
+\texttt{~~\$ldapfilter = '(sn='.\$srchterm.')';}
-\texttt{\$ldapfilter = '(sn='.\$srchterm.')';}
-\end{quotation}
\texttt{\}}
\end{quotation}
\texttt{\}}
@@ -255,7 +255,7 @@
\texttt{\$srchlast =\~{} s/\textbackslash{}s+\$//;}
-\texttt{\$srchfirst =\~{} s/^\textbackslash{}s+//;}
+\texttt{\$srchfirst =\~{} s/\^{}\textbackslash{}s+//;}
\texttt{if ((\$srchlast =\~{} /{[}A-Za-z\textbackslash{}-\textbackslash{}.'\textbackslash{}s]+/)
\&\& (\$srchfirst =\~{} /{[}A-Za-z\textbackslash{}-\textbackslash{}.'\textbackslash{}s]+/))
@@ -264,35 +264,56 @@
\texttt{my (\$quoted\_first,\$quoted\_last);}
\texttt{if (\$srchtype eq 'contains') \{}
-\begin{quotation}
-\texttt{if (\$dbflag) \{}
-\begin{quotation}
-\texttt{\$quoted\_last = \$dbh->quote('\%'.\$srchlast.'\%');}
-\texttt{\$quoted\_first = \$dbh->quote('\%'.\$srchfirst.'\%');}
+\texttt{~~if (\$dbflag) \{}
+
+\texttt{~~~~\$quoted\_last = \$dbh->quote('\%'.\$srchlast.'\%');}
+
+\texttt{~~~~\$quoted\_first = \$dbh->quote('\%'.\$srchfirst.'\%');}
-\texttt{\$condition = \char`\"{}WHERE ( LastName LIKE \$quoted\_last
+\texttt{~~~~\$condition = \char`\"{}WHERE ( LastName LIKE \$quoted\_last
AND FirstName LIKE \$quoted\_first )\char`\"{};}
-\end{quotation}
-\texttt{\}}
-\texttt{\$ldapfilter = '(\&(sn='.\$srchlast.'{*})(givenName='.\$srchfirst.'{*}))';}
-\end{quotation}
+\texttt{~~\}}
+
+\texttt{~~\$ldapfilter = '(\&(sn='.\$srchlast.'{*})(givenName='.\$srchfirst.'{*}))';}
+
\texttt{\} else \{}
\begin{quotation}
-\texttt{if (\$dbflag) \{}
+\texttt{foreach my \$table (@\{\$srchtables\}) \{}
\begin{quotation}
-\texttt{\$quoted\_last = \$dbh->quote(\$srchterm);}
+\texttt{next if (\$srchby \&\& \$condition eq '');}
+
+\texttt{my \$statement = \char`\"{}SELECT MSUNetID,Pid,FirstName,LastName,Person\_Type
+FROM \$table \$condition\char`\"{};}
-\texttt{\$quoted\_first = \$dbh->quote(\$srchterm);}
+\texttt{my \$sth = \$dbh->prepare(\char`\"{}\$statement\char`\"{});}
-\texttt{\$condition = \char`\"{}WHERE ( LastName = \$quoted\_last
-AND FirstName = \$quoted\_first )\char`\"{};}
-\end{quotation}
-\texttt{\}}
+\texttt{\$sth->execute();}
-\texttt{\$ldapfilter = '(\&(sn='.\$srchlast.')(givenName='.\$srchfirst.'))';}
+\texttt{while ( my(\$uname,\$pid,\$first,\$last,\$type) = \$sth->fetchrow\_array
+) \{}
+
+\texttt{~~\$pid=lc(\$pid);}
+
+\texttt{~~if (ref(\$instusers->\{\$uname\}) eq 'HASH') \{}
+
+\texttt{~~~~if (ref(\$instusers->\{\$uname\}\{'instst}
+\end{quotation}
\end{quotation}
+\texttt{~~if (\$dbflag) \{}
+
+\texttt{~~~~\$quoted\_last = \$dbh->quote(\$srchterm);}
+
+\texttt{~~~~\$quoted\_first = \$dbh->quote(\$srchterm);}
+
+\texttt{~~~~\$condition = \char`\"{}WHERE ( LastName = \$quoted\_last
+AND FirstName = \$quoted\_first )\char`\"{};}
+
+\texttt{~~\}}
+
+\texttt{~~\$ldapfilter = '(\&(sn='.\$srchlast.')(givenName='.\$srchfirst.'))';}
+
\texttt{\}}
\end{quotation}
\texttt{\}}
@@ -300,14 +321,14 @@
\texttt{\} elsif (\$srchby eq 'id') \{}
\begin{quotation}
\texttt{if (\$dbflag) \{}
-\begin{quotation}
-\texttt{if (\$srchterm =\~{} /^{[}AZ]\textbackslash{}d\{8\}\$/)
+
+\texttt{~~if (\$srchterm =\~{} /\^{}{[}AZ]\textbackslash{}d\{8\}\$/)
\{}
\begin{quotation}
-\texttt{\$condition = \char`\"{}WHERE Pid = '\$srchterm'\char`\"{};}
-\end{quotation}
-\texttt{\}}
+\texttt{~~\$condition = \char`\"{}WHERE Pid = '\$srchterm'\char`\"{};}
\end{quotation}
+\texttt{~~\}}
+
\texttt{\}}
\end{quotation}
\texttt{\}}
@@ -327,125 +348,125 @@
\texttt{while ( my(\$uname,\$pid,\$first,\$last,\$type) = \$sth->fetchrow\_array
) \{}
-\begin{quotation}
-\texttt{\$pid=lc(\$pid);}
-\texttt{if (ref(\$instusers->\{\$uname\}) eq 'HASH') \{}
-\begin{quotation}
-\texttt{if (ref(\$instusers->\{\$uname\}\{'inststatus'\}) eq 'ARRAY')
+\texttt{~~\$pid=lc(\$pid);}
+
+\texttt{~~if (ref(\$instusers->\{\$uname\}) eq 'HASH') \{}
+
+\texttt{~~~~if (ref(\$instusers->\{\$uname\}\{'inststatus'\})
+eq 'ARRAY') \{}
+
+\texttt{~~~~~~if (!grep(/\^{}\$type\$/,@\{\$instusers->\{\$uname\}\{'inststatus'\}\}))
\{}
-\begin{quotation}
-\texttt{if (!grep(/^\$type\$/,@\{\$instusers->\{\$uname\}\{'inststatus'\}\}))
+
+\texttt{~~~~~~~~push(@\{\$instusers->\{\$uname\}\{'inststatus'\}\},\$type);}
+
+\texttt{~~~~~~\}}
+
+\texttt{~~~~\}}
+
+\texttt{~~~~if (\$pid ne \$instusers->\{\$uname\}\{'id'\}) \{}
+
+\texttt{~~~~~~if (\$instusers->\{\$uname\}\{'id'\} =\~{}
+/\^{}A\textbackslash{}d\{8\}\$/) \{}
+
+\texttt{~~~~~~~~if (\$pid =\~{} /\^{}A\textbackslash{}d\{8\}\$/)
\{}
-\begin{quotation}
-\texttt{push(@\{\$instusers->\{\$uname\}\{'inststatus'\}\},\$type);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\}}
-\texttt{if (\$pid ne \$instusers->\{\$uname\}\{'id'\}) \{}
-\begin{quotation}
-\texttt{if (\$instusers->\{\$uname\}\{'id'\} =\~{} /^A\textbackslash{}d\{8\}\$/)
+\texttt{~~~~~~~~~~if (ref(\$multipids\{\$uname\}) eq 'ARRAY')
\{}
-\begin{quotation}
-\texttt{if (\$pid =\~{} /^A\textbackslash{}d\{8\}\$/)
+
+\texttt{~~~~~~~~~~~~if (!grep(/\^{}\$pid\$/,@\{\$multipids\{\$uname\}\}))
\{}
-\begin{quotation}
-\texttt{if (ref(\$multipids\{\$uname\}) eq 'ARRAY') \{}
-\begin{quotation}
-\texttt{if (!grep(/^\$pid\$/,@\{\$multipids\{\$uname\}\}))
+
+\texttt{~~~~~~~~~~~~~~push(@\{\$multipids\{\$uname\}\},\$pid);}
+
+\texttt{~~~~~~~~~~~~\}}
+
+\texttt{~~~~~~~~~~\} else \{}
+
+\texttt{~~~~~~~~~~~~@\{\$multipids\{\$uname\}\} = (\$instusers->\{\$uname\}\{'id'\},\$pid);}
+
+\texttt{~~~~~~~~~~\}}
+
+\texttt{~~~~~~~~~~\$instusers->\{\$uname\}\{'id'\} = \$pid;}
+
+\texttt{~~~~~~~~\}}
+
+\texttt{~~~~~~\} elsif (\$instusers->\{\$uname\}\{'id'\} =\~{}
+/\^{}Z\textbackslash{}d\{8\}\$/) \{}
+
+\texttt{~~~~~~~~if (\$pid =\~{} /\^{}Z\textbackslash{}d\{8\}\$/)
\{}
-\begin{quotation}
-\texttt{push(@\{\$multipids\{\$uname\}\},\$pid);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} else \{}
-\begin{quotation}
-\texttt{@\{\$multipids\{\$uname\}\} = (\$instusers->\{\$uname\}\{'id'\},\$pid);}
-\end{quotation}
-\texttt{\}}
-\texttt{\$instusers->\{\$uname\}\{'id'\} = \$pid;}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} elsif (\$instusers->\{\$uname\}\{'id'\} =\~{}
-/^Z\textbackslash{}d\{8\}\$/) \{}
-\begin{quotation}
-\texttt{if (\$pid =\~{} /^Z\textbackslash{}d\{8\}\$/)
+\texttt{~~~~~~~~~~if (ref(\$multipids\{\$uname\}) eq 'ARRAY')
\{}
-\begin{quotation}
-\texttt{if (ref(\$multipids\{\$uname\}) eq 'ARRAY') \{}
-\begin{quotation}
-\texttt{if (!grep(/^\$pid\$/,@\{\$multipids\{\$uname\}\}))
+
+\texttt{~~~~~~~~~~~~if (!grep(/\^{}\$pid\$/,@\{\$multipids\{\$uname\}\}))
\{}
-\begin{quotation}
-\texttt{push(@\{\$multipids\{\$uname\}\},\$pid);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} else \{}
-\begin{quotation}
-\texttt{@\{\$multipids\{\$uname\}\} = (\$instusers->\{\$uname\}\{'id'\},\$pid);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} elsif (\$pid =\~{} /^A\textbackslash{}d\{8\}\$/)
+
+\texttt{~~~~~~~~~~~~~~push(@\{\$multipids\{\$uname\}\},\$pid);}
+
+\texttt{~~~~~~~~~~~~\}}
+
+\texttt{~~~~~~~~~~\} else \{}
+
+\texttt{~~~~~~~~~~~~@\{\$multipids\{\$uname\}\} = (\$instusers->\{\$uname\}\{'id'\},\$pid);}
+
+\texttt{~~~~~~~~~~\}}
+
+\texttt{~~~~~~~~\} elsif (\$pid =\~{} /\^{}A\textbackslash{}d\{8\}\$/)
\{}
-\begin{quotation}
-\texttt{\$instusers->\{\$uname\}\{'id'\} = \$pid;}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} else \{}
-\begin{quotation}
-\texttt{\$instusers->\{\$uname\} = \{}
-\begin{quotation}
-\texttt{firstname => \$first,}
-\texttt{lastname => \$last,}
+\texttt{~~~~~~~~~~\$instusers->\{\$uname\}\{'id'\} = \$pid;}
-\texttt{id => \$pid,}
+\texttt{~~~~~~~~\}}
-\texttt{permanentemail => \$uname.'@msu.edu', }
+\texttt{~~~~~~\}}
-\texttt{inststatus => {[}\$type],}
-\end{quotation}
-\texttt{\};}
-\end{quotation}
-\texttt{\}}
+\texttt{~~~~\}}
-\texttt{if (defined(\$instids->\{\$pid\})) \{}
-\begin{quotation}
-\texttt{if (ref(\$instids->\{\$pid\}) eq 'ARRAY') \{}
-\begin{quotation}
-\texttt{if (!grep(/^\$uname\$/,@\{\$instids->\{\$pid\}\}))
+\texttt{~~\} else \{}
+
+\texttt{~~~~\$instusers->\{\$uname\} = \{}
+
+\texttt{~~~~~~firstname => \$first,}
+
+\texttt{~~~~~~lastname => \$last,}
+
+\texttt{~~~~~~id => \$pid,}
+
+\texttt{~~~~~~permanentemail => \$uname.'@msu.edu', }
+
+\texttt{~~~~~~inststatus => {[}\$type],}
+
+\texttt{~~~~\};}
+
+\texttt{~~\}}
+
+\texttt{~~if (defined(\$instids->\{\$pid\})) \{}
+
+\texttt{~~~~if (ref(\$instids->\{\$pid\}) eq 'ARRAY') \{}
+
+\texttt{~~~~~~if (!grep(/\^{}\$uname\$/,@\{\$instids->\{\$pid\}\}))
\{}
-\begin{quotation}
-\texttt{push(@\{\$instids->\{\$pid\}\},\$uname);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\} elsif (\$instids->\{\$pid\} ne \$uname) \{}
-\begin{quotation}
-\texttt{@\{\$instids->\{\$pid\}\} = (\$instids->\{\$pid\},\$uname);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\end{quotation}
-\end{quotation}
-\texttt{\} else \{}
-\begin{quotation}
-\texttt{\$instids->\{\$pid\} = \$uname;}
-\begin{quotation}
-\texttt{\}}
-\end{quotation}
+
+\texttt{~~~~~~~~push(@\{\$instids->\{\$pid\}\},\$uname);}
+
+\texttt{~~~~~~\}}
+
+\texttt{~~~~\} elsif (\$instids->\{\$pid\} ne \$uname) \{}
+
+\texttt{~~~~~~@\{\$instids->\{\$pid\}\} = (\$instids->\{\$pid\},\$uname);}
+
+\texttt{~~~~\}}
+
+\texttt{~~\} else \{}
+
+\texttt{~~~~\$instids->\{\$pid\} = \$uname;}
+
+\texttt{~~\}}
+
\texttt{\}}
\texttt{\$outcome = 'ok';}
@@ -539,55 +560,52 @@
\texttt{\}}
\texttt{if (ref(\$types) eq 'ARRAY') \{}
+
+\texttt{~~if (@\{\$types\} > 0) \{}
\begin{quotation}
-\texttt{if (@\{\$types\} > 0) \{}
-\begin{quotation}
-\texttt{if ((\$type ne '') \&\& !(grep(/^\$type\$/,@\{\$types\})))
-\{}
-\begin{quotation}
-\texttt{next if (!grep(/^default\$/,@\{\$types\}));}
-\end{quotation}
-\texttt{\}}
+\texttt{~~if ((\$type ne '') \&\& !(grep(/\^{}\$type\$/,@\{\$types\}))) }
+
+\texttt{~~~~next if (!grep(/\^{}default\$/,@\{\$types\}));}
+
+\texttt{~~\}}
+
+\texttt{~~next if ((\$type eq '') \&\& (!grep(/\^{}default\$/,@\{\$types\})));}
-\texttt{next if ((\$type eq '') \&\& (!grep(/^default\$/,@\{\$types\})));}
-\end{quotation}
\texttt{\}}
\end{quotation}
\texttt{\}}
\texttt{if (ref(\$instusers->\{\$uname\}) eq 'HASH') \{}
-\begin{quotation}
-\texttt{if (ref(\$instusers->\{\$uname\}\{'inststatus'\}) eq 'ARRAY')
+
+\texttt{~~if (ref(\$instusers->\{\$uname\}\{'inststatus'\}) eq 'ARRAY')
\{}
-\begin{quotation}
-\texttt{if (!grep(/^\$type\$/,@\{\$instusers->\{\$uname\}\{'inststatus'\}\}))
+
+\texttt{~~~~if (!grep(/\^{}\$type\$/,@\{\$instusers->\{\$uname\}\{'inststatus'\}\}))
\{}
-\begin{quotation}
-\texttt{push(@\{\$instusers->\{\$uname\}\{'inststatus'\}\},\$type);}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
-\texttt{\}}
-\end{quotation}
+
+\texttt{~~~~~~push(@\{\$instusers->\{\$uname\}\{'inststatus'\}\},\$type);}
+
+\texttt{~~~~\}}
+
+\texttt{~~\}}
+
\texttt{\} else \{}
-\begin{quotation}
-\texttt{\$instusers->\{\$uname\} = \{}
-\begin{quotation}
-\texttt{firstname => \$first,}
-\texttt{lastname => \$last,}
+\texttt{~~\$instusers->\{\$uname\} = \{}
-\texttt{id => '',}
+\texttt{~~firstname => \$first,}
-\texttt{permanentemail => \$email,}
+\texttt{~~lastname => \$last,}
+
+\texttt{~~id => '',}
+
+\texttt{~~permanentemail => \$email,}
+
+\texttt{~~inststatus => {[}\$type],}
-\texttt{inststatus => {[}\$type],}
-\end{quotation}
\texttt{\};}
\end{quotation}
\texttt{\}}
-\end{quotation}
-\texttt{\}}
\texttt{\$ldap->unbind;}
\end{quotation}
--raeburn1217365649--