[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonparmset.pm

raeburn raeburn at source.lon-capa.org
Mon May 7 19:46:11 EDT 2012


raeburn		Mon May  7 23:46:11 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonparmset.pm 
  Log:
  - For 2.11.
    - Reverse changes in 1.507 and 1.516 (for "3.0").
  
  
-------------- next part --------------
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.522 loncom/interface/lonparmset.pm:1.522.2.1
--- loncom/interface/lonparmset.pm:1.522	Sun May  6 22:09:14 2012
+++ loncom/interface/lonparmset.pm	Mon May  7 23:46:11 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.522 2012/05/06 22:09:14 raeburn Exp $
+# $Id: lonparmset.pm,v 1.522.2.1 2012/05/07 23:46:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -314,27 +314,6 @@
 use LONCAPA qw(:DEFAULT :match);
 
 
-sub startSettingsScreen {
-    my ($r,$mode)=@_;
-
-    $r->print("\n".'<ul class="LC_TabContentBigger" id="main">');
-    $r->print("\n".'<li'.($mode eq 'coursepref'?' class="active"':'').'><a href="/adm/courseprefs"><b>    '.
-                                          &mt('Course Settings').
-                                          '    </b></a></li>');
-
-    $r->print("\n".'<li'.($mode eq 'parmset'?' class="active"':'').'><a href="/adm/parmset"><b>'.
-                                                                 &mt('Content and Problem Settings').'</b></a></li>');
-    $r->print("\n".'</ul>'."\n");
-    $r->print('<div class="LC_Box" style="clear:both;margin:0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;"><div class="LC_ContentBox" id="mainCourseDocuments" style="display: block;">');
-}
-
-sub endSettingsScreen {
-   my ($r)=@_;
-   $r->print('</div></div></div>');
-}
-
-
-
 sub parmval {
     my ($what,$id,$def,$uname,$udom,$csec,$cgroup,$courseopt)=@_;
     return &parmval_by_symb($what,&symbcache($id),$def,$uname,$udom,$csec,
@@ -922,7 +901,6 @@
     my $escfilter=&Apache::lonhtmlcommon::entity_encode($env{'form.filter'});
     my $escpart=&Apache::lonhtmlcommon::entity_encode($env{'form.part'});
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     $r->print(<<ENDHEAD);
 <form method="post" action="/adm/parmset?action=settable" name="parmform">
 <input type="hidden" value="" name="pres_value" />
@@ -2013,7 +1991,7 @@
 
 
     my @psprt=&Apache::loncommon::get_env_multiple('form.psprt');
-    if (!@psprt) { $psprt[0]='all'; }
+    if (!@psprt) { $psprt[0]='0'; }
     if (($env{'form.part'}) && ($psprt[0] ne 'all')) { $psprt[0]=$env{'form.part'}; }
 
     my $pssymb='';
@@ -2291,6 +2269,12 @@
                   '<br />');
         $r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)')));
         $r->print(&Apache::lonhtmlcommon::start_pick_box());
+        $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')).
+                  '<label>'.
+                  '<input type="checkbox" name="psprt" value="all"'.
+                  ($env{'form.psprt'}?' checked="checked"':'').' />'.
+                  &mt('Show all parts').
+                  '</label></td></tr>');
         &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
         $r->print(&Apache::lonhtmlcommon::row_closure(1));
         $r->print(&Apache::lonhtmlcommon::end_pick_box());
@@ -2728,7 +2712,6 @@
         } # end of $parmlev eq general
     }
     $r->print('</form>');
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 } # end sub assessparms
 
@@ -3287,7 +3270,6 @@
     my $start_page = &Apache::loncommon::start_page('Set Parameters');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview');
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     $r->print(<<ENDOVER);
 <form method="post" action="/adm/parmset?action=newoverview" name="parmform">
 ENDOVER
@@ -3316,7 +3298,7 @@
     my $pschp=$env{'form.pschp'};
 
     my @psprt=&Apache::loncommon::get_env_multiple('form.psprt');
-    if (!@psprt) { $psprt[0]='all'; }
+    if (!@psprt) { $psprt[0]='0'; }
 
     my @selected_sections =
     &Apache::loncommon::get_env_multiple('form.Section');
@@ -3413,7 +3395,6 @@
     $r->print(&tableend().
          ((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':'').
           '</form>');
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 }
 
@@ -3462,7 +3443,6 @@
     my $start_page=&Apache::loncommon::start_page('Modify Parameters');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview');
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     $r->print('<form method="post" action="/adm/parmset?action=setoverview" name="parmform">');
 
 # Store modified
@@ -3570,7 +3550,6 @@
     $r->print(&Apache::loncommon::end_data_table().'<p>'.
           '<input type="submit" value="'.&mt('Delete Selected').'" />'.
           '</p></form>');
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 }
 
@@ -3584,7 +3563,6 @@
     my $start_page=&Apache::loncommon::start_page('Shift Dates');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift');
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     $r->print('<form name="shiftform" method="post">'.
               '<table><tr><td>'.&mt('Currently set date:').'</td><td>'.
               &Apache::lonlocal::locallocaltime($env{'form.timebase'}).'</td></tr>'.
@@ -3598,7 +3576,6 @@
               '<input type="hidden" name="action" value="dateshift2" />'.
               '<input type="hidden" name="timebase" value="'.$env{'form.timebase'}.'" />'.
               '<input type="submit" value="'.&mt('Shift all dates accordingly').'" /></form>');
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 }
 
@@ -3611,14 +3588,12 @@
     my $start_page=&Apache::loncommon::start_page('Shift Dates');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift');
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     my $timeshifted=&Apache::lonhtmlcommon::get_date_from_form('timeshifted');
     $r->print(&mt('Shifting all dates such that [_1] becomes [_2]',
               &Apache::lonlocal::locallocaltime($env{'form.timebase'}),
               &Apache::lonlocal::locallocaltime($timeshifted)));
     my $delta=$timeshifted-$env{'form.timebase'};
     &dateshift($delta);
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 }
 
@@ -3663,7 +3638,7 @@
 
 
 sub header {
-    return &Apache::loncommon::start_page('Settings');
+    return &Apache::loncommon::start_page('Parameter Manager');
 }
 
 
@@ -3672,8 +3647,7 @@
     my ($r,$parm_permission)=@_;
     #
     $r->print(&header());
-    $r->print(&Apache::lonhtmlcommon::breadcrumbs('Content and Problem Settings'));
-    &startSettingsScreen($r,'parmset');
+    $r->print(&Apache::lonhtmlcommon::breadcrumbs('Parameter Manager'));
     $r->print(<<ENDMAINFORMHEAD);
 <form method="post" enctype="multipart/form-data"
       action="/adm/parmset" name="studentform">
@@ -3759,7 +3733,6 @@
             }]}
           );
     $r->print(&Apache::lonhtmlcommon::generate_menu(@menu));
-    &endSettingsScreen($r);
     return;
 }
 
@@ -3835,7 +3808,6 @@
               text=>"Restrict Metadata"},
              {text=>"Order Metadata"});
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Order Metadata'));
-    &startSettingsScreen($r,'parmset');
     if ($env{'form.storeorder'}) {
         my $newpos = $env{'form.newpos'} - 1;
         my $currentpos = $env{'form.currentpos'} - 1;
@@ -3905,7 +3877,6 @@
         $idx ++;
     }
     $r->print('</table>');
-    &endSettingsScreen($r);
     return 'ok';
 }
 
@@ -3925,7 +3896,6 @@
         text=>"Add Metadata Field"});
     $r->print(&Apache::loncommon::start_page('Add Metadata Field'));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Add Metadata Field'));
-    &startSettingsScreen($r,'parmset');
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
     if (exists($env{'form.undelete'})) {
@@ -3967,7 +3937,6 @@
         $r->print('<input type="submit" value="Add Metadata Field" />');
     }
     $r->print('</form>');
-    &endSettingsScreen($r);
 }
 
 
@@ -3982,7 +3951,6 @@
         text=>"Restrict Metadata"});
     $r->print(&Apache::loncommon::start_page('Restrict Metadata'));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Restrict Metadata'));
-    &startSettingsScreen($r,'parmset');
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
     my $key_base = $env{'course.'.$env{'request.course.id'}.'.'};
@@ -4055,7 +4023,6 @@
         $buttons
         </form>
 ENDenv
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
     return 'ok';
 }
@@ -4100,7 +4067,6 @@
     &Apache::loncommon::start_page('Parameter Setting Default Actions');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Defaults');
     $r->print($start_page.$breadcrumbs);
-    &startSettingsScreen($r,'parmset');
     $r->print('<form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">');
 
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
@@ -4247,7 +4213,6 @@
     $r->print(&Apache::loncommon::end_data_table().
           "\n".'<input type="submit" name="storerules" value="'.
           &mt('Save').'" /></form>'."\n");
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
     return;
 }
@@ -4345,7 +4310,6 @@
              '</script>'."\n";
     $r->print(&Apache::loncommon::start_page('Parameter Change Log',$js));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Parameter Change Log'));
-    &startSettingsScreen($r,'parmset');
     my %parmlog=&Apache::lonnet::dump('nohist_parameterlog',
                       $env{'course.'.$env{'request.course.id'}.'.domain'},
                       $env{'course.'.$env{'request.course.id'}.'.num'});
@@ -4514,7 +4478,6 @@
           || $shown<=$env{'form.show'})) { last; }
     }
     $r->print(&Apache::loncommon::end_data_table());
-    &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());
 }
 
@@ -4685,7 +4648,7 @@
 
     &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset",
-                        text=>"Content and Problem Settings",
+                        text=>"Parameter Manager",
                         faq=>10,
                         bug=>'Instructor Interface',
                                             help =>


More information about the LON-CAPA-cvs mailing list