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

Level headings #145

Closed
dvargasa opened this issue Jan 22, 2018 · 9 comments
Closed

Level headings #145

dvargasa opened this issue Jan 22, 2018 · 9 comments
Assignees

Comments

@dvargasa
Copy link

Hello everyone

Im trying to provide descriptive headings in the text editor so I am using the format option for level heading: Header 2, Header 3, ....., and paragrah

My problem: In the visualization of the content, the Page Contents area don`t show correctly the html code (levels and paragrahps).

I atach the pictures to describe the error.

Thanks a lot for help me.

Image 1: HTML Code
html_code

Image 2: Visualization Page Content area (Not Ok - it is my problem)
page_content

Image 3: Visualization Body area (Ok)
page_body_content

@atutor
Copy link
Owner

atutor commented Jan 22, 2018

Which version of ATutor are you using?

@dvargasa
Copy link
Author

Hello,
The version is: ATutor 2.2.2
XAMPP 5.6.33: Apache 2.4.29, MariaDB 10.1.30, PHP 5.6.33

@atutor
Copy link
Owner

atutor commented Jan 22, 2018

The problem appears to be fixed in 2.2.3 (soon to be released), though the bug report is still open:
http://www.atutor.ca/atutor/mantis/view.php?id=5801

After making a backup copy of /include/lib/output.inc.php, I would suggest replacing it with a current copy from Github:
https://raw.githubusercontent.com/atutor/ATutor/master/include/lib/output.inc.php

Let me know if that works, so we can resolve the bug. thx

@dvargasa
Copy link
Author

Hi.
It doesn’t work for me
If you have another suggestion I would really appreciate it

@atutor
Copy link
Owner

atutor commented Jan 23, 2018

Cindy may be able to help with this. It seems to be a regular expression issue, which seems to be matching more than headings.

preg_match_all("/<(h[\d]+)[^>]*>(.*)<\/(\s*)\\1(\s*)>/i", $content, $found_headers, PREG_SET_ORDER);

preg_match_all("/<(h[\d]+)[^>]*>(.*)<\/(\s*)\\1(\s*)>/i", $content, $found_headers, PREG_SET_ORDER);

thanks Cindy.

@cindyli
Copy link
Collaborator

cindyli commented Jan 24, 2018

@atutor, I issued a pull request #146 for this issue.

@atutor
Copy link
Owner

atutor commented Jan 24, 2018

Here's the fix:

preg_match_all("/<(h[\d]+)[^>]*>(.*?)<\/(\s*)\\1(\s*)>/i", $content, $found_headers, PREG_SET_ORDER);

@dvargasa
Copy link
Author

Thanks a lot.
I tried it and worked perfectly!!!.

@atutor
Copy link
Owner

atutor commented Jan 24, 2018

Good to hear.

@atutor atutor closed this as completed Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants