--- loncom/interface/domainprefs.pm 2011/07/29 14:28:24 1.138.2.9 +++ loncom/interface/domainprefs.pm 2011/02/07 21:04:09 1.142 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.138.2.9 2011/07/29 14:28:24 raeburn Exp $ +# $Id: domainprefs.pm,v 1.142 2011/02/07 21:04:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -140,7 +140,7 @@ autolimit =over -- course requests will be processed automatically up to a limit of +- course requests will be processed autoatically up to a limit of N requests for the course type for the particular requestor. If N is undefined, there is no limit to the number of course requests which a course owner may submit and have processed automatically. @@ -202,12 +202,12 @@ sub handler { 'quotas','autoenroll','autoupdate','autocreate', 'directorysrch','usercreation','usermodification', 'contacts','defaults','scantron','coursecategories', - 'serverstatuses','requestcourses','coursedefaults', - 'usersessions'],$dom); + 'serverstatuses','requestcourses','helpsettings', + 'coursedefaults','usersessions'],$dom); my @prefs_order = ('rolecolors','login','defaults','quotas','autoenroll', 'autoupdate','autocreate','directorysrch','contacts', 'usercreation','usermodification','scantron', - 'requestcourses','coursecategories','serverstatuses', + 'requestcourses','coursecategories','serverstatuses','helpsettings', 'coursedefaults','usersessions'); my %prefs = ( 'rolecolors' => @@ -337,11 +337,13 @@ sub handler { {col1 => 'Unauthenticated Help Settings', col2 => ''}], }, - 'coursedefaults' => + 'coursedefaults' => {text => 'Course/Community defaults', help => 'Domain_Configuration_Course_Defaults', - header => [{col1 => 'Defaults which can be overridden for each course by a DC', - col2 => 'Value',}], + 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', @@ -349,7 +351,7 @@ sub handler { header => [{col1 => 'Setting', col2 => 'Value',}], }, - 'usersessions' => + 'usersessions' => {text => 'User session hosting', help => 'Domain_Configuration_User_Sessions', header => [{col1 => 'Hosting of users from other domains', @@ -455,6 +457,8 @@ sub process_changes { $output = &modify_serverstatuses($dom,%domconfig); } elsif ($action eq 'requestcourses') { $output = &modify_quotas($dom,$action,%domconfig); + } elsif ($action eq 'helpsettings') { + $output = &modify_helpsettings($r,$dom,$confname,%domconfig); } elsif ($action eq 'coursedefaults') { $output = &modify_coursedefaults($dom,%domconfig); } elsif ($action eq 'usersessions') { @@ -512,9 +516,11 @@ sub print_config_box { } elsif ($action eq 'helpsettings') { $output .= &print_helpsettings('top',$dom,$confname,$settings,\$rowtotal); } elsif ($action eq 'usersessions') { - $output .= &print_usersessions('top',$dom,$settings,\$rowtotal); + $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 .= ' @@ -578,6 +584,8 @@ sub print_config_box { $output .= &print_helpsettings('bottom',$dom,$confname,$settings,\$rowtotal); } elsif ($action eq 'usersessions') { $output .= &print_usersessions('bottom',$dom,$settings,\$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).' @@ -664,8 +672,8 @@ sub print_config_box { $output .= &print_scantronformat($r,$dom,$confname,$settings,\$rowtotal); } elsif ($action eq 'serverstatuses') { $output .= &print_serverstatuses($dom,$settings,\$rowtotal); - } elsif ($action eq 'coursedefaults') { - $output .= &print_coursedefaults('bottom',$dom,$settings,\$rowtotal); + } elsif ($action eq 'helpsettings') { + $output .= &print_helpsettings('top',$dom,$confname,$settings,\$rowtotal); } } $output .= ' @@ -1878,23 +1886,24 @@ sub print_autocreate { ''.&mt('Yes').' '. ''. - ''. - ''.&mt('Create pending requests for official courses (if validated)').''. - ' '. - ''; + $createoff{'xml'}.' value="0" />'.&mt('No').''; my ($numdc,$dctable) = &active_dc_picker($dom,$curr_dc); if ($numdc > 1) { - $datatable .= ''. - &mt('Course creation processed as: (choose Dom. Coord.)'). - ''.$dctable.''; + $datatable .= ''. + &mt('XML files processed as: (choose Dom. Coord.)'). + ''.$dctable.''. + ''; $$rowtotal ++ ; } else { - $datatable .= $dctable.''; + $datatable .= ''; } + $datatable .= ''.&mt('Create pending requests for official courses (if validated)').''. + ' '. + ''. + ''; return $datatable; } @@ -4653,12 +4662,12 @@ sub modify_quotas { $changes{'notify'}{'approval'} = 1; } } else { - if ($confhash{'notify'}{'approval'}) { + if ($domconfig{$action}{'notify'}{'approval'}) { $changes{'notify'}{'approval'} = 1; } } } else { - if ($confhash{'notify'}{'approval'}) { + if ($domconfig{$action}{'notify'}{'approval'}) { $changes{'notify'}{'approval'} = 1; } } @@ -6681,7 +6690,7 @@ sub modify_coursedefaults { my ($resulttext,$errors,%changes,%defaultshash); my %defaultchecked = ('canuse_pdfforms' => 'off'); my @offon = ('off','on'); - my @toggles = (); + my @toggles = ('canuse_pdfforms'); $defaultshash{'coursedefaults'} = {};