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

raeburn raeburn@source.lon-capa.org
Wed, 04 Nov 2009 14:13:33 -0000


raeburn		Wed Nov  4 14:13:33 2009 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Accommodate communities.
     - Additional arg in opencrbrowser() javascription function call.
       - typeelement in opener page set when course or community is selected in coursepick pop-up window (DC selecting course for adding role).
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.322 loncom/interface/loncreateuser.pm:1.323
--- loncom/interface/loncreateuser.pm:1.322	Tue Nov  3 21:31:06 2009
+++ loncom/interface/loncreateuser.pm	Wed Nov  4 14:13:32 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.322 2009/11/03 21:31:06 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.323 2009/11/04 14:13:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5961,8 +5961,8 @@
                       '<input type="hidden" name="origdom" value="'.$dcdom.'" />'.
                       '<input type="hidden" name="dccourse" value="" />';
     my $courseform='<b>'.&Apache::loncommon::selectcourse_link
-            ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>';
-    my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role');
+            ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course/Community','crstype').'</b>';
+    my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role','Course/Community Browser');
     my %lt=&Apache::lonlocal::texthash(
                     'rol'  => "Role",
                     'grs'  => "Section",
@@ -5973,14 +5973,14 @@
                     'ssd'  => "Set Start Date",
                     'sed'  => "Set End Date"
                   );
-    my $header = '<h4>'.&mt('Course Level').'</h4>'.
+    my $header = '<h4>'.&mt('Course/Community Level').'</h4>'.
                  &Apache::loncommon::start_data_table().
                  &Apache::loncommon::start_data_table_header_row().
                  '<th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
                  &Apache::loncommon::end_data_table_header_row();
     my $otheritems = &Apache::loncommon::start_data_table_row()."\n".
-                     '<td><input type="text" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',''".')" /></td>'."\n".
-                     '<td><select name="role">'."\n";
+                     '<td><br /><input type="text" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc','','','','crstype'".')" /></td>'."\n".
+                     '<td valign><br /><select name="role">'."\n";
     foreach my $role (@roles) {
         my $plrole=&Apache::lonnet::plaintext($role);
         $otheritems .= '  <option value="'.$role.'">'.$plrole;
@@ -6000,13 +6000,14 @@
                      '<td valign="top">&nbsp;<b>'.$lt{'new'}.'</b><br />'.
                      '<input type="text" name="newsec" value="" />'.
                      '<input type="hidden" name="section" value="" />'.
-                     '<input type="hidden" name="groups" value="" /></td>'.
+                     '<input type="hidden" name="groups" value="" />'.
+                     '<input type="hidden" name="crstype" value="" /></td>'.
                      '</tr></table></td>';
     $otheritems .= <<ENDTIMEENTRY;
-<td><input type="hidden" name="start" value='' />
+<td><br /><input type="hidden" name="start" value='' />
 <a href=
 "javascript:pjump('date_start','Start Date',document.cu.start.value,'start','cu.pres','dateset')">$lt{'ssd'}</a></td>
-<td><input type="hidden" name="end" value='' />
+<td><br /><input type="hidden" name="end" value='' />
 <a href=
 "javascript:pjump('date_end','End Date',document.cu.end.value,'end','cu.pres','dateset')">$lt{'sed'}</a></td>
 ENDTIMEENTRY