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:
@@ -281,10 +281,6 @@ Console.prototype = {
|
||||
if (!listing) {
|
||||
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){
|
||||
this.registerCourse(new Course({
|
||||
node : node,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -278,9 +278,6 @@ Console.prototype = {
|
||||
if (!listing) {
|
||||
return false;
|
||||
}
|
||||
if (!category) {
|
||||
return false;
|
||||
}
|
||||
listing.all('.listitem[data-id]').each(function(node){
|
||||
this.registerCourse(new Course({
|
||||
node : node,
|
||||
|
||||
-4
@@ -279,10 +279,6 @@ Console.prototype = {
|
||||
if (!listing) {
|
||||
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){
|
||||
this.registerCourse(new Course({
|
||||
node : node,
|
||||
|
||||
Reference in New Issue
Block a user