Add klass level between student and section

This commit is contained in:
Claude Paroz 2012-11-08 18:27:04 +01:00
parent 06a271363d
commit 47aaba639b
5 changed files with 40 additions and 14 deletions

View file

@ -52,7 +52,9 @@ function update_students(period_id) {
$.getJSON('/period/' + period_id + '/students/', function(data) {
var sel = $('#student_select');
$.each(data, function() {
if (this.training_id == null) sel.append($("<option />").val(this.id).text(this.name));
if (this.training_id == null) {
sel.append($("<option />").val(this.id).text(this.name + ' (' + this.klass + ')').data('klass', this.klass));
}
})
});
}