Skip to content

Commit

Permalink
MDL-40829: courses heading: remove headerblock class from header and …
Browse files Browse the repository at this point in the history
…fix heading levels.

    Also, changing h3 classname from name to categoryname.
    Added note to theme/upgrade.txt to describe the heading level changes.
  • Loading branch information
rwijaya authored and Sam Hemelryk committed Oct 1, 2013
1 parent 268f4cb commit faf6010
Show file tree
Hide file tree
Showing 38 changed files with 208 additions and 144 deletions.
2 changes: 1 addition & 1 deletion course/format/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public function print_single_section_page($course, $sections, $mods, $modnames,
// Title with section navigation links.
$sectionnavlinks = $this->get_nav_links($course, $modinfo->get_section_info_all(), $displaysection);
$sectiontitle = '';
$sectiontitle .= html_writer::start_tag('div', array('class' => 'section-navigation header headingblock'));
$sectiontitle .= html_writer::start_tag('div', array('class' => 'section-navigation navigationtitle'));
$sectiontitle .= html_writer::tag('span', $sectionnavlinks['previous'], array('class' => 'mdl-left'));
$sectiontitle .= html_writer::tag('span', $sectionnavlinks['next'], array('class' => 'mdl-right'));
// Title attributes
Expand Down
8 changes: 4 additions & 4 deletions course/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1147,9 +1147,8 @@ protected function coursecat_coursebox(coursecat_helper $chelper, $course, $addi
// course name
$coursename = $chelper->get_course_formatted_name($course);
$coursenamelink = html_writer::link(new moodle_url('/course/view.php', array('id' => $course->id)),
$coursename, array('class' => $course->visible ? '' : 'dimmed'));
$content .= html_writer::tag($nametag, $coursenamelink, array('class' => 'name'));

$coursename, array('class' => $course->visible ? 'courseicon' : 'courseicon dimmed'));
$content .= html_writer::tag($nametag, $coursenamelink, array('class' => 'coursename'));
// If we display course in collapsed form but the course has summary or course contacts, display the link to the info page.
$content .= html_writer::start_tag('div', array('class' => 'moreinfo'));
if ($chelper->get_show_courses() < self::COURSECAT_SHOW_COURSES_EXPANDED) {
Expand Down Expand Up @@ -1542,7 +1541,8 @@ protected function coursecat_category(coursecat_helper $chelper, $coursecat, $de
array('title' => get_string('numberofcourses'), 'class' => 'numberofcourse'));
}
$content .= html_writer::start_tag('div', array('class' => 'info'));
$content .= html_writer::tag(($depth > 1) ? 'h4' : 'h3', $categoryname, array('class' => 'name'));

$content .= html_writer::tag(($depth > 1) ? 'h4' : 'h3', $categoryname, array('class' => 'categoryname'));
$content .= html_writer::end_tag('div'); // .info

// add category content to the output
Expand Down
16 changes: 8 additions & 8 deletions course/tests/behat/paged_course_navigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Feature: Course paged mode
And I click on <section3> "link" in the "#section-3" "css_element"
And I follow "C1"
And I click on <section1> "link" in the "#section-1" "css_element"
And I should see <section1> in the "div.single-section div.header" "css_element"
And I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
And I click on <section2> "link" in the ".single-section" "css_element"
And I should see <section2> in the "div.single-section div.header" "css_element"
And I should see <section2> in the "div.single-section" "css_element"
And I should see <section1> in the ".single-section span.mdl-left" "css_element"
And I should see <section3> in the ".single-section span.mdl-right" "css_element"
And I click on <section1> "link" in the ".single-section" "css_element"
And I should see <section1> in the "div.single-section div.header" "css_element"
And I should see <section1> in the "div.single-section" "css_element"
And I click on <section2> "link" in the ".single-section" "css_element"
And I click on <section3> "link" in the ".single-section" "css_element"
And I should see <section3> in the "div.single-section div.header" "css_element"
And I should see <section3> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-left" "css_element"
And I should not see <section1> in the ".single-section .section-navigation" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
Expand All @@ -49,18 +49,18 @@ Feature: Course paged mode
And I click on <section3> "link" in the "#section-3" "css_element"
And I follow "C1"
And I click on <section1> "link" in the "#section-1" "css_element"
And I should see <section1> in the "div.single-section div.header" "css_element"
And I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
And I click on <section2> "link" in the ".single-section" "css_element"
And I should see <section2> in the "div.single-section div.header" "css_element"
And I should see <section2> in the "div.single-section" "css_element"
And I should see <section1> in the ".single-section span.mdl-left" "css_element"
And I should see <section3> in the ".single-section span.mdl-right" "css_element"
And I click on <section1> "link" in the ".single-section" "css_element"
And I should see <section1> in the "div.single-section div.header" "css_element"
And I should see <section1> in the "div.single-section" "css_element"
And I click on <section2> "link" in the ".single-section" "css_element"
And I click on <section3> "link" in the ".single-section" "css_element"
And I should see <section3> in the "div.single-section div.header" "css_element"
And I should see <section3> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-left" "css_element"
And I should not see <section1> in the ".single-section .section-navigation" "css_element"
And I should not see <prevunexistingsection> in the ".single-section" "css_element"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ var CSS = {
SELECTORS = {
LOADEDTREES: '.with_children.loaded',
CONTENTNODE: '.content',
CATEGORYLISTENLINK: '.category .info .name',
CATEGORYSPINNERLOCATION: '.name',
CATEGORYLISTENLINK: '.category .info .categoryname',
CATEGORYSPINNERLOCATION: '.categoryname',
CATEGORYWITHCOLLAPSEDLOADEDCHILDREN: '.category.with_children.loaded.collapsed',
CATEGORYWITHMAXIMISEDLOADEDCHILDREN: '.category.with_children.loaded:not(.collapsed)',
COLLAPSEEXPAND: '.collapseexpand',
COURSEBOX: '.coursebox',
COURSEBOXLISTENLINK: '.coursebox .moreinfo',
COURSEBOXSPINNERLOCATION: '.name a',
COURSEBOXSPINNERLOCATION: '.categoryname a',
COURSECATEGORYTREE: '.course_category_tree',
PARENTWITHCHILDREN: '.category'
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ var CSS = {
SELECTORS = {
LOADEDTREES: '.with_children.loaded',
CONTENTNODE: '.content',
CATEGORYLISTENLINK: '.category .info .name',
CATEGORYSPINNERLOCATION: '.name',
CATEGORYLISTENLINK: '.category .info .categoryname',
CATEGORYSPINNERLOCATION: '.categoryname',
CATEGORYWITHCOLLAPSEDLOADEDCHILDREN: '.category.with_children.loaded.collapsed',
CATEGORYWITHMAXIMISEDLOADEDCHILDREN: '.category.with_children.loaded:not(.collapsed)',
COLLAPSEEXPAND: '.collapseexpand',
COURSEBOX: '.coursebox',
COURSEBOXLISTENLINK: '.coursebox .moreinfo',
COURSEBOXSPINNERLOCATION: '.name a',
COURSEBOXSPINNERLOCATION: '.categoryname a',
COURSECATEGORYTREE: '.course_category_tree',
PARENTWITHCHILDREN: '.category'
},
Expand Down
6 changes: 3 additions & 3 deletions course/yui/src/categoryexpander/js/categoryexpander.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ var CSS = {
SELECTORS = {
LOADEDTREES: '.with_children.loaded',
CONTENTNODE: '.content',
CATEGORYLISTENLINK: '.category .info .name',
CATEGORYSPINNERLOCATION: '.name',
CATEGORYLISTENLINK: '.category .info .categoryname',
CATEGORYSPINNERLOCATION: '.categoryname',
CATEGORYWITHCOLLAPSEDLOADEDCHILDREN: '.category.with_children.loaded.collapsed',
CATEGORYWITHMAXIMISEDLOADEDCHILDREN: '.category.with_children.loaded:not(.collapsed)',
COLLAPSEEXPAND: '.collapseexpand',
COURSEBOX: '.coursebox',
COURSEBOXLISTENLINK: '.coursebox .moreinfo',
COURSEBOXSPINNERLOCATION: '.name a',
COURSEBOXSPINNERLOCATION: '.categoryname a',
COURSECATEGORYTREE: '.course_category_tree',
PARENTWITHCHILDREN: '.category'
},
Expand Down
Loading

0 comments on commit faf6010

Please sign in to comment.