Diff for /loncom/interface/lonparmset.pm between versions 1.516 and 1.521

version 1.516, 2011/12/04 14:55:16 version 1.521, 2012/03/13 05:37:49
Line 813  sub valout { Line 813  sub valout {
         &date_sanity_info($value);          &date_sanity_info($value);
         } else {          } else {
             $result = $value;              $result = $value;
               $result=~s/\,/\, /gs;
         $result = &HTML::Entities::encode($result,'"<>&');          $result = &HTML::Entities::encode($result,'"<>&');
         }          }
     }      }
Line 854  sub page_js { Line 855  sub page_js {
     return(<<ENDJS);      return(<<ENDJS);
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
     function pclose() {  
         parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",  
                  "height=350,width=350,scrollbars=no,menubar=no");  
         parmwin.close();  
     }  
   
     $pjump_def      $pjump_def
   
     function psub() {      function psub() {
         pclose();  
         if (document.parmform.pres_marker.value!='') {          if (document.parmform.pres_marker.value!='') {
             document.parmform.action+='#'+document.parmform.pres_marker.value;              document.parmform.action+='#'+document.parmform.pres_marker.value;
             var typedef=new Array();              var typedef=new Array();
Line 903  sub startpage { Line 898  sub startpage {
     my ($r,$psymb) = @_;      my ($r,$psymb) = @_;
   
     my %loaditems = (      my %loaditems = (
                       'onunload' => "pclose()",  
                       'onload'   => "group_or_section('cgroup')",                        'onload'   => "group_or_section('cgroup')",
                     );                      );
     if (!$psymb) {      if (!$psymb) {
Line 1301  sub parmmenu { Line 1295  sub parmmenu {
     }      }
   
     function checkdisset() {      function checkdisset() {
     checkthis('discussend','pscat');       checkthis('discussend','pscat');
      checkthis('discusshide','pscat');       checkthis('discusshide','pscat');
        checkthis('discussvote','pscat');
     }      }
   
     function checkcontdates() {      function checkcontdates() {
Line 1400  sub lookUpTableParameter { Line 1395  sub lookUpTableParameter {
         'maxcollaborators' => 'misc',          'maxcollaborators' => 'misc',
         'scoreformat' => 'misc',          'scoreformat' => 'misc',
         'lenient' => 'grading',          'lenient' => 'grading',
           'retrypartial' => 'tries',
           'discussvote'  => 'misc',
   
     );          );    
 }  }
Line 1947  sub standardkeyorder { Line 1944  sub standardkeyorder {
         'parameter_0_tol' => 16,          'parameter_0_tol' => 16,
         'parameter_0_sig' => 17,          'parameter_0_sig' => 17,
         'parameter_0_turnoffunit' => 18,          'parameter_0_turnoffunit' => 18,
             'parameter_0_discussend' => 19,          'parameter_0_discussend' => 19,
             'parameter_0_discusshide' => 20,          'parameter_0_discusshide' => 20,
  'parameter_0_printopendate'  =>  21,          'parameter_0_discussvote' => 21,
  'parameter_0_printclosedate' =>  22);   'parameter_0_printopendate'  =>  22,
    'parameter_0_printclosedate' =>  23);
 }  }
   
   
Line 2151  sub assessparms { Line 2149  sub assessparms {
                         }                          }
                     }                      }
                 }                  }
             } elsif ($markers[$i] =~ /_(type|lenient)\&\d+$/) {              } elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote)\&\d+$/) {
                 $name = $1;                  $name = $1;
                 $needsrelease =                  $needsrelease =
                     $Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"};                      $Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"};
Line 2333  COURSECONTENTSCRIPT Line 2331  COURSECONTENTSCRIPT
                   $coursespan += 3;                    $coursespan += 3;
                }                 }
   
                $r->print('<p><table border="2">');                 $r->print(&Apache::loncommon::start_data_table());
 #  #
 # This produces the headers  # This produces the headers
 #  #
Line 2513  ENDTABLEHEADFOUR Line 2511  ENDTABLEHEADFOUR
                 }                  }
             } # end foreach ids              } # end foreach ids
 # -------------------------------------------------- End entry for one resource  # -------------------------------------------------- End entry for one resource
             $r->print('</table>');              $r->print(&Apache::loncommon::end_data_table);
         } # end of  full          } # end of  full
 #--------------------------------------------------- Entry for parm level map  #--------------------------------------------------- Entry for parm level map
         if ($parmlev eq 'map') {          if ($parmlev eq 'map') {
Line 2813  sub storedata { Line 2811  sub storedata {
                 $name = 'type';                  $name = 'type';
             } elsif ($typeof eq 'string_lenient') {              } elsif ($typeof eq 'string_lenient') {
                 $name = 'lenient';                  $name = 'lenient';
               } elsif ($typeof eq 'string_discussvote') {
                   $name = 'discussvote';
               } elsif ($typeof eq 'string_yesno') {
                   if ($thiskey =~ /\.retrypartial$/) {
                       $name = 'retrypartial';
                   }
             }              }
             if ($name ne '') {              if ($name ne '') {
                 my ($needsrelease,$needsnewer);                  my ($needsrelease,$needsnewer);
Line 3141  my %strings = Line 3145  my %strings =
      'string_lenient'       'string_lenient'
              => [['yes', 'Yes' ],               => [['yes', 'Yes' ],
                  [ 'no', 'No' ],                   [ 'no', 'No' ],
                  [ 'default', 'Default - only bubblesheet grading is lenient' ]]                    [ 'default', 'Default - only bubblesheet grading is lenient' ]],
        'string_discussvote'
                => [['yes','Yes'],
                    ['notended','Yes, unless discussion ended'],
                    ['no','No']],
      );       );
   
 sub standard_string_options {  sub standard_string_options {
Line 3161  sub string_selector { Line 3169  sub string_selector {
   
     my %skiptype;      my %skiptype;
     if (($thistype eq 'string_questiontype') ||       if (($thistype eq 'string_questiontype') || 
         ($thistype eq 'string_lenient')) {          ($thistype eq 'string_lenient') ||
           ($thistype eq 'string_discussvote') ||
           ($name eq 'retrypartial')) {
         my ($got_chostname,$chostname,$cmajor,$cminor);           my ($got_chostname,$chostname,$cmajor,$cminor); 
         foreach my $possibilities (@{ $strings{$thistype} }) {          foreach my $possibilities (@{ $strings{$thistype} }) {
             next unless (ref($possibilities) eq 'ARRAY');              next unless (ref($possibilities) eq 'ARRAY');
Line 3673  ENDMAINFORMHEAD Line 3683  ENDMAINFORMHEAD
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $vgr  = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});      my $vgr  = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});
     my $mgr  = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});      my $mgr  = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
       my $dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'});
       if ((!$dcm) && ($env{'request.course.sec'} ne '')) {
           $dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'}.
                                           '/'.$env{'request.course.sec'});
       }
   
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
     my $lc_crstype = lc($crstype);      my $lc_crstype = lc($crstype);
Line 3692  ENDMAINFORMHEAD Line 3707  ENDMAINFORMHEAD
             linktitle => "Reset access times for folders/maps, resources or the $lc_crstype."  ,              linktitle => "Reset access times for folders/maps, resources or the $lc_crstype."  ,
             icon => 'start-here.png'  ,              icon => 'start-here.png'  ,
             },              },
             { linktext => 'Blocking Communication/Resource Access',
               url => '/adm/setblock',
               permission => $dcm,
               linktitle => 'Configure blocking of communication/collaboration and access to resources during an exam',
               icon => 'comblock.png',
               },
           { linktext => 'Set Parameter Setting Default Actions',            { linktext => 'Set Parameter Setting Default Actions',
             url => '/adm/parmset?action=setdefaults',              url => '/adm/parmset?action=setdefaults',
             permission => $parm_permission,              permission => $parm_permission,
Line 4612  sub oldversion_warning { Line 4632  sub oldversion_warning {
     my ($name,$value,$chostname,$cmajor,$cminor,$needsrelease) = @_;      my ($name,$value,$chostname,$cmajor,$cminor,$needsrelease) = @_;
     my $desc;      my $desc;
     my %stringtypes = (      my %stringtypes = (
                         type    => 'string_questiontype',                          type         => 'string_questiontype',
                         lenient => 'string_lenient'                          lenient      => 'string_lenient',
                           retrypartial => 'string_yesno',
                           discussvote  => 'string_discussvote',
                       );                        );
     if (exists($stringtypes{$name})) {      if (exists($stringtypes{$name})) {
         if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {          if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {

Removed from v.1.516  
changed lines
  Added in v.1.521


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