[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncreatecourse.pm

raeburn raeburn at source.lon-capa.org
Fri May 22 15:57:57 EDT 2020


raeburn		Fri May 22 19:57:57 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncreatecourse.pm 
  Log:
  - For 2.11
    Backport 1.173, 1.174
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.158.2.5 loncom/interface/loncreatecourse.pm:1.158.2.6
--- loncom/interface/loncreatecourse.pm:1.158.2.5	Fri Jul 26 17:27:44 2019
+++ loncom/interface/loncreatecourse.pm	Fri May 22 19:57:57 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.158.2.5 2019/07/26 17:27:44 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.158.2.6 2020/05/22 19:57:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -103,7 +103,7 @@
     foreach my $server (sort(keys(%host_servers))) {
         $course_home .= qq{<option value="$server"};
         if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) {
-            $course_home .= " selected ";
+            $course_home .= ' selected="selected"';
         }
         $course_home .= qq{>$server $host_servers{$server}</option>};
     }
@@ -120,6 +120,8 @@
     my $endtime = time+(6*30*24*60*60); # 6 months from now, approx
     my $access_table = &Apache::lonuserutils::date_setting_table($starttime,
                                              $endtime,'create_defaultdates');
+    my $openallfrom =
+        &Apache::lonhtmlcommon::date_setter('ccrs','openallfrom',$starttime);
     if ($crstype eq 'Course') {
         $enroll_table = &Apache::lonuserutils::date_setting_table($starttime,
                                               $endtime,'create_enrolldates');
@@ -189,6 +191,7 @@
                     'shd'  => 'Shift date parameters by number of days',
                     'assp' => "Assessment Parameters",
                     'oaas' => "Open all assessments",
+                    'sta'  => "starting from:",
                     'mssg' => "Messaging",
                     'scpf' => "Set course policy feedback to Course Coordinator",
                     'scfc' => "Set resource content feedback to Course Coordinator",
@@ -253,6 +256,8 @@
     }
     my $js = <<END;
 <script type="text/javascript">
+// <![CDATA[
+
 var editbrowser = null;
 function openbrowser(formname,elementname) {
     var url = '/res/?';
@@ -271,6 +276,8 @@
     editbrowser.focus();
 }
 $javascript_validations
+
+// ]]>
 </script>
 $coursebrowserjs
 END
@@ -289,7 +296,7 @@
 					    'Create_Courses');
     $r->print($start_page.$crumbs);
 
-    $r->print('<form action="/adm/createcourse" method="post" name="ccrs" action=""><div class="LC_createcourse">'
+    $r->print('<form action="/adm/createcourse" method="post" name="ccrs"><div class="LC_createcourse">'
              .&Apache::lonhtmlcommon::start_pick_box()
 
              .&Apache::lonhtmlcommon::row_headline()
@@ -356,6 +363,7 @@
                      .'<span class="LC_nobreak">'
                      .'<input type="radio" name="uniquecode" value="1" />'.&mt('Yes').(' 'x2)
                      .'<input type="radio" name="uniquecode" value="0" checked="checked" />'.&mt('No')
+                     .'</span> 
                      .&Apache::lonhtmlcommon::row_closure()
             );
     }
@@ -403,7 +411,7 @@
                  .&Apache::lonhtmlcommon::row_closure(1)
                  .&Apache::lonhtmlcommon::end_pick_box()
 
-                 .'<td> </td>'
+                 .'</td><td> </td>'
 
                  # Clone Course:
                  .'<td>'
@@ -453,7 +461,10 @@
                  .&Apache::lonhtmlcommon::row_closure()
 
                  .&Apache::lonhtmlcommon::row_title($lt{'oaas'})
-                 .'<input type="checkbox" name="openall" />'
+                 .'<span class="LC_nobreak">'
+                 .'<label><input type="radio" name="openall" value="0" checked="checked" />'.$lt{'no'}.'</label>'.(' 'x2)
+                 .'<label><input type="radio" name="openall" value="1" />'.$lt{'yes'}.'</label>'.', '
+                 .$lt{'sta'}.' '.$openallfrom.'</span>'
                  .&Apache::lonhtmlcommon::row_closure()
 
                  .&Apache::lonhtmlcommon::row_headline()
@@ -567,7 +578,8 @@
 <p>
 <input type="hidden" name="prevphase" value="courseone" />
 <input type="hidden" name="phase" value="coursetwo" />
-<input type="button" onclick="verify_message(this.form)" value="'.$lt{'opco'}.'" />'
+<input type="button" onclick="verify_message(this.form)" value="'.$lt{'opco'}.'" />
+</p>'
         );
     } elsif ($crstype eq 'Community') {
         $r->print('
@@ -589,7 +601,7 @@
     my $ccuname =&LONCAPA::clean_username($env{'form.ccuname'});
     my $ccdomain=&LONCAPA::clean_domain($env{'form.ccdomain'});
     my $crstype = 'Community';
-    my ($enrollstart,$enrollend,$startaccess,$endaccess);
+    my ($enrollstart,$enrollend,$startaccess,$endaccess,$openallfrom);
     my %domdefaults = 
         &Apache::lonnet::get_domain_defaults($env{'request.role.domain'});
 
@@ -600,6 +612,7 @@
     }
     $startaccess = &Apache::lonhtmlcommon::get_date_from_form('startaccess');
     $endaccess   = &Apache::lonhtmlcommon::get_date_from_form('endaccess');
+    $openallfrom = &Apache::lonhtmlcommon::get_date_from_form('openallfrom');
 
     my $autharg;
     my $authtype;
@@ -665,6 +678,7 @@
                disresdis => $env{'form.disresdis'},
                disablechat => $env{'form.disablechat'},
                openall => $env{'form.openall'},
+               openallfrom => $openallfrom,
                firstres => $env{'form.firstres'}
                };
 




More information about the LON-CAPA-cvs mailing list