[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 11 Dec 2006 21:56:56 -0000


albertel		Mon Dec 11 16:56:56 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/auth	lonroles.pm 
  Log:
  - back to one selector for DC
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.491 loncom/interface/loncommon.pm:1.492
--- loncom/interface/loncommon.pm:1.491	Mon Dec 11 16:16:32 2006
+++ loncom/interface/loncommon.pm	Mon Dec 11 16:56:52 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.491 2006/12/11 21:16:32 albertel Exp $
+# $Id: loncommon.pm,v 1.492 2006/12/11 21:56:52 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -515,8 +515,8 @@
 
 sub selectcourse_link {
    my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype)=@_;
-    return "<a href='".'javascript:opencrsbrowser("'.$form.'","'.$unameele.
-        '","'.$udomele.'","'.$desc.'","'.$extra_element.'","'.$multflag.'","'.$selecttype.'");'."'>".&mt('Select [_1]',$selecttype)."</a>";
+   return "<a href='".'javascript:opencrsbrowser("'.$form.'","'.$unameele.
+        '","'.$udomele.'","'.$desc.'","'.$extra_element.'","'.$multflag.'","'.$selecttype.'");'."'>".&mt('Select Course')."</a>";
 }
 
 sub check_uncheck_jscript {
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.172 loncom/auth/lonroles.pm:1.173
--- loncom/auth/lonroles.pm:1.172	Mon Dec  4 21:55:56 2006
+++ loncom/auth/lonroles.pm	Mon Dec 11 16:56:53 2006
@@ -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.173 2006/12/11 21:56:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -639,14 +639,14 @@
 # More than one possible role
 # ----------------------------------------------------------------------- Table
     unless (($advanced) || ($nochoose)) {
-	$r->print("<h2>".&mt('Select a Course/Group to Enter')."</h2>\n");
+	$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");
     }
     $r->print('<br /><table><tr>');
     unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }
     $r->print('<th>'.&mt('User Role').'</th><th>'.&mt('Extent').
          '</th><th>'.&mt('Start').'</th><th>'.&mt('End').'</th></tr>'."\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 +686,7 @@
         $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 +912,7 @@
     my $courseform=&Apache::loncommon::selectcourse_link
                    ('rolechoice','dccourse'.$rowtype.'_'.$dcdom,
                     'dcdomain'.$rowtype.'_'.$dcdom,'coursedesc'.$rowtype.'_'.
-                    $dcdom,$dcdom,undef,$selecttype);
+                    $dcdom,$dcdom,undef);
     my $hiddenitems = '<input type="hidden" name="dcdomain'.$rowtype.'_'.$dcdom.'" value="'.$dcdom.'" />'.
                       '<input type="hidden" name="origdom'.$rowtype.'_'.$dcdom.'" value="'.$dcdom.'" />'.
                       '<input type="hidden" name="dccourse'.$rowtype.'_'.$dcdom.'" value="" />'.
@@ -1018,13 +1018,11 @@
     my ($dcdom,$rowtype) = @_;
     my $output = '<tr bgcolor="#77FF77">'.
                  ' <td colspan="5">';
-    foreach my $type ('Course','Group') {
-        my $selectlink = &courselink($dcdom,$rowtype,$type);
-        my $ccrole = &Apache::lonnet::plaintext('cc',$type);
-        $output.= '<font color="#002200">'.$ccrole.'</font>'.
+    my $selectlink = &courselink($dcdom,$rowtype);
+    my $ccrole = &Apache::lonnet::plaintext('cc');
+    $output.= '<font color="#002200">'.$ccrole.'</font>'.
               ' <b>'.$selectlink.'</b>'.
               ' from '.&mt('Domain').' '.$dcdom.'<br />';
-    }
     $output .= '</tr><tr><td colspan="5" height="3"></td></tr>'."\n";
     return $output;
 }