Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 53... Línea 53...
53
        };
53
        };
Línea 54... Línea 54...
54
 
54
 
55
        // If the user choose a course in the selector do a WS request to get groups.
55
        // If the user choose a course in the selector do a WS request to get groups.
56
        courseGroupSelect.on('change', function() {
56
        courseGroupSelect.on('change', function() {
-
 
57
            var courseId = formElement.find(SELECTORS.EVENT_GROUP_COURSE_ID).val();
-
 
58
            if (isNaN(courseId) || courseId <= 0) {
-
 
59
                loadGroupSelectOptions([]);
57
            var courseId = formElement.find(SELECTORS.EVENT_GROUP_COURSE_ID).val();
60
            } else {
58
            CalendarRepository.getCourseGroupsData(courseId)
61
                CalendarRepository.getCourseGroupsData(courseId)
59
                .then(function(groups) {
62
                    .then(function(groups) {
60
                    return loadGroupSelectOptions(groups);
63
                        return loadGroupSelectOptions(groups);
61
                })
64
                    })
-
 
65
                    .catch(Notification.exception);
62
                .catch(Notification.exception);
66
            }
63
        });
67
        });
Línea 64... Línea 68...
64
    };
68
    };
65
 
69