Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't generate html for empty title and lessons section on single course page #3307

Open
hansschuijff opened this issue Jun 18, 2020 · 0 comments · May be fixed by #3308
Open

Don't generate html for empty title and lessons section on single course page #3307

hansschuijff opened this issue Jun 18, 2020 · 0 comments · May be fixed by #3308
Labels
Courses Legacy Legacy functionality that has been replaced by blocks [Pri] Low Cosmetic issue, low impact, easy workaround [Type] Bug

Comments

@hansschuijff
Copy link
Contributor

When there are no (other) lessons in a course, the single course page still generates the html for the title and content of the list. That is not only redundant, but also a problem when the title is getting prefixed by a filter.

In that case it is left to the filter not to prefix the empty title and make the existence of the empty title visible. When it doesn't (what it might not) a title is shown with only the prefix and no content below it. When there is no content (lessons outside of modules), there is no need for a title and a content wrapper.

Steps to Reproduce

  1. Go to a single course page of a course without lessons '/course/{course-slug}/'
  2. Inspect the html

What I Expected

No .course-lessons section and no header title of that section when there are no lessons to show.

What Happened Instead

Below the .entry section the following html is added:

<header>
    <h2>
    </h2>
</header>
<section class="course-lessons">
</section>
@donnapep donnapep added [Status] Accepted [Pri] Low Cosmetic issue, low impact, easy workaround Courses and removed [Status] Accepted labels Oct 13, 2020
@donnapep donnapep added Legacy Legacy functionality that has been replaced by blocks and removed [Status] Queued labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Courses Legacy Legacy functionality that has been replaced by blocks [Pri] Low Cosmetic issue, low impact, easy workaround [Type] Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants