MDL-42777 courses: removed unneeded category check

On course view manage page, JS was not getting initalised as category-listing
is not visible, initialiseCourses is doing unnessary check for category as
it takes care of empty category so it should not return on empty category
This commit is contained in:
Rajesh Taneja 2013-11-08 13:59:15 +08:00
parent d214057cad
commit 428a1bbdb1
4 changed files with 3 additions and 14 deletions

View file

@ -281,10 +281,6 @@ Console.prototype = {
if (!listing) { if (!listing) {
return false; return false;
} }
if (!category) {
Y.log('Couldn\'t find the current category object.', 'warn', 'moodle-course-management');
return false;
}
listing.all('.listitem[data-id]').each(function(node){ listing.all('.listitem[data-id]').each(function(node){
this.registerCourse(new Course({ this.registerCourse(new Course({
node : node, node : node,

File diff suppressed because one or more lines are too long

View file

@ -278,9 +278,6 @@ Console.prototype = {
if (!listing) { if (!listing) {
return false; return false;
} }
if (!category) {
return false;
}
listing.all('.listitem[data-id]').each(function(node){ listing.all('.listitem[data-id]').each(function(node){
this.registerCourse(new Course({ this.registerCourse(new Course({
node : node, node : node,

View file

@ -279,10 +279,6 @@ Console.prototype = {
if (!listing) { if (!listing) {
return false; return false;
} }
if (!category) {
Y.log('Couldn\'t find the current category object.', 'warn', 'moodle-course-management');
return false;
}
listing.all('.listitem[data-id]').each(function(node){ listing.all('.listitem[data-id]').each(function(node){
this.registerCourse(new Course({ this.registerCourse(new Course({
node : node, node : node,