[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Mon, 21 Jul 2008 16:24:32 -0000


raeburn		Mon Jul 21 12:24:32 2008 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Adding contextual help.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.65 loncom/interface/domainprefs.pm:1.66
--- loncom/interface/domainprefs.pm:1.65	Sat Jul 19 17:44:55 2008
+++ loncom/interface/domainprefs.pm	Mon Jul 21 12:24:31 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.65 2008/07/19 21:44:55 raeburn Exp $
+# $Id: domainprefs.pm,v 1.66 2008/07/21 16:24:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -80,7 +80,7 @@
     my %prefs = (
         'rolecolors' =>
                    { text => 'Default color schemes',
-                     help => 'Default_Color_Schemes',
+                     help => 'Domconfig_Color_Schemes',
                      header => [{col1 => 'Student Settings',
                                  col2 => '',},
                                 {col1 => 'Coordinator Settings',
@@ -92,31 +92,31 @@
                     },
         'login' =>  
                     { text => 'Log-in page options',
-                      help => 'Domain_Log-in_Page',
+                      help => 'Domconfig_Login_Page',
                       header => [{col1 => 'Item',
                                   col2 => '',}],
                     },
         'defaults' => 
                     { text => 'Default authentication/language/timezone',
-                      help => '',
+                      help => 'Domconfig_LangTZAuth',
                       header => [{col1 => 'Setting',
                                   col2 => 'Value'}],
                     },
         'quotas' => 
                     { text => 'Default quotas for user portfolios',
-                      help => 'Default_User_Quota',
+                      help => 'Domconfig_Quotas',
                       header => [{col1 => 'User type',
                                   col2 => 'Default quota'}],
                     },
         'autoenroll' =>
                    { text => 'Auto-enrollment settings',
-                     help => 'Domain_Auto_Enrollment',
+                     help => 'Domconfig_Auto_Enrollment',
                      header => [{col1 => 'Configuration setting',
                                  col2 => 'Value(s)'}],
                    },
         'autoupdate' => 
                    { text => 'Auto-update settings',
-                     help => 'Domain_Auto_Update',
+                     help => 'Domconfig_Auto_Updates',
                      header => [{col1 => 'Setting',
                                  col2 => 'Value',},
                                 {col1 => 'User population',
@@ -124,20 +124,20 @@
                   },
         'directorysrch' => 
                   { text => 'Institutional directory searches',
-                    help => 'Domain_Directory_Search',
+                    help => 'Domconfig_InstDirectory_Search',
                     header => [{col1 => 'Setting',
                                 col2 => 'Value',}],
                   },
         'contacts' =>
                   { text => 'Contact Information',
-                    help => 'Domain_Contact_Information',
+                    help => 'Domconfig_Contact_Info',
                     header => [{col1 => 'Setting',
                                 col2 => 'Value',}],
                   },
 
         'usercreation' => 
                   { text => 'User creation',
-                    help => 'Domain_User_Creation',
+                    help => 'Domconfig_User_Creation',
                     header => [{col1 => 'Format rule type',
                                 col2 => 'Format rules in force'},
                                {col1 => 'User account creation',
@@ -147,7 +147,7 @@
                   },
         'usermodification' => 
                   { text => 'User modification',
-                    help => 'Domain_User_Modification',
+                    help => 'Domconfig_User_Modification',
                     header => [{col1 => 'Target user has role',
                                 col2 => 'User information updateable in author context'},
                                {col1 => 'Target user has role',
@@ -157,14 +157,14 @@
                   },
         'scantron' => 
                   { text => 'Scantron format file',
-                    help => 'Domain_Scantron_Formats',
+                    help => 'Domconfig_Scantron_Format',
                     header => [ {col1 => 'Item',
                                  col2 => '',
                               }],
                   },
         'coursecategories' => 
                   { text => 'Cataloging of courses',
-                    help => 'Domain_Course_Catalog',
+                    help => 'Domconfig_Cataloging_Courses',
                     header => [{col1 => 'Category settings',  
                                 col2 => '',},
                                {col1 => 'Categories',
@@ -319,7 +319,10 @@
         }
         $count = 0;
         foreach my $item (@prefs_order) {
-            $r->print('<h4><label><input type="checkbox" name="actions" value="'.$item.'" />&nbsp;'.&mt($prefs{$item}->{'text'}).'</label></h4>');
+            $r->print('<h4>'.
+                      &Apache::loncommon::help_open_topic($prefs{$item}->{'help'}).
+                      '<label><input type="checkbox" name="actions" value="'.$item.
+                      '" />&nbsp;'.&mt($prefs{$item}->{'text'}).'</label></h4>');
             $count ++;
             if ((!$seconddiv) && ($count >= $midpoint)) {
                 $r->print('</div>'."\n".'<div class="LC_left_float">'."\n");
@@ -382,13 +385,10 @@
     $output .= 
          '<table class="LC_nested_outer">
           <tr>
-           <th align="left"><span class="LC_nobreak">'.&mt($item->{text}).
-           '&nbsp;</span></th></tr>';
-# 
-# FIXME - put the help link back in when the help files exist
-#           <th>'.&mt($item->{text}).'&nbsp;'.
-#           &Apache::loncommon::help_open_topic($item->{'help'}).'</th>
-#          </tr>');
+           <th align="left" valign="middle"><span class="LC_nobreak">'.
+           &mt($item->{text}).'&nbsp;'.
+           &Apache::loncommon::help_open_topic($item->{'help'}).'</span></th>'."\n".
+          '</tr>';
     $rowtotal ++;
     if (($action eq 'autoupdate') || ($action eq 'rolecolors') || 
         ($action eq 'usercreation') || ($action eq 'usermodification') ||