Diff for /loncom/interface/lonparmset.pm between versions 1.407 and 1.411

version 1.407, 2008/08/28 03:54:53 version 1.411, 2008/10/10 10:54:03
Line 973  sub extractResourceInformation { Line 973  sub extractResourceInformation {
     if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) {      if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) {
  my $display= &Apache::lonnet::metadata($srcf,$key.'.display');   my $display= &Apache::lonnet::metadata($srcf,$key.'.display');
  my $parmdis = $display;   my $parmdis = $display;
  $parmdis =~ s/\[Part.*$//g;   $parmdis =~ s/ \[Part.*$//g;
  $$allparms{$name}=$parmdis;   $$allparms{$name}=$parmdis;
  if (ref($defkeytype)) {   if (ref($defkeytype)) {
     $$defkeytype{$name}=      $$defkeytype{$name}=
Line 985  sub extractResourceInformation { Line 985  sub extractResourceInformation {
 # allparts is a hash of all parts  # allparts is a hash of all parts
 #  #
     my $part= &Apache::lonnet::metadata($srcf,$key.'.part');      my $part= &Apache::lonnet::metadata($srcf,$key.'.part');
     $$allparts{$part} = "Part: $part";      $$allparts{$part} = &mt('Part: [_1]',$part);
 #  #
 # Remember all keys going with this resource  # Remember all keys going with this resource
 #  #
Line 1107  ENDSCRIPT Line 1107  ENDSCRIPT
  if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {   if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
     $r->print(' checked');      $r->print(' checked');
  }   }
  $r->print('>'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}   $r->print('>'.($$allparms{$tempkey}=~/\S/ ? &mt($$allparms{$tempkey})
                                   : $tempkey)                                    : &mt($tempkey))
   .'</label></td>');    .'</label></td>');
   $cnt++;    $cnt++;
         if ($cnt==3) {          if ($cnt==3) {
Line 1116  ENDSCRIPT Line 1116  ENDSCRIPT
     $cnt=0;      $cnt=0;
  }   }
     }      }
     $r->print('      $r->print('</tr>'
 </tr><tr id=\"LC_parm_overview_parm_menu_selectors\"><td>               .'<tr id=\"LC_parm_overview_parm_menu_selectors\">'
 <a href="javascript:checkall(true, \'pscat\')">Select&nbsp;All</a><br />               .'<td valign="top">'
 <a href="javascript:checkstandard()">Select&nbsp;Common&nbsp;Only</a>               .'<fieldset><legend><b>'.&mt('Parameter Selection').'</b></legend>'
 </td><td>               .'<span class="LC_nobreak">'
 <a href="javascript:checkdates()">Add&nbsp;Problem&nbsp;Dates</a>               .'&bull; <a href="javascript:checkall(true, \'pscat\')">'.&mt('Select All').'</a>'
 <a href="javascript:checkcontdates()">Add&nbsp;Content&nbsp;Dates</a><br />               .'</span>'
 <a href="javascript:checkdisset()">Add&nbsp;Discussion&nbsp;Settings</a>               .'<br />'
 <a href="javascript:checkvisi()">Add&nbsp;Visibilities</a><br />               .'<span class="LC_nobreak">'
 <a href="javascript:checkparts()">Add&nbsp;Part&nbsp;Parameters</a>               .'&bull; <a href="javascript:checkstandard()">'.&mt('Select Common Only').'</a>'
 </td><td>               .'</span>'
 <a href="javascript:checkall(false, \'pscat\')">Unselect&nbsp;All</a>               .'<br />'
 </td>               .'<span class="LC_nobreak">'
 ');               .'&bull; <a href="javascript:checkall(false, \'pscat\')">'.&mt('Unselect All').'</a>'
     $r->print('</tr></table>');               .'</span>'
                .'</fieldset>'
                .'</td>'
                .'<td colspan="2" valign="top">'
                .'<fieldset><legend><b>'.&mt('Add Selection for...').'</b></legend>'
                .'<span class="LC_nobreak">'
                .'&bull; <a href="javascript:checkdates()">'.&mt('Problem Dates').'</a>'
                .'</span>'
                .'<span class="LC_nobreak">'
                .' &bull; <a href="javascript:checkcontdates()">'.&mt('Content Dates').'</a>'
                .'</span>'
   #            .'<br />'
                .'<span class="LC_nobreak">'
                .' &bull; <a href="javascript:checkdisset()">'.&mt('Discussion Settings').'</a>'
                .'</span>'
                .'<span class="LC_nobreak">'
                .' &bull; <a href="javascript:checkvisi()">'.&mt('Visibilities').'</a>'
                .'</span>'
   #            .'<br />'
                .'<span class="LC_nobreak">'
                .' &bull; <a href="javascript:checkparts()">'.&mt('Part Parameters').'</a>'
                .'</span>'
                .'</fieldset>'
                .'</td>'
                .'</tr></table>'
       );
 }  }
   
 sub partmenu {  sub partmenu {
Line 2357  sub crsenv { Line 2382  sub crsenv {
              'categories'               'categories'
                  => '<b>'.&mt('Categorize course').'</b> <a href="javascript:catsbrowser()">'.                   => '<b>'.&mt('Categorize course').'</b> <a href="javascript:catsbrowser()">'.
                     &mt('Display Categories').'</a>',                      &mt('Display Categories').'</a>',
                'datelocale' 
                    => '<b>'.&mt('Locale used for course calendar').'</b>',
              );               );
         my @Display_Order = ('url','description','courseid','cloners');          my @Display_Order = ('url','description','courseid','cloners');
         (my $can_toggle_cat,$can_categorize) = &can_modify_catsettings($dom);          (my $can_toggle_cat,$can_categorize) = &can_modify_catsettings($dom);
Line 2380  sub crsenv { Line 2407  sub crsenv {
                              'allow_discussion_post_editing',                               'allow_discussion_post_editing',
                              'languages',                               'languages',
                              'timezone',                               'timezone',
                                'datelocale',
      'nothideprivileged',       'nothideprivileged',
                              'rndseed',                               'rndseed',
                              'receiptalg',                               'receiptalg',
Line 2433  sub crsenv { Line 2461  sub crsenv {
                     &Apache::loncommon::select_timezone($parameter.'_value',                      &Apache::loncommon::select_timezone($parameter.'_value',
                                                         $timezone,                                                          $timezone,
                                                         $onchange,$includeempty).'</td>';                                                          $onchange,$includeempty).'</td>';
               } elsif ($parameter eq 'datelocale') {
                   my $includeempty = 1;
                   my $locale_obj = &Apache::lonlocal::getdatelocale();
                   my $currdatelocale;
                   if (ref($locale_obj)) {
                       $currdatelocale = $locale_obj->id();
                   }
                   $output .= '<td>'.
                       &Apache::loncommon::select_datelocale($parameter.'_value',
                                                             $currdatelocale,
                                                             $onchange,$includeempty).'</td>'; 
             } elsif ($parameter eq 'categories') {              } elsif ($parameter eq 'categories') {
                 my $catdisplay;                  my $catdisplay;
                 if ($values{'categories'} ne '') {                  if ($values{'categories'} ne '') {
Line 2570  function updateCategories() { Line 2609  function updateCategories() {
             newcategories = newcategories.slice(0,-1);              newcategories = newcategories.slice(0,-1);
         }          }
         if (unescapedcats.length > 0) {          if (unescapedcats.length > 0) {
             usescapedcats = unescapedcats.slice(0,-3);              unescapedcats = unescapedcats.slice(0,-3);
         }          }
     } else {      } else {
          if (document.chgcats.usecategory.checked == true) {           if (document.chgcats.usecategory.checked == true) {

Removed from v.1.407  
changed lines
  Added in v.1.411


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>