Diff for /loncom/interface/lonparmset.pm between versions 1.428 and 1.434

version 1.428, 2009/02/03 21:11:16 version 1.434, 2009/02/19 10:19:49
Line 848  sub plink { Line 848  sub plink {
     my ($hour,$min,$sec,$val)=&preset_defaults($parmname);      my ($hour,$min,$sec,$val)=&preset_defaults($parmname);
     unless (defined($winvalue)) { $winvalue=$val; }      unless (defined($winvalue)) { $winvalue=$val; }
     my $valout = &valout($value,$type,1);      my $valout = &valout($value,$type,1);
       my $unencmarker = $marker;
     foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call,      foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call,
       \$hour, \$min, \$sec) {        \$hour, \$min, \$sec) {
  $$item = &HTML::Entities::encode($$item,'"<>&');   $$item = &HTML::Entities::encode($$item,'"<>&');
  $$item =~ s/\'/\\\'/g;   $$item =~ s/\'/\\\'/g;
     }      }
     return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$marker.'" /></td></tr><tr><td align="center">'.      return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$unencmarker.'" /></td></tr><tr><td align="center">'.
  '<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','"   '<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','"
     .$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'.      .$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'.
     $valout.'</a></td></tr></table>';      $valout.'</a></td></tr></table>';
