Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-42858 Course Management: fix regression for subcategories visibility

  • Loading branch information...
commit 2834f79e73e4d1d7437d049c0b378cde942bb508 1 parent 2b10fa0
rwijaya rwijaya authored
4 course/classes/management/helper.php
View
@@ -622,10 +622,6 @@ public static function action_category_show(\coursecat $category) {
if (!$category->can_change_visibility()) {
throw new \moodle_exception('permissiondenied', 'error', '', null, 'coursecat::can_change_visbility');
}
- if ((int)$category->get_parent_coursecat()->visible === 0) {
- // You cannot mark a category visible if its parent is hidden.
- return false;
- }
$category->show();
return true;
}
3  theme/base/style/course.css
View
@@ -463,14 +463,11 @@ input.titleeditor { vertical-align: text-bottom; }
.dir-rtl #course-category-listings .listitem > div > .float-right {float:left;text-align:left;}
#course-category-listings .listitem[data-visible="0"],
-#course-category-listings .listitem[data-visible="0"] a.categoryname,
#course-category-listings .listitem[data-visible="0"] > div > a {color:#AAA;}
#course-category-listings .listitem > div .item-actions .action-hide,
#course-category-listings .listitem[data-visible="0"] > div .item-actions .action-show {display:inline;}
#course-category-listings .listitem > div .item-actions .action-show,
#course-category-listings .listitem[data-visible="0"] > div .item-actions .action-hide,
-#course-category-listings .listitem[data-visible="0"] > ul .item-actions.category-item-actions .action-hide,
-#course-category-listings .listitem[data-visible="0"] > ul .item-actions.category-item-actions .action-show,
#category-listing .listitem:first-child > div .item-actions .action-moveup,
#category-listing .listitem:last-child > div .item-actions .action-movedown,
10 theme/bootstrapbase/less/moodle/course.less
View
@@ -967,9 +967,6 @@ span.editinstructions {
// The category or course is hidden.
&[data-visible="0"] {
.muted;
- a.categoryname {
- .muted;
- }
> div {
> a {
.muted;
@@ -983,13 +980,6 @@ span.editinstructions {
}
}
}
- > ul .item-actions.category-item-actions {
- // If the category is hidden hide both show and hide icons for sub categories.
- .action-hide,
- .action-show {
- display: none;
- }
- }
}
&.highlight {
background-color:transparent;
2  theme/bootstrapbase/style/moodle.css
View
1 addition, 1 deletion not shown
Please sign in to comment.
Something went wrong with that request. Please try again.