[LON-CAPA-cvs] cvs: loncom /interface loncoursegroups.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 07 Jul 2006 17:11:05 -0000


albertel		Fri Jul  7 13:11:05 2006 EDT

  Modified files:              
    /loncom/interface	loncoursegroups.pm 
  Log:
  - more css of groups
     - date settings
     - first step of new group creation
  
  
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.40 loncom/interface/loncoursegroups.pm:1.41
--- loncom/interface/loncoursegroups.pm:1.40	Fri Jul  7 12:48:21 2006
+++ loncom/interface/loncoursegroups.pm	Fri Jul  7 13:11:04 2006
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.40 2006/07/07 16:48:21 albertel Exp $
+# $Id: loncoursegroups.pm,v 1.41 2006/07/07 17:11:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1184,8 +1184,7 @@
     my ($nexttext,$prevtext);
     &groupsettings_options($r,$tabcol,$functions,$action,$formname,$stored,1,
                            $gpterm,$ucgpterm,$crstype);
-    &access_date_settings($r,$tabcol,$action,$formname,$stored,2,$gpterm,
-                          $ucgpterm);
+    &access_date_settings($r,$action,$formname,$stored,2,$gpterm,$ucgpterm);
     if ($action eq 'create') {
         &membership_options($r,$action,$formname,$sectioncount,3,$gpterm,
 			    $ucgpterm);
@@ -1226,9 +1225,6 @@
     my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored);
     &topic_bar($r,$image,$lt{'gnde'});
     $r->print('
-   <tr>
-    <td>&nbsp;</td>
-    <td colspan="3">
      <table border="0" cellpadding="2" cellspacing="2">
       <tr>
        <td><b>'.$lt{'gnam'}.':</b></td>
@@ -1318,8 +1314,6 @@
        </td>
       </tr>
      </table>
-    </td>
-   </tr>
 ');
     return;
 }
@@ -1428,7 +1422,7 @@
 }
 
 sub access_date_settings {
-    my ($r,$tabcol,$action,$formname,$stored,$image,$gpterm,$ucgpterm) = @_;
+    my ($r,$action,$formname,$stored,$image,$gpterm,$ucgpterm) = @_;
     my %lt = &Apache::lonlocal::texthash(
                 'sten' => "Default start and end dates for $gpterm access",
              );
@@ -1440,21 +1434,11 @@
             $endtime = $$stored{'enddate'};
         }
     }
-    my ($start_table,$end_table) = &date_setting_table
-                                    ($starttime,$endtime,$formname);
+    my ($table) = &date_setting_table($starttime,$endtime,$formname);
     &topic_bar($r,$image,$lt{'sten'});
     $r->print('
-   <tr>
-    <td>&nbsp;</td>
-    <td colspan="3">'.$start_table.'</td>
-   <tr>
-   <tr>
-    <td colspan="4">&nbsp;</td>
-   </tr>
-   <tr>
-    <td>&nbsp;</td>
-    <td colspan="3">'.$end_table.'</td>
-   <tr>');
+    '.$table.'
+    ');
     return;
 }
 
@@ -1523,13 +1507,6 @@
 
 sub display_navbuttons {
     my ($r,$formname,$prev,$prevtext,$next,$nexttext) = @_;
-    $r->print('
-    <tr>
-     <td colspan="4">&nbsp;</td>
-    </tr>
-    <tr>
-     <td>&nbsp;</td>
-     <td colspan="3">');
     if ($prev) {
         $r->print('
       <input type="button" name="previous" value = "'.$prevtext.'"
@@ -1541,10 +1518,6 @@
       <input type="button" name="next" value="'.$nexttext.'"
  onclick="javascript:nextPage(document.'.$formname.','."'".$next."'".')" />');
     }
-    $r->print('
-     </td>
-    </tr>
-');
 }
 
 sub check_tools {
@@ -1957,12 +1930,9 @@
                                 'oppr' => 'Optional privileges',
                                 'func' => 'Function',
     );
-    $r->print(&Apache::lonhtmlcommon::start_pick_box());
-    $r->print('<tr>
-                <td bgcolor="'.$tabcol.'" valign="top">
-                 <table cellspacing="0" cellpadding="1">
-                  <tr>
-                   <td valign="top"><b>'.$lt{'func'}.'</b></td>
+    $r->print(&Apache::loncommon::start_data_table().
+	      &Apache::loncommon::start_data_table_header_row());
+    $r->print('<th>'.$lt{'func'}.'</th>
                   </tr>
                   <tr>
                    <td valign="top"><b>'.$lt{'fixp'}.'</b></td>
@@ -3423,23 +3393,18 @@
                                                       'startdate',$starttime);
     my $endform = &Apache::lonhtmlcommon::date_setter($formname,
                                                       'enddate',$endtime);
-    my $perpetual = '<nobr><label><input type="checkbox" name="no_end_date" />
-                                                no ending date</label></nobr>';
-    my $start_table = '';
-    $start_table .= "<table>\n";
-    $start_table .= '<tr><td align="right">Default starting date for 
-                                           member access</td>'.
+    my $perpetual = 
+	'<nobr><label><input type="checkbox" name="no_end_date" />'.
+	&mt('None').'</label></nobr>';
+    my $table = "<table>\n".
+	'<tr><td align="right">'.&mt('Start:').'</td>'.
         '<td>'.$startform.'</td>'.
-        '<td>&nbsp;</td>'."</tr>\n";
-    $start_table .= "</table>";
-    my $end_table = '';
-    $end_table .= "<table>\n";
-    $end_table .= '<tr><td align="right">Default ending date for 
-                                         member access</td>'.
+        '<td>&nbsp;</td>'."</tr>\n".
+	'<tr><td align="right">'.&mt('End:').'</td>'.
         '<td>'.$endform.'</td>'.
-        '<td>'.$perpetual.'</td>'."</tr>\n";
-    $end_table .= "</table>\n";
-    return ($start_table, $end_table);
+        '<td>'.$perpetual.'</td>'."</tr>\n".
+	"</table>\n";
+    return $table;
 }
 
 sub add_group_folder {