version 1.10, 2003/09/22 15:39:53
|
version 1.14, 2004/05/18 13:44:56
|
Line 41 use Apache::lonlocal;
|
Line 41 use Apache::lonlocal;
|
sub handler { |
sub handler { |
|
|
my $r=shift; |
my $r=shift; |
|
my $target = $ENV{'form.grade_target'}; |
|
if ($target eq 'meta') { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
$ENV{'request.uri'}=$r->uri; |
|
my $file = &Apache::lonnet::filelocation("",$r->uri); |
|
my $content=&Apache::lonnet::getfile($file); |
|
my $result=&Apache::lonxml::xmlparse(undef,'meta',$content); |
|
$r->print($result); |
|
return OK; |
|
} |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
Line 163 sub handler {
|
Line 174 sub handler {
|
my $token; |
my $token; |
my $rulecounter=0; |
my $rulecounter=0; |
my $colzero=&mt($constructmode?'Edit action':'Rule'); |
my $colzero=&mt($constructmode?'Edit action':'Rule'); |
my %lt=&Apache::loncommon::texthash('ef' => 'Effect', |
my %lt=&Apache::lonlocal::texthash('ef' => 'Effect', |
'do' => 'Domain', |
'do' => 'Domain', |
'co' => 'Course', |
'co' => 'Course', |
'se' => 'Section/Group', |
'se' => 'Section/Group', |
'ro' => 'Role'); |
'ro' => 'Role', |
|
'ua' => 'Use Access', |
|
'sa' => 'Source Access'); |
# ---------------------------------------------------------- Start table output |
# ---------------------------------------------------------- Start table output |
$r->print(<<ENDSTARTTABLE); |
$r->print(<<ENDSTARTTABLE); |
<table border="2"> |
<table border="2"> |
<tr><th>$colzero</th><th>$lt{'ef'}</th><th>$lt{'do'}</th><th>$lt{'co'}</th> |
<tr><th>$colzero</th><th>$lt{'ef'}</th><th>$lt{'do'}</th><th>$lt{'co'}</th> |
<th>$lt{'se'}</th><th>$lt{'ro'}</th></tr> |
<th>$lt{'se'}</th><th>$lt{'ro'}</th><th>$lt{'ua'}</th><th>$lt{'sa'}</th></tr> |
ENDSTARTTABLE |
ENDSTARTTABLE |
# --------------------------------------------------------------------- Default |
# --------------------------------------------------------------------- Default |
# Fast forward to first rule |
# Fast forward to first rule |
Line 197 ENDSTARTTABLE
|
Line 210 ENDSTARTTABLE
|
} else { |
} else { |
$r->print($token->[2]->{'effect'}); |
$r->print($token->[2]->{'effect'}); |
} |
} |
$r->print('</td><td colspan="4">Default'); |
$r->print('</td><td colspan="6">Default'); |
if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) { |
if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) { |
$r->print(' - <font color="red">'.&mt('Error! No default set.'). |
$r->print(' - <font color="red">'.&mt('Error! No default set.'). |
'</font>'); |
'</font>'); |
Line 276 ENDSTARTTABLE
|
Line 289 ENDSTARTTABLE
|
} else { |
} else { |
$r->print(&Apache::lonnet::plaintext($token->[2]->{'role'})); |
$r->print(&Apache::lonnet::plaintext($token->[2]->{'role'})); |
} |
} |
|
# use access |
|
# if ($constructmode) { |
|
# |
|
# } else { |
|
# $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'})); |
|
# } |
# course selection link |
# course selection link |
$r->print('</td></tr><tr><td colspan="3" align="right">'); |
$r->print('</td></tr><tr><td colspan="3" align="right">'); |
if ($rcourse) { |
if ($rcourse) { |
Line 283 ENDSTARTTABLE
|
Line 302 ENDSTARTTABLE
|
&Apache::lonnet::coursedescription($rdom.'_'.$rcourse); |
&Apache::lonnet::coursedescription($rdom.'_'.$rcourse); |
$r->print($descript{'description'}.' '); |
$r->print($descript{'description'}.' '); |
} |
} |
$r->print(&Apache::loncommon::selectcourse_link('rules', |
if ($constructmode) { |
'course_'.$rulecounter,'domain_'.$rulecounter)); |
$r->print(&Apache::loncommon::selectcourse_link('rules', |
|
'course_'.$rulecounter,'domain_'.$rulecounter)); |
|
} |
# close row |
# close row |
$r->print('</td></tr>'); |
$r->print('</td></tr>'); |
} |
} |