version 1.76, 2003/11/08 21:51:44
|
version 1.80, 2003/12/09 21:25:53
|
Line 202 ENDENTERKEY
|
Line 202 ENDENTERKEY
|
} |
} |
# |
# |
# Send the user to the course they selected |
# Send the user to the course they selected |
&redirect_user($r,'Entering Course', |
&redirect_user($r,&mt('Entering Course'), |
$furl,$msg); |
$furl,$msg); |
return OK; |
return OK; |
} |
} |
Line 218 ENDENTERKEY
|
Line 218 ENDENTERKEY
|
$redirect_url .= $1; |
$redirect_url .= $1; |
} |
} |
$redirect_url .= '/'; |
$redirect_url .= '/'; |
&redirect_user($r,'Entering Construction Space', |
&redirect_user($r,&mt('Entering Construction Space'), |
$redirect_url); |
$redirect_url); |
return OK; |
return OK; |
} |
} |
Line 238 ENDENTERKEY
|
Line 238 ENDENTERKEY
|
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $bodytag=&Apache::loncommon::bodytag('User Roles'); |
my $bodytag=&Apache::loncommon::bodytag('User Roles'); |
my $helptag=&Apache::loncommon::help_open_topic |
my $helptag=&Apache::loncommon::help_open_topic |
("General_Intro","Click here for help"); |
("General_Intro",&mt("Click here for help")); |
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
<html> |
<html> |
<head> |
<head> |
Line 412 ENDHEADER
|
Line 412 ENDHEADER
|
} |
} |
#next if ($home eq 'no_host'); |
#next if ($home eq 'no_host'); |
$home = $Apache::lonnet::hostname{$home}; |
$home = $Apache::lonnet::hostname{$home}; |
$ttype=&mt('Construction Space'); |
$ttype='Construction Space'; |
$twhere=&mt('User').': '.$trest.'<br />'.&mt('Domain'). |
$twhere=&mt('User').': '.$trest.'<br />'.&mt('Domain'). |
': '.$tdom.'<br />'. |
': '.$tdom.'<br />'. |
' '.&mt('Server').': '.$home; |
' '.&mt('Server').': '.$home; |
Line 432 ENDHEADER
|
Line 432 ENDHEADER
|
} |
} |
#next if ($home eq 'no_host'); |
#next if ($home eq 'no_host'); |
$home = $Apache::lonnet::hostname{$home}; |
$home = $Apache::lonnet::hostname{$home}; |
$ttype=&mt('Construction Space'); |
$ttype='Construction Space'; |
$twhere=&mt('Domain').': '.$tdom.'<br />'.&mt('Server'). |
$twhere=&mt('Domain').': '.$tdom.'<br />'.&mt('Server'). |
': '.$home; |
': '.$home; |
$ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca'; |
$ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca'; |
$sortkey=$role; |
$sortkey=$role; |
} elsif ($trest) { |
} elsif ($trest) { |
$ttype=&mt('Course'); |
$ttype='Course'; |
if ($tsection) { |
if ($tsection) { |
$ttype.='<br>'.&mt('Section/Group').': '.$tsection; |
$ttype.='<br>'.&mt('Section/Group').': '.$tsection; |
} |
} |
my $tcourseid=$tdom.'_'.$trest; |
my $tcourseid=$tdom.'_'.$trest; |
if ($ENV{'course.'.$tcourseid.'.description'}) { |
if ($ENV{'course.'.$tcourseid.'.description'}) { |
$twhere=$ENV{'course.'.$tcourseid.'.description'}; |
$twhere=$ENV{'course.'.$tcourseid.'.description'}; |
$sortkey=$twhere."\0".$envkey; |
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; |
unless ($twhere eq &mt('Currently not available')) { |
unless ($twhere eq &mt('Currently not available')) { |
$twhere.=' <font size="-2">'. |
$twhere.=' <font size="-2">'. |
&Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont). |
&Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont). |
Line 455 ENDHEADER
|
Line 455 ENDHEADER
|
my %newhash=Apache::lonnet::coursedescription |
my %newhash=Apache::lonnet::coursedescription |
($tcourseid); |
($tcourseid); |
if (%newhash) { |
if (%newhash) { |
$sortkey=$newhash{'description'}."\0".$envkey; |
$sortkey=$role."\0".$tdom."\0".$newhash{'description'}. |
|
"\0".$envkey; |
$twhere=$newhash{'description'}. |
$twhere=$newhash{'description'}. |
' <font size="-2">'. |
' <font size="-2">'. |
&Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont). |
&Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom,$tfont). |
Line 463 ENDHEADER
|
Line 464 ENDHEADER
|
} else { |
} else { |
$twhere=&mt('Currently not available'); |
$twhere=&mt('Currently not available'); |
$ENV{'course.'.$tcourseid.'.description'}=$twhere; |
$ENV{'course.'.$tcourseid.'.description'}=$twhere; |
$sortkey=$twhere."\0".$envkey; |
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; |
} |
} |
} |
} |
if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; } |
if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; } |
} elsif ($tdom) { |
} elsif ($tdom) { |
$ttype=&mt('Domain'); |
$ttype='Domain'; |
$twhere=$tdom; |
$twhere=$tdom; |
$sortkey=$role.$twhere; |
$sortkey=$role.$twhere; |
} else { |
} else { |
$ttype=&mt('System'); |
$ttype='System'; |
$twhere=&mt('system wide'); |
$twhere=&mt('system wide'); |
$sortkey=$role.$twhere; |
$sortkey=$role.$twhere; |
} |
} |
Line 520 ENDHEADER
|
Line 521 ENDHEADER
|
} |
} |
} |
} |
my $doheaders=-1; |
my $doheaders=-1; |
foreach my $type (&mt('Construction Space'),&mt('Course'), |
foreach my $type ('Construction Space','Course','Domain','System') { |
&mt('Domain'),&mt('System')) { |
|
my $haverole=0; |
my $haverole=0; |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { |
if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { |
Line 530 ENDHEADER
|
Line 530 ENDHEADER
|
} |
} |
if ($haverole) { $doheaders++; } |
if ($haverole) { $doheaders++; } |
} |
} |
foreach my $type (&mt('Construction Space'),&mt('Course'), |
foreach my $type ('Construction Space','Course','Domain','System') { |
&mt('Domain'),&mt('System')) { |
|
my $output; |
my $output; |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { |
if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { |
$output.=$roletext{$sortrole{$which}}; |
$output.=&mt($roletext{$sortrole{$which}}); |
} |
} |
} |
} |
if ($output) { |
if ($output) { |
if ($doheaders > 0) { |
if ($doheaders > 0) { |
$r->print("<tr bgcolor='#99ff99'>". |
$r->print("<tr bgcolor='#BBffBB'>". |
"<td align='center' colspan='7'>$type</td>"); |
"<td align='center' colspan='7'>".&mt($type)."</td>"); |
} |
} |
$r->print($output); |
$r->print($output); |
} |
} |