Diff for /loncom/interface/lonparmset.pm between versions 1.405 and 1.410

version 1.405, 2008/07/15 20:00:58 version 1.410, 2008/10/10 10:19:08
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 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 2126  sub crsenv { Line 2151  sub crsenv {
                 $setoutput.=&mt('Set').' <b>'.$name.'</b> '.&mt('to').' <b>';                  $setoutput.=&mt('Set').' <b>'.$name.'</b> '.&mt('to').' <b>';
                 if ($name =~ /^default_enrollment_(start|end)_date$/) {                  if ($name =~ /^default_enrollment_(start|end)_date$/) {
                     $setoutput .= &Apache::lonlocal::locallocaltime($value);                      $setoutput .= &Apache::lonlocal::locallocaltime($value);
                   } elsif ($name eq 'categories') {
                       $setoutput .= $env{'form.categories_display'};
                 } else {                  } else {
                     $setoutput .= $value;                      $setoutput .= $value;
                 }                  }
Line 2355  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 2378  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 2431  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') {
                   my $catdisplay;
                   if ($values{'categories'} ne '') {
                       my @curritems = split(/\&/,$values{'categories'});
                       foreach my $item (@curritems) {
                           my ($name,$parent,$pos) = split(/:/,$item);
                           $catdisplay .= &unescape($name).'&';
                       }
                       $catdisplay =~ s/\&$//;
                   } 
                   $output .= '<td>'.
                              '<input type="hidden" name="categories_value" value="'.
                              $values{'categories'}.'" />'.
                              '<input type="textbox" name="categories_display" value="'.
                              $catdisplay.'" readonly="readonly" size="40" /></td>';
             } else {              } else {
                 $output .= '<td>'.                  $output .= '<td>'.
                     &Apache::lonhtmlcommon::textbox($parameter.'_value',                      &Apache::lonhtmlcommon::textbox($parameter.'_value',
Line 2541  sub assign_course_categories { Line 2597  sub assign_course_categories {
   
 function updateCategories() {  function updateCategories() {
     var newcategories = '';      var newcategories = '';
       var unescapedcats = '';
     if (document.chgcats.usecategory.length) {      if (document.chgcats.usecategory.length) {
         for (var i=0; i<document.chgcats.usecategory.length; i++) {          for (var i=0; i<document.chgcats.usecategory.length; i++) {
             if (document.chgcats.usecategory[i].checked == true) {              if (document.chgcats.usecategory[i].checked == true) {
                 newcategories = newcategories + document.chgcats.usecategory[i].value + '&';                  newcategories = newcategories + document.chgcats.usecategory[i].value + '&';
                   unescapedcats = unescapedcats + document.chgcats.catname[i].value + ' & ';
             }              }
         }          }
         if (newcategories.length > 0) {          if (newcategories.length > 0) {
             newcategories = newcategories.slice(0,-1);              newcategories = newcategories.slice(0,-1);
         }          }
           if (unescapedcats.length > 0) {
               unescapedcats = unescapedcats.slice(0,-3);
           }
     } else {      } else {
          if (document.chgcats.usecategory.checked == true) {           if (document.chgcats.usecategory.checked == true) {
              newcategories = document.chgcats.usecategory.value;               newcategories = document.chgcats.usecategory.value;
                unescapedcats = document.chgcats.catname.value;
          }           }
     }      }
     opener.document.envform.categories_value.value = newcategories;      opener.document.envform.categories_value.value = newcategories;
       opener.document.envform.categories_display.value = unescapedcats;
     opener.document.envform.categories_setparmval.checked = true;      opener.document.envform.categories_setparmval.checked = true;
     alert("$alert");      alert("$alert");
     self.close();      self.close();

Removed from v.1.405  
changed lines
  Added in v.1.410


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