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

raeburn raeburn at source.lon-capa.org
Fri Apr 15 15:27:38 EDT 2016


raeburn		Fri Apr 15 19:27:38 2016 EDT

  Modified files:              
    /loncom/interface	loncreatecourse.pm 
  Log:
  - Placement Tests can feature auto-enrollment.
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.161 loncom/interface/loncreatecourse.pm:1.162
--- loncom/interface/loncreatecourse.pm:1.161	Wed Apr  6 17:41:52 2016
+++ loncom/interface/loncreatecourse.pm	Fri Apr 15 19:27:37 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.161 2016/04/06 17:41:52 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.162 2016/04/15 19:27:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -118,7 +118,7 @@
     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');
-    if ($crstype eq 'Course') {
+    if (($crstype eq 'Course') || ($crstype eq 'Placement')) {
         $enroll_table = &Apache::lonuserutils::date_setting_table($starttime,
                                               $endtime,'create_enrolldates');
         ($krbdef,$krbdefdom) =
@@ -132,7 +132,7 @@
         $krbform = &Apache::loncommon::authform_kerberos(%param);
         $intform = &Apache::loncommon::authform_internal(%param);
         $locform = &Apache::loncommon::authform_local(%param);
-    } elsif ($crstype eq 'Community') {
+    } else {
         my $title_alert = &mt('A Community title is required');
         my $coord_alert = &mt('The username of the Coordinator is required');
         &js_escape(\$title_alert);
@@ -149,24 +149,6 @@
     formname.submit();
 }
         |;
-    } else {
-        my $title_alert = &mt('A Placement Test title is required');
-        my $coord_alert = &mt('The username of the Course Coordinator is required');
-        &js_escape(\$title_alert);
-        &js_escape(\$coord_alert);
-        $javascript_validations = qq|
-function validate(formname) {
-    if (formname.title == '') {
-        alert("$title_alert");
-        return;
-    }
-    if (formname.ccuname == '') {
-        alert("$coord_alert");
-    }
-    formname.submit();
-}
-        |;
-        
     }
     my %lt=&Apache::lonlocal::texthash(
 		    'cinf' => "Course Information",
@@ -612,7 +594,7 @@
 <p>
 <input type="hidden" name="prevphase" value="placementone" />
 <input type="hidden" name="phase" value="placementtwo" />
-<input type="submit" value="'.$lt{'oppt'}.'" />
+<input type="button" onclick="verify_message(this.form)" value="'.$lt{'oppt'}.'" />
 </p>'
         );
     }




More information about the LON-CAPA-cvs mailing list