version 1.193, 2005/05/30 17:50:18
|
version 1.195, 2005/05/30 17:58:51
|
Line 385 sub startpage {
|
Line 385 sub startpage {
|
|
|
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', |
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', |
'onUnload="pclose()"'); |
'onUnload="pclose()"'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table'); |
(undef,'Table'); |
|
my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '. |
my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '. |
&Apache::loncommon::selectstudent_link('parmform','uname','udom'); |
&Apache::loncommon::selectstudent_link('parmform','uname','udom'); |
my $selscript=&Apache::loncommon::studentbrowser_javascript(); |
my $selscript=&Apache::loncommon::studentbrowser_javascript(); |
Line 843 sub assessparms {
|
Line 842 sub assessparms {
|
if (($env{'form.command'} eq 'set') && ($env{'form.url'}) |
if (($env{'form.command'} eq 'set') && ($env{'form.url'}) |
&& (!$env{'form.dis'})) { |
&& (!$env{'form.dis'})) { |
my $url=$env{'form.url'}; |
my $url=$env{'form.url'}; |
$url=~s-^http://($env{'SERVER_NAME'}|$env{'HTTP_HOST'})--; |
$url=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; |
$pssymb=&Apache::lonnet::symbread($url); |
$pssymb=&Apache::lonnet::symbread($url); |
if (!@pscat) { @pscat=('all'); } |
if (!@pscat) { @pscat=('all'); } |
$pschp=''; |
$pschp=''; |
Line 1514 sub crsenv {
|
Line 1513 sub crsenv {
|
my $setoutput=''; |
my $setoutput=''; |
my $bodytag=&Apache::loncommon::bodytag( |
my $bodytag=&Apache::loncommon::bodytag( |
'Set Course Environment Parameters'); |
'Set Course Environment Parameters'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef, |
(undef,'Edit Course Environment'); |
'Edit Course Environment'); |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
|
Line 1850 sub overview {
|
Line 1849 sub overview {
|
'Set/Modify Course Assessment Parameters'); |
'Set/Modify Course Assessment Parameters'); |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview'); |
(undef,'Overview'); |
|
my $html=&Apache::lonxml::xmlbegin(); |
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDOVER); |
$r->print(<<ENDOVER); |
$html |
$html |
Line 2093 sub print_main_menu {
|
Line 2091 sub print_main_menu {
|
action="/adm/parmset" name="studentform"> |
action="/adm/parmset" name="studentform"> |
ENDMAINFORMHEAD |
ENDMAINFORMHEAD |
# |
# |
my ($cdom,$cnum) = split/_/,$env{'request.course.id'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my @menu = |
my @menu = |
( |
( |
{ text => 'Set Course Environment Parameters', |
{ text => 'Set Course Environment Parameters', |
Line 2166 sub handler {
|
Line 2165 sub handler {
|
return OK; |
return OK; |
} |
} |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['action','state']); |
['action','state']); |
|
|
# ----------------------------------------------------------- Clear out garbage |
# ----------------------------------------------------------- Clear out garbage |
|
|
Line 2183 sub handler {
|
Line 2182 sub handler {
|
%maptitles=(); |
%maptitles=(); |
|
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset", |
({href=>"/adm/parmset", |
text=>"Parameter Manager", |
text=>"Parameter Manager", |
faq=>9, |
faq=>9,bug=>'Instructor Interface',}); |
bug=>'Instructor Interface'}); |
# ----------------------------------------------------- Needs to be in a course |
# ----------------------------------------------------- Needs to be in a course |
if (($env{'request.course.id'}) && |
my $parm_permission = |
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'. |
&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'. |
$env{'request.course.sec'}) |
|
)) { |
|
|
|
my $parm_permission = |
|
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
|
&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'. |
|
$env{'request.course.sec'})); |
$env{'request.course.sec'})); |
|
if ($env{'request.course.id'} && $parm_permission) { |
|
|
# Start Page |
# Start Page |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
Line 2214 sub handler {
|
Line 2208 sub handler {
|
|
|
} elsif (! exists($env{'form.action'})) { |
} elsif (! exists($env{'form.action'})) { |
$r->print(&header()); |
$r->print(&header()); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs(undef, |
(undef,'Parameter Manager')); |
'Parameter Manager')); |
&print_main_menu($r,$parm_permission); |
&print_main_menu($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'crsenv' && $parm_permission) { |
} elsif ($env{'form.action'} eq 'crsenv' && $parm_permission) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=crsenv', |
({href=>'/adm/parmset?action=crsenv', |
text=>"Course Environment"}); |
text=>"Course Environment"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs(undef, |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
'Edit Course Environment')); |
(undef,'Edit Course Environment')); |
|
&crsenv($r); |
&crsenv($r); |
} elsif ($env{'form.action'} eq 'setoverview' && $parm_permission) { |
} elsif ($env{'form.action'} eq 'setoverview' && $parm_permission) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview', |
({href=>'/adm/parmset?action=setoverview', |
text=>"Overview Mode"}); |
text=>"Overview Mode"}); |
|
&overview($r); |
&overview($r); |
} elsif ($env{'form.action'} eq 'settable' && $parm_permission) { |
} elsif ($env{'form.action'} eq 'settable' && $parm_permission) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable', |
({href=>'/adm/parmset?action=settable', |
text=>"Table Mode"}); |
text=>"Table Mode"}); |
|
&assessparms($r); |
&assessparms($r); |
} |
} |
|
|