--- loncom/auth/lonroles.pm 2006/12/05 02:55:56 1.172 +++ loncom/auth/lonroles.pm 2006/12/14 20:49:23 1.174 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.172 2006/12/05 02:55:56 albertel Exp $ +# $Id: lonroles.pm,v 1.174 2006/12/14 20:49:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -407,10 +407,17 @@ ENDHEADER # --------------------------------------------------------------- Error Header? if ($error) { $r->print("

LON-CAPA Access Control

"); - $r->print("
Access  : ".
-                  Apache::lonnet::plaintext($priv)."\n");
-        $r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n");
-        $r->print("Action  : $msg\n

"); + $r->print("
");
+	if ($priv ne '') {
+	    $r->print("Access  : ".&Apache::lonnet::plaintext($priv)."\n");
+	}
+	if ($fn ne '') {
+	    $r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n");
+	}
+	if ($msg ne '') {
+	    $r->print("Action  : $msg\n");
+	}
+	$r->print("

"); my $url=$fn; my $last; if (tie(my %hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', @@ -639,14 +646,14 @@ ENDHEADER # More than one possible role # ----------------------------------------------------------------------- Table unless (($advanced) || ($nochoose)) { - $r->print("

".&mt('Select a Course/Group to Enter')."

\n"); + $r->print("

".&mt('Select a Course to Enter')."

\n"); } $r->print('
'); unless ($nochoose) { $r->print(''); } $r->print(''."\n"); my $doheaders=-1; - foreach my $type ('Domain','Construction Space','Course','Group','Unavailable','System') { + foreach my $type ('Domain','Construction Space','Course','Unavailable','System') { my $haverole=0; foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { @@ -686,7 +693,7 @@ ENDHEADER $r->print(&coursepick_jscript()); $r->print(&Apache::loncommon::coursebrowser_javascript()); } - foreach my $type ('Construction Space','Domain','Course','Group','Unavailable','System') { + foreach my $type ('Construction Space','Domain','Course','Unavailable','System') { my $output; foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { if ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/) { @@ -912,7 +919,7 @@ sub courselink { my $courseform=&Apache::loncommon::selectcourse_link ('rolechoice','dccourse'.$rowtype.'_'.$dcdom, 'dcdomain'.$rowtype.'_'.$dcdom,'coursedesc'.$rowtype.'_'. - $dcdom,$dcdom,undef,$selecttype); + $dcdom,$dcdom,undef); my $hiddenitems = ''. ''. ''. @@ -1018,13 +1025,11 @@ sub allcourses_row { my ($dcdom,$rowtype) = @_; my $output = ''. ' '."\n"; return $output; }
 '.&mt('User Role').''.&mt('Extent'). ''.&mt('Start').''.&mt('End').'
'; - foreach my $type ('Course','Group') { - my $selectlink = &courselink($dcdom,$rowtype,$type); - my $ccrole = &Apache::lonnet::plaintext('cc',$type); - $output.= ''.$ccrole.''. + my $selectlink = &courselink($dcdom,$rowtype); + my $ccrole = &Apache::lonnet::plaintext('cc'); + $output.= ''.$ccrole.''. ' '.$selectlink.''. ' from '.&mt('Domain').' '.$dcdom.'
'; - } $output .= '