Line 972  sub print_row { Line 973  sub print_row {
     if ($parmlev eq 'full') {      if ($parmlev eq 'full') {
         $r->print('<td style="background-color:'.$defbgtwo.';" align="center">'          $r->print('<td style="background-color:'.$defbgtwo.';" align="center">'
                   .$$part{$which}.'</td>');                    .$$part{$which}.'</td>');
     } else {          } else {
         $parm=~s|\[.*\]\s||g;          $parm=~s|\[.*\]\s||g;
         $parm=&mt($parm);  
     }      }
     my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');      my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
     if ($automatic) {      if ($automatic) {
Line 1182  sub extractResourceInformation { Line 1182  sub extractResourceInformation {
 #  #
     my $name=&Apache::lonnet::metadata($srcf,$key.'.name');      my $name=&Apache::lonnet::metadata($srcf,$key.'.name');
     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,$parmdis);
  my $parmdis = $display;   $display = &standard_parameter_names($name);
  $parmdis =~ s/\s*\[Part.*$//g;   if ($display eq '') {
       $display= &Apache::lonnet::metadata($srcf,$key.'.display');
       $parmdis = $display;
       $parmdis =~ s/\s*\[Part.*$//g;
    } else {
       $parmdis = $display;
    }
  $$allparms{$name}=$parmdis;   $$allparms{$name}=$parmdis;
  if (ref($defkeytype)) {   if (ref($defkeytype)) {
     $$defkeytype{$name}=      $$defkeytype{$name}=
Line 1316  ENDSCRIPT Line 1322  ENDSCRIPT
  if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {   if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
     $r->print(' checked="checked"');      $r->print(' checked="checked"');
  }   }
         my $displaykey;          $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
         if ($$allparms{$tempkey}=~/\S/) {                                                    : $tempkey)
             $displaykey = $$allparms{$tempkey};                    .'</label></td>');
         } else {  
             $displaykey = $tempkey;  
         }  
         $displaykey =~ s/(\[|\])/~$1/g;  
         $r->print(' />'.&mt($displaykey).'</label></td>');  
   $cnt++;    $cnt++;
         if ($cnt==3) {          if ($cnt==3) {
     $r->print("</tr>\n<tr>");      $r->print("</tr>\n<tr>");
Line 1975  ENDTABLEHEADFOUR Line 1976  ENDTABLEHEADFOUR
                         if (grep $_ eq $tempkeyp, @catmarker) {                          if (grep $_ eq $tempkeyp, @catmarker) {
                           $part{$_}=&Apache::lonnet::metadata($uri,$_.'.part');                            $part{$_}=&Apache::lonnet::metadata($uri,$_.'.part');
                           $name{$_}=&Apache::lonnet::metadata($uri,$_.'.name');                            $name{$_}=&Apache::lonnet::metadata($uri,$_.'.name');
                           $display{$_}=&Apache::lonnet::metadata($uri,$_.'.display');                            my $parmdis=&Apache::lonnet::metadata($uri,$_.'.display');
                             if ($allparms{$name{$_}} ne '') {
                                 my $identifier;
                                 if ($parmdis =~ /(\s*\[Part.*)$/) {
                                     $identifier = $1;
                                 }
                                 $display{$_} = $allparms{$name{$_}}.$identifier;
                             } else {
                                 $display{$_} = $parmdis;
                             }
                           unless ($display{$_}) { $display{$_}=''; }                            unless ($display{$_}) { $display{$_}=''; }
                           $display{$_}.=' ('.$name{$_}.')';                            $display{$_}.=' ('.$name{$_}.')';
                           $default{$_}=&Apache::lonnet::metadata($uri,$_);                            $default{$_}=&Apache::lonnet::metadata($uri,$_);
Line 2082  ENDTABLEHEADFOUR Line 2092  ENDTABLEHEADFOUR
                       if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {                        if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
                         $part{$tempkeyp}="0";                          $part{$tempkeyp}="0";
                         $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');                          $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');
                         $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');                          my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
                           if ($allparms{$name{$tempkeyp}} ne '') {
                               my $identifier;
                               if ($parmdis =~ /(\s*\[Part.*)$/) {
                                   $identifier = $1;
                               }
                               $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier;
                           } else {
                               $display{$tempkeyp} = $parmdis;
                           }
                         unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }                          unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
                         $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';                          $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
                         $display{$tempkeyp} =~ s/_\w+_/_0_/;                          $display{$tempkeyp} =~ s/_\w+_/_0_/;
Line 2175  ENDTABLEHEADFOUR Line 2194  ENDTABLEHEADFOUR
                   if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {                    if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) {
                     $part{$tempkeyp}="0";                      $part{$tempkeyp}="0";
                     $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');                      $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name');
                     $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');                      my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display');
                       if ($allparms{$name{$tempkeyp}} ne '') {
                           my $identifier;
                           if ($parmdis =~ /(\s*\[Part.*)$/) {
                               $identifier = $1;
                           }
                           $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier;
                       } else {
                           $display{$tempkeyp} = $parmdis;
                       }
                     unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }                      unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; }
                     $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';                      $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')';
                     $display{$tempkeyp} =~ s/_\w+_/_0_/;                      $display{$tempkeyp} =~ s/_\w+_/_0_/;
Line 2552  sub crsenv { Line 2580  sub crsenv {
              'externalsyllabus'               'externalsyllabus'
                  => '<b>'.&mt('URL of Syllabus (not using internal handler)').'</b>',                   => '<b>'.&mt('URL of Syllabus (not using internal handler)').'</b>',
      'tthoptions'       'tthoptions'
          => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>',           => '<b>'.&mt('Default set of options to pass to tth/m when converting TeX').'</b>',
   
      'texengine'       'texengine'
          => '<b>'.&mt('Force all students in the course to use a specific math rendering engine.').'</b><br />'           => '<b>'.&mt('Force all students in the course to use a specific math rendering engine.').'</b><br />'
Line 3459  ENDOVER Line 3487  ENDOVER
     my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder);      my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder);
   
     $r->print(&tableend().'<p>'.      $r->print(&tableend().'<p>'.
  ($foundkeys?'<input type="submit" value="'.&mt('Modify Parameters').'" />':&mt('There are no parameters.')).'</p></form>'.   ($foundkeys?'<input type="submit" value="'.&mt('Save').'" />':&mt('There are no parameters.')).'</p></form>'.
       &Apache::loncommon::end_page());        &Apache::loncommon::end_page());
 }  }
   
Line 4333  ENDYESNO Line 4361  ENDYESNO
     }      }
     $r->print(&Apache::loncommon::end_data_table().      $r->print(&Apache::loncommon::end_data_table().
       "\n".'<input type="submit" name="storerules" value="'.        "\n".'<input type="submit" name="storerules" value="'.
       &mt('Save Rules').'" /></form>'."\n".        &mt('Save').'" /></form>'."\n".
       &Apache::loncommon::end_page());        &Apache::loncommon::end_page());
     return;      return;
 }  }

Removed from v.1.428  
changed lines
  Added in v.1.434


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.