version 1.202, 2005/06/02 22:03:18
|
version 1.204, 2005/06/03 15:47:29
|
Line 217 sub cacheparmhash {
|
Line 217 sub cacheparmhash {
|
} |
} |
} |
} |
|
|
|
sub resetsymbcache { |
|
$symbsid=''; |
|
} |
|
|
sub symbcache { |
sub symbcache { |
my $id=shift; |
my $id=shift; |
if ($symbsid ne $env{'request.course.id'}) { |
if ($symbsid ne $env{'request.course.id'}) { |
Line 447 sub startpage {
|
Line 451 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(undef,'Table'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table Mode Parameter Setting'); |
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 459 sub startpage {
|
Line 463 sub startpage {
|
'oi' => "or ID", |
'oi' => "or ID", |
'ad' => "at Domain" |
'ad' => "at Domain" |
); |
); |
my $overallhelp= |
|
&Apache::loncommon::help_open_menu('','Setting Parameters','Course_Setting_Parameters','',10,'Instructor Interface'); |
|
my $assessparmhelp=&Apache::loncommon::help_open_topic("Cascading_Parameters","Assessment Parameters"); |
|
my $html=&Apache::lonxml::xmlbegin(); |
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDHEAD); |
$r->print(<<ENDHEAD); |
$html |
$html |
Line 512 $selscript
|
Line 513 $selscript
|
</head> |
</head> |
$bodytag |
$bodytag |
$breadcrumbs |
$breadcrumbs |
$overallhelp |
|
ENDHEAD |
ENDHEAD |
my %sectionhash=(); |
my %sectionhash=(); |
my $sections=''; |
my $sections=''; |
Line 576 sub print_row {
|
Line 576 sub print_row {
|
} |
} |
my $parm=$$display{$which}; |
my $parm=$$display{$which}; |
|
|
if ($parmlev eq 'full' || $parmlev eq 'brief') { |
if ($parmlev eq 'full') { |
$r->print('<td bgcolor='.$defbgtwo.' align="center">' |
$r->print('<td bgcolor='.$defbgtwo.' align="center">' |
.$$part{$which}.'</td>'); |
.$$part{$which}.'</td>'); |
} else { |
} else { |
Line 611 sub print_row {
|
Line 611 sub print_row {
|
|
|
&print_td($r,11,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,11,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
|
if ($parmlev eq 'brief') { |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,9,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
if ($csec) { |
|
&print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
if ($csec) { |
} |
&print_td($r,6,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
if ($uname) { |
&print_td($r,5,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} |
} |
} else { |
if ($uname) { |
|
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,9,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} |
&print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
|
|
if ($csec) { |
|
&print_td($r,6,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,5,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,4,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
} |
|
if ($uname) { |
|
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
&print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
} |
|
} # end of $brief if/else |
|
} # end of $parmlev if/else |
} # end of $parmlev if/else |
|
|
$r->print('<td bgcolor=#CCCCFF align="center">'. |
$r->print('<td bgcolor=#CCCCFF align="center">'. |
&valout($outpar[$result],$typeoutpar[$result]).'</td>'); |
&valout($outpar[$result],$typeoutpar[$result]).'</td>'); |
|
|
if ($parmlev eq 'full' || $parmlev eq 'brief') { |
if ($parmlev eq 'full') { |
my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}. |
my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}. |
'.'.$$name{$which},$$symbp{$rid}); |
'.'.$$name{$which},$$symbp{$rid}); |
|
|
Line 978 sub assessparms {
|
Line 966 sub assessparms {
|
|
|
&startpage($r,$id,$udom,$csec,$uname,scalar(keys(%allkeys))); |
&startpage($r,$id,$udom,$csec,$uname,scalar(keys(%allkeys))); |
|
|
# if ($env{'form.url'}) { |
|
# $r->print('<input type="hidden" value="'.$env{'form.url'}. |
|
# '" name="url"><input type="hidden" name="command" value="set">'); |
|
# } |
|
$r->print('<input type="hidden" value="true" name="prevvisit">'); |
$r->print('<input type="hidden" value="true" name="prevvisit">'); |
|
|
foreach ('tolerance','date_default','date_start','date_end', |
foreach ('tolerance','date_default','date_start','date_end', |
Line 1156 sub assessparms {
|
Line 1140 sub assessparms {
|
my $csuname=$env{'user.name'}; |
my $csuname=$env{'user.name'}; |
my $csudom=$env{'user.domain'}; |
my $csudom=$env{'user.domain'}; |
|
|
if ($parmlev eq 'full' || $parmlev eq 'brief') { |
if ($parmlev eq 'full') { |
my $coursespan=$csec?8:5; |
my $coursespan=$csec?8:5; |
$r->print('<p><table border=2>'); |
$r->print('<p><table border=2>'); |
$r->print('<tr><td colspan=5></td>'); |
$r->print('<tr><td colspan=5></td>'); |
Line 1302 ENDTABLEHEADFOUR
|
Line 1286 ENDTABLEHEADFOUR
|
} # end foreach ids |
} # end foreach ids |
# -------------------------------------------------- End entry for one resource |
# -------------------------------------------------- End entry for one resource |
$r->print('</table>'); |
$r->print('</table>'); |
} # end of brief/full |
} # end of full |
#--------------------------------------------------- Entry for parm level map |
#--------------------------------------------------- Entry for parm level map |
if ($parmlev eq 'map') { |
if ($parmlev eq 'map') { |
my $defbgone = '"E0E099"'; |
my $defbgone = '"E0E099"'; |
Line 2096 ENDMAINFORMHEAD
|
Line 2080 ENDMAINFORMHEAD
|
my @menu = |
my @menu = |
( |
( |
{ text => 'Set Course Environment Parameters', |
{ text => 'Set Course Environment Parameters', |
help => 'Course_Setting_Parameters', |
action => 'crsenv', |
action => 'crsenv', |
|
permission => $parm_permission, |
permission => $parm_permission, |
}, |
}, |
{ text => 'Set/Modify Course Assessment Parameters - Helper Mode', |
{ text => 'Set/Modify Course Assessment Parameters - Helper Mode', |
Line 2111 ENDMAINFORMHEAD
|
Line 2094 ENDMAINFORMHEAD
|
{ text => 'Set/Modify Course Assessment Parameters - Table Mode', |
{ text => 'Set/Modify Course Assessment Parameters - Table Mode', |
action => 'settable', |
action => 'settable', |
permission => $parm_permission, |
permission => $parm_permission, |
|
help => 'Cascading_Parameters', |
}, |
}, |
# { text => 'Set Parameter Default Preferences', |
# { text => 'Set Parameter Default Preferences', |
# help => 'Course_View_Class_List', |
# help => 'Course_View_Class_List', |
Line 2171 sub handler {
|
Line 2155 sub handler {
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset", |
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset", |
text=>"Parameter Manager", |
text=>"Parameter Manager", |
faq=>9, |
faq=>10, |
bug=>'Instructor Interface'}); |
bug=>'Instructor Interface'}); |
|
|
# ----------------------------------------------------- Needs to be in a course |
# ----------------------------------------------------- Needs to be in a course |
my $parm_permission = |
my $parm_permission = |
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
Line 2184 sub handler {
|
Line 2169 sub handler {
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
|
|
|
# id numbers can change on re-ordering of folders |
|
|
|
&resetsymbcache(); |
|
|
# |
# |
# Main switch on form.action and form.state, as appropriate |
# Main switch on form.action and form.state, as appropriate |
# |
# |
Line 2210 sub handler {
|
Line 2200 sub handler {
|
&overview($r); |
&overview($r); |
} elsif ($env{'form.action'} eq 'settable' && $parm_permission) { |
} elsif ($env{'form.action'} eq 'settable' && $parm_permission) { |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable', |
text=>"Table Mode"}); |
text=>"Table Mode", |
|
help => 'Course_Setting_Parameters'}); |
&assessparms($r); |
&assessparms($r); |
} |
} |
|
|