[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm lonconfigsettings.pm lonparmset.pm mydesk.tab
www
www@source.lon-capa.org
Thu, 13 Jan 2011 22:49:48 -0000
This is a MIME encoded message
--www1294958988
Content-Type: text/plain
www Thu Jan 13 22:49:48 2011 EDT
Modified files:
/loncom/interface courseprefs.pm lonconfigsettings.pm lonparmset.pm
mydesk.tab
Log:
For 3.0: Settings
--www1294958988
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20110113224948.txt"
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.39 loncom/interface/courseprefs.pm:1.40
--- loncom/interface/courseprefs.pm:1.39 Fri Dec 24 20:21:25 2010
+++ loncom/interface/courseprefs.pm Thu Jan 13 22:49:47 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.39 2010/12/24 20:21:25 raeburn Exp $
+# $Id: courseprefs.pm,v 1.40 2011/01/13 22:49:47 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -268,8 +268,8 @@
my %lt;
if ($crstype eq 'Community') {
%lt = (
- conf => 'Community Configuration',
- edit => 'Edit Community Configuration',
+ conf => 'Community Settings',
+ edit => 'Edit Community Settings',
gens => 'General community settings',
idnu => 'Community ID or number',
desc => 'Community Description',
@@ -295,8 +295,8 @@
);
} else {
%lt = (
- conf => 'Course Configuration',
- edit => 'Edit Course Configuration',
+ conf => 'Course Settings',
+ edit => 'Edit Course Settings',
gens => 'General course settings',
idnu => 'Course ID or number',
desc => 'Course Description',
Index: loncom/interface/lonconfigsettings.pm
diff -u loncom/interface/lonconfigsettings.pm:1.16 loncom/interface/lonconfigsettings.pm:1.17
--- loncom/interface/lonconfigsettings.pm:1.16 Fri Nov 19 13:08:47 2010
+++ loncom/interface/lonconfigsettings.pm Thu Jan 13 22:49:47 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: lonconfigsettings.pm,v 1.16 2010/11/19 13:08:47 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.17 2011/01/13 22:49:47 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,6 +35,7 @@
use Apache::loncommon();
use Apache::lonhtmlcommon();
use Apache::lonlocal;
+use Apache::lonparmset();
sub print_header {
my ($r,$phase,$context,$jscript) = @_;
@@ -119,6 +120,7 @@
}
$r->print(&Apache::loncommon::start_page($pagetitle,$js,$additem));
$r->print(&Apache::lonhtmlcommon::breadcrumbs($brcrumtitle));
+ &Apache::lonparmset::startSettingsScreen($r,'coursepref');
$r->print('
<form name="parmform" action="">
<input type="hidden" name="pres_marker" />
@@ -159,7 +161,9 @@
$button_text.'" onclick='.$onclick.' /></p>');
}
if ($phase eq 'process') {
- $r->print('</form>'.&Apache::loncommon::end_page());
+ $r->print('</form>');
+ &Apache::lonparmset::endSettingsScreen($r);
+ $r->print(&Apache::loncommon::end_page());
}
return;
}
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.506 loncom/interface/lonparmset.pm:1.507
--- loncom/interface/lonparmset.pm:1.506 Thu Jan 13 17:44:30 2011
+++ loncom/interface/lonparmset.pm Thu Jan 13 22:49:47 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.506 2011/01/13 17:44:30 www Exp $
+# $Id: lonparmset.pm,v 1.507 2011/01/13 22:49:47 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -306,6 +306,27 @@
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,
@@ -869,6 +890,7 @@
ENDJS
}
+
sub startpage {
my ($r) = @_;
@@ -893,9 +915,9 @@
&Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting','Table_Mode');
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);
-$start_page
-$breadcrumbs
<form method="post" action="/adm/parmset?action=settable" name="parmform">
<input type="hidden" value="" name="pres_value" />
<input type="hidden" value="" name="pres_type" />
@@ -2745,7 +2767,9 @@
);
} # end of $parmlev eq general
}
- $r->print('</form>'.&Apache::loncommon::end_page());
+ $r->print('</form>');
+ &endSettingsScreen($r);
+ $r->print(&Apache::loncommon::end_page());
} # end sub assessparms
##################################################
@@ -3277,9 +3301,9 @@
text=>"Overview Mode"});
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);
-$start_page
-$breadcrumbs
<form method="post" action="/adm/parmset?action=newoverview" name="parmform">
ENDOVER
my @ids=();
@@ -3406,7 +3430,9 @@
}
$r->print(&tableend().
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':'').
- '</form>'.&Apache::loncommon::end_page());
+ '</form>');
+ &endSettingsScreen($r);
+ $r->print(&Apache::loncommon::end_page());
}
sub secgroup_lister {
@@ -3453,11 +3479,10 @@
text=>"Overview Mode"});
my $start_page=&Apache::loncommon::start_page('Modify Parameters');
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview');
- $r->print(<<ENDOVER);
-$start_page
-$breadcrumbs
-<form method="post" action="/adm/parmset?action=setoverview" name="parmform">
-ENDOVER
+ $r->print($start_page.$breadcrumbs);
+ &startSettingsScreen($r,'parmset');
+ $r->print('<form method="post" action="/adm/parmset?action=setoverview" name="parmform">');
+
# Store modified
&storedata($r,$crs,$dom);
@@ -3562,8 +3587,9 @@
}
$r->print(&Apache::loncommon::end_data_table().'<p>'.
'<input type="submit" value="'.&mt('Delete Selected').'" />'.
- '</p></form>'.
- &Apache::loncommon::end_page());
+ '</p></form>');
+ &endSettingsScreen($r);
+ $r->print(&Apache::loncommon::end_page());
}
sub date_shift_one {
@@ -3575,10 +3601,8 @@
text=>"Shifting Dates"});
my $start_page=&Apache::loncommon::start_page('Shift Dates');
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift');
- $r->print(<<ENDOVER);
-$start_page
-$breadcrumbs
-ENDOVER
+ $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>'.
@@ -3591,6 +3615,7 @@
'<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());
}
@@ -3602,16 +3627,15 @@
text=>"Shifting Dates"});
my $start_page=&Apache::loncommon::start_page('Shift Dates');
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift');
- $r->print(<<ENDOVER);
-$start_page
-$breadcrumbs
-ENDOVER
+ $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());
}
@@ -3656,7 +3680,7 @@
sub header {
- return &Apache::loncommon::start_page('Parameter Manager');
+ return &Apache::loncommon::start_page('Settings');
}
@@ -3665,7 +3689,8 @@
my ($r,$parm_permission)=@_;
#
$r->print(&header());
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Parameter Manager'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Content and Problem Settings'));
+ &startSettingsScreen($r,'parmset');
$r->print(<<ENDMAINFORMHEAD);
<form method="post" enctype="multipart/form-data"
action="/adm/parmset" name="studentform">
@@ -3680,7 +3705,7 @@
my $lc_crstype = lc($crstype);
my @menu =
- ( { categorytitle=>"Settings for this $crstype",
+ ( { categorytitle=>"Content Settings for this $crstype",
items => [
{ linktext => 'Portfolio Metadata',
url => '/adm/parmset?action=setrestrictmeta',
@@ -3741,6 +3766,7 @@
}]}
);
$r->print(&Apache::lonhtmlcommon::generate_menu(@menu));
+ &endSettingsScreen($r);
return;
}
@@ -3816,6 +3842,7 @@
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;
@@ -3885,6 +3912,7 @@
$idx ++;
}
$r->print('</table>');
+ &endSettingsScreen($r);
return 'ok';
}
@@ -3904,6 +3932,7 @@
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'})) {
@@ -3945,6 +3974,7 @@
$r->print('<input type="submit" value="Add Metadata Field" />');
}
$r->print('</form>');
+ &endSettingsScreen($r);
}
@@ -3959,6 +3989,7 @@
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'}.'.'};
@@ -4031,6 +4062,7 @@
$buttons
</form>
ENDenv
+ &endSettingsScreen($r);
$r->print(&Apache::loncommon::end_page());
return 'ok';
}
@@ -4074,11 +4106,9 @@
my $start_page =
&Apache::loncommon::start_page('Parameter Setting Default Actions');
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Defaults');
- $r->print(<<ENDDEFHEAD);
-$start_page
-$breadcrumbs
-<form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">
-ENDDEFHEAD
+ $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'};
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -4223,8 +4253,9 @@
}
$r->print(&Apache::loncommon::end_data_table().
"\n".'<input type="submit" name="storerules" value="'.
- &mt('Save').'" /></form>'."\n".
- &Apache::loncommon::end_page());
+ &mt('Save').'" /></form>'."\n");
+ &endSettingsScreen($r);
+ $r->print(&Apache::loncommon::end_page());
return;
}
@@ -4316,7 +4347,7 @@
text=>"Parameter Change Log"});
$r->print(&Apache::loncommon::start_page('Parameter Change Log'));
$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'});
@@ -4484,6 +4515,7 @@
|| $shown<=$env{'form.show'})) { last; }
}
$r->print(&Apache::loncommon::end_data_table());
+ &endSettingsScreen($r);
$r->print(&Apache::loncommon::end_page());
}
@@ -4645,7 +4677,7 @@
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset",
- text=>"Parameter Manager",
+ text=>"Content and Problem Settings",
faq=>10,
bug=>'Instructor Interface',
help =>
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.142 loncom/interface/mydesk.tab:1.143
--- loncom/interface/mydesk.tab:1.142 Thu Jan 13 19:43:12 2011
+++ loncom/interface/mydesk.tab Thu Jan 13 22:49:47 2011
@@ -54,7 +54,7 @@
scnd:/adm/coursegroups:::Groups:showgroups
scnd:/adm/quickgrades:::Grades:nvgr
scnd:/adm/grades:::Grades:vgr
-scnd:/adm/courseprefs:::Settings:opa
+scnd:/adm/parmset:::Settings:opa
scnd:/adm/roles:::Roles:
scnd:/adm/flip?postdata=return%3a:::Return to Last Location:showreturn
scnd:/priv/[uname]/:::Construction Space:author
--www1294958988--