Index: lams_webct_integration/web/create.vm =================================================================== diff -u -r1f78d75662f32653744b32eba99d5ffc3b222855 -rcf736e782de985fb389edc999a1588ea9d8893f6 --- lams_webct_integration/web/create.vm (.../create.vm) (revision 1f78d75662f32653744b32eba99d5ffc3b222855) +++ lams_webct_integration/web/create.vm (.../create.vm) (revision cf736e782de985fb389edc999a1588ea9d8893f6) @@ -112,6 +112,35 @@ { alert("You must select a start date if you want to schedule the lesson."); } + else if (document.getElementById("dateStart").value==document.getElementById("dateEnd").value) + { + var startHour = parseInt(document.getElementById("startHour").value, 10); + if (document.getElementById("startAMPM").value=="PM") + { + startHour = startHour + 12; + } + var startMin = parseInt(document.getElementById("startMin").value, 10); + + var endHour = parseInt(document.getElementById("endHour").value, 10); + if (document.getElementById("endAMPM").value=="PM") + { + endHour = endHour + 12; + } + var endMin = parseInt(document.getElementById("endMin").value, 10); + + var start = new Date("2000", "1", "1", startHour, startMin,"0"); + var end = new Date("2000", "1", "1", endHour, endMin, "0"); + + if (start>=end) + { + alert("Start date and time must be before end date and time."); + } + else + { + document.getElementById("form_action").value="start_lesson"; + formSubmit(); + } + } else { document.getElementById("form_action").value="start_lesson"; @@ -176,17 +205,17 @@
*Title: | -+ | |
Description: | -+ | |
Lesson Visibility: |
- Show Lesson - Hide Lesson + Show Lesson + Hide Lesson |