create course. Quick review on import. Add progress bar stuff to import as well as redirect

This commit is contained in:
Chris Dodge
2012-10-12 20:54:27 -04:00
parent 26e735b178
commit a58e6ce9e4
4 changed files with 68 additions and 30 deletions

View File

@@ -67,6 +67,7 @@ function showImportSubmit(e) {
$('.file-name-block').show();
$('.import .choose-file-button').hide();
$('.submit-button').show();
$('.progress').show();
}
function syncReleaseDate(e) {
@@ -452,6 +453,10 @@ function saveNewCourse(e) {
number = $(this).prevAll('.new-course-number').val();
display_name = $(this).prevAll('.new-course-name').val();
if (org == '' || number == '' || display_name == ''){
alert('You must specify all fields in order to create a new course.')
}
$.post('/create_new_course',
{ 'template' : template,
'org' : org,
@@ -460,7 +465,9 @@ function saveNewCourse(e) {
},
function(data) {
if (data.id != undefined)
location.reload();
location.reload();
else if (data.ErrMsg != undefined)
alert(data.ErrMsg);
});
}