--- loncom/interface/loncommon.pm 2010/01/19 16:20:38 1.692.4.23
+++ loncom/interface/loncommon.pm 2010/07/21 22:23:08 1.692.4.36
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.692.4.23 2010/01/19 16:20:38 raeburn Exp $
+# $Id: loncommon.pm,v 1.692.4.36 2010/07/21 22:23:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -515,6 +515,10 @@ sub coursebrowser_javascript {
else {
if (formname == 'portform') {
url += '&setroles='+extra_element;
+ } else {
+ if (formname == 'rules') {
+ url += '&fixeddom='+extra_element;
+ }
}
}
}
@@ -1878,7 +1882,7 @@ sub select_form {
$selectform.=
'\n";
+ ">".$hash{$key}."\n";
}
$selectform.="";
return $selectform;
@@ -4190,16 +4194,39 @@ sub get_domainconf {
if (defined($cached)) { return %{$result}; }
my %domconfig = &Apache::lonnet::get_dom('configuration',
- ['login','rolecolors'],$udom);
+ ['login','rolecolors','loginvia'],$udom);
my (%designhash,%legacy);
if (keys(%domconfig) > 0) {
if (ref($domconfig{'login'}) eq 'HASH') {
if (keys(%{$domconfig{'login'}})) {
foreach my $key (keys(%{$domconfig{'login'}})) {
if (ref($domconfig{'login'}{$key}) eq 'HASH') {
- foreach my $img (keys(%{$domconfig{'login'}{$key}})) {
- $designhash{$udom.'.login.'.$key.'_'.$img} =
- $domconfig{'login'}{$key}{$img};
+ if ($key eq 'loginvia') {
+ if (ref($domconfig{'login'}{'loginvia'}) eq 'HASH') {
+ my @ids = &Apache::lonnet::current_machine_ids();
+ foreach my $hostname (@ids) {
+ if (ref($domconfig{'login'}{'loginvia'}{$hostname}) eq 'HASH') {
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'server'}) {
+ my $server = $domconfig{'login'}{'loginvia'}{$hostname}{'server'};
+ $designhash{$udom.'.login.loginvia'} = $server;
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'} eq 'custom') {
+
+ $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'custompath'};
+ } else {
+ $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'};
+ }
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'exempt'}) {
+ $designhash{$udom.'.login.loginvia_exempt_'.$hostname} = $domconfig{'login'}{'loginvia'}{$hostname}{'exempt'};
+ }
+ }
+ }
+ }
+ }
+ } else {
+ foreach my $img (keys(%{$domconfig{'login'}{$key}})) {
+ $designhash{$udom.'.login.'.$key.'_'.$img} =
+ $domconfig{'login'}{$key}{$img};
+ }
}
} else {
$designhash{$udom.'.login.'.$key}=$domconfig{'login'}{$key};
@@ -4226,6 +4253,11 @@ sub get_domainconf {
} else {
$legacy{'rolecolors'} = 1;
}
+ if (ref($domconfig{'autoenroll'}) eq 'HASH') {
+ if ($domconfig{'autoenroll'}{'co-owners'}) {
+ $designhash{$udom.'.autoassign.co-owners'}=$domconfig{'autoenroll'}{'co-owners'};
+ }
+ }
if (keys(%legacy) > 0) {
my %legacyhash = &get_legacy_domconf($udom);
foreach my $item (keys(%legacyhash)) {
@@ -4738,14 +4770,6 @@ sub standard_css {
h1, h2, h3, th { font-family: $sans }
a:focus { color: red; background: yellow }
-hr {
- clear: both;
- color: $tabbg;
- background-color: $tabbg;
- height: 3px;
- border: none;
-}
-
table.thinborder,
table.thinborder tr th {
@@ -5075,12 +5099,20 @@ table.LC_data_table tr td.LC_leftcol_hea
}
table.LC_data_table tr.LC_empty_row td,
table.LC_nested tr.LC_empty_row td {
- background-color: #FFFFFF;
font-weight: bold;
font-style: italic;
text-align: center;
padding: 8px;
}
+
+table.LC_data_table tr.LC_empty_row td {
+ background-color: $tabbg;
+}
+
+table.LC_nested tr.LC_empty_row td {
+ background-color: #FFFFFF;
+}
+
table.LC_nested tr.LC_empty_row td {
padding: 4ex
}
@@ -5246,6 +5278,29 @@ table#LC_browser tr.LC_browser_folder {
background: #CCCCFF;
}
+table.LC_data_table tr > td.LC_browser_file,
+table.LC_data_table tr > td.LC_browser_file_published {
+ background: #AAEE77;
+}
+
+table.LC_data_table tr > td.LC_browser_file_locked,
+table.LC_data_table tr > td.LC_browser_file_unpublished {
+ background: #FFAA99;
+}
+
+table.LC_data_table tr > td.LC_browser_file_obsolete {
+ background: #888888;
+}
+
+table.LC_data_table tr > td.LC_browser_file_modified,
+table.LC_data_table tr > td.LC_browser_file_metamodified {
+ background: #F8F866;
+}
+
+table.LC_data_table tr.LC_browser_folder > td {
+ background: #E0E8FF;
+}
+
table.LC_data_table tr > td.LC_roles_is {
/* background: #77FF77; */
}
@@ -5584,7 +5639,7 @@ table.LC_prior_match tr td {
border: 1px solid #000000;
}
-span.LC_nobreak {
+.LC_nobreak {
white-space: nowrap;
}
@@ -6373,7 +6428,7 @@ Returns either 'student','coordinator','
###############################################
sub get_users_function {
my $function = 'student';
- if ($env{'request.role'}=~/^(cc|co|in|ta|ep)/
+ if ($env{'request.role'}=~/^(cc|co|in|ta|ep)/) {
$function='coordinator';
}
if ($env{'request.role'}=~/^(su|dc|ad|li)/) {
@@ -8166,7 +8221,7 @@ sub csv_print_select_table {
my ($value,$display,$defaultcol)=@{ $array_ref };
$r->print(&start_data_table_row().'
'.$display.' | ');
- $r->print(' |