--- loncom/interface/domainprefs.pm 2014/03/18 02:41:29 1.160.6.36 +++ loncom/interface/domainprefs.pm 2014/03/03 17:11:42 1.228 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.160.6.36 2014/03/18 02:41:29 raeburn Exp $ +# $Id: domainprefs.pm,v 1.228 2014/03/03 17:11:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -211,13 +211,15 @@ sub handler { 'quotas','autoenroll','autoupdate','autocreate', 'directorysrch','usercreation','usermodification', 'contacts','defaults','scantron','coursecategories', - 'serverstatuses','requestcourses','coursedefaults', - 'usersessions','loadbalancing','requestauthor'],$dom); + 'serverstatuses','requestcourses','helpsettings', + 'coursedefaults','usersessions','loadbalancing', + 'requestauthor'],$dom); my @prefs_order = ('rolecolors','login','defaults','quotas','autoenroll', 'autoupdate','autocreate','directorysrch','contacts', 'usercreation','selfcreation','usermodification','scantron', 'requestcourses','requestauthor','coursecategories', - 'serverstatuses','coursedefaults','usersessions'); + 'serverstatuses','helpsettings', + 'coursedefaults','usersessions'); my %existing; if (ref($domconfig{'loadbalancing'}) eq 'HASH') { %existing = %{$domconfig{'loadbalancing'}}; @@ -363,12 +365,26 @@ sub handler { col3 => 'Specific IPs', }], }, - 'coursedefaults' => + 'helpsettings' => + {text => 'Help page settings', + help => 'Domain_Configuration_Help_Settings', + header => [{col1 => 'Help Settings (logged-in users)', + col2 => 'Value'}], + }, + 'coursedefaults' => {text => 'Course/Community defaults', help => 'Domain_Configuration_Course_Defaults', - header => [{col1 => 'Defaults which can be overridden for each course by a DC', + header => [{col1 => 'Defaults which can be overridden in each course by a CC', + col2 => 'Value',}, + {col1 => 'Defaults which can be overridden for each course by a DC', col2 => 'Value',},], }, + 'privacy' => + {text => 'User Privacy', + help => 'Domain_Configuration_User_Privacy', + header => [{col1 => 'Setting', + col2 => 'Value',}], + }, 'usersessions' => {text => 'User session hosting/offloading', help => 'Domain_Configuration_User_Sessions', @@ -547,6 +563,8 @@ sub process_changes { $output = &modify_quotas($r,$dom,$action,$lastactref,%domconfig); } elsif ($action eq 'requestauthor') { $output = &modify_quotas($r,$dom,$action,$lastactref,%domconfig); + } elsif ($action eq 'helpsettings') { + $output = &modify_helpsettings($r,$dom,$confname,%domconfig); } elsif ($action eq 'coursedefaults') { $output = &modify_coursedefaults($dom,$lastactref,%domconfig); } elsif ($action eq 'usersessions') { @@ -620,6 +638,8 @@ sub print_config_box { $output .= &print_usersessions('top',$dom,$settings,\$rowtotal); } elsif ($action eq 'rolecolors') { $output .= &print_rolecolors($phase,'student',$dom,$confname,$settings,\$rowtotal); + } elsif ($action eq 'coursedefaults') { + $output .= &print_coursedefaults('top',$dom,$settings,\$rowtotal); } $output .= ' @@ -723,6 +743,8 @@ sub print_config_box { '.&mt($item->{'header'}->[2]->{'col2'}).' '. &print_usersessions('bottom',$dom,$settings,\$rowtotal); $rowtotal ++; + } elsif ($action eq 'coursedefaults') { + $output .= &print_coursedefaults('bottom',$dom,$settings,\$rowtotal); } elsif ($action eq 'rolecolors') { $output .= &print_rolecolors($phase,'coordinator',$dom,$confname,$settings,\$rowtotal).' @@ -819,8 +841,6 @@ sub print_config_box { $output .= &print_helpsettings($dom,$confname,$settings,\$rowtotal); } elsif ($action eq 'loadbalancing') { $output .= &print_loadbalancing($dom,$settings,\$rowtotal); - } elsif ($action eq 'coursedefaults') { - $output .= &print_coursedefaults('bottom',$dom,$settings,\$rowtotal); } } $output .= ' @@ -3792,7 +3812,7 @@ sub print_selfcreation { ($datatable,$itemcount) = &radiobutton_prefs(\%radiohash,\@toggles,\%defaultchecked, \%choices,$itemcount,$onclick); $$rowtotal += $itemcount; - + my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); if (ref($usertypes) eq 'HASH') { @@ -4609,7 +4629,7 @@ sub serverstatus_pages { return ('userstatus','lonstatus','loncron','server-status','codeversions', 'checksums','clusterstatus','metadata_keywords','metadata_harvest', 'takeoffline','takeonline','showenv','toggledebug','ping','domconf', - 'uniquecodes','diskusage'); + 'uniquecodes'); } sub coursecategories_javascript { @@ -4895,7 +4915,7 @@ sub modifiable_userdata_row { if ($statustype) { if (ref($settings->{$context}->{$role}->{$statustype}) eq 'HASH') { $hashref = $settings->{$context}->{$role}->{$statustype}; - if (ref($hashref) eq 'HASH') { + if (ref($hashref) eq 'HASH') { foreach my $field (@fields) { if ($hashref->{$field}) { $checks{$field} = $hashref->{$field}; @@ -4916,7 +4936,7 @@ sub modifiable_userdata_row { } } } - + for (my $i=0; $i<@fields; $i++) { my $rem = $i%($numinrow); if ($rem == 0) { @@ -4932,7 +4952,7 @@ sub modifiable_userdata_row { } else { if ($role eq 'st') { if (ref($settings) ne 'HASH') { - $check = ' checked="checked" '; + $check = ' checked="checked" '; } } } @@ -7768,7 +7788,7 @@ sub modify_selfcreation { # value set to one), if self-creation with e-mail address permitted, where $type is user type: faculty, staff, student etc. # if (($env{'form.cancreate_email'} eq 'email') || ($env{'form.cancreate_email'} eq 'emailapproval')) { - push(@contexts,'emailusername'); + push(@contexts,'emailusername'); if (ref($types) eq 'ARRAY') { foreach my $type (@{$types}) { if (ref($infofields) eq 'ARRAY') {