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

Add OnlyofficeTools::getPathToView() to enable viewer in the learning path - fixes #41 #43

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

ywarnier
Copy link
Contributor

No description provided.

@ywarnier
Copy link
Contributor Author

@LinneyS / @Serg-Kv
In case you want to add a 1.4.2 today...
Sorry about the time miscalculation. I should be releasing Chamilo 1.11.28 in at least 3 hours from now, so if you have a few minutes to review and approve, having it officially as 1.4.2 or 1.5 would be great. Otherwise I'll add the change to the release of Chamilo directly overwriting the 1.4.1.

@SergeyKorneyev
Copy link

We can merge the PR, but we don't fully understand what it does exactly. Could you specify how the getPathToView method is used and in what cases the $_GET['nh'] flag is relevant and the header needs to b hidden?

@ywarnier
Copy link
Contributor Author

Sure, inside the learning path tool of Chamilo (inside a course), documents can be presented as a tree. HTML files are seen without issues, but for other formats it depends on the browser and the software installed on the client computer.
If no better way to show it is found, the documents are just downloaded, which breaks the learning flow. This has been an issue for years for us, although we've mostly been able to push our teacher users to just upload course content in HTML to avoid it.

With the OnlyOffice integration and this recent change, we can now open those documents directly in the browser, which will make a lot of users happy, in my opinion (and push them more strongly towards using ONLYOFFICE).

This looks like this now:
Capture d’écran du 2024-10-18 14-17-16

As where before, there would just be a "Download" button in the right panel.

The 'nh' (no-header) flag is to remove the header, because otherwise the portal logo and horizontal menu would appear, which never happens in the normal presentation of learning paths in Chamilo. Here is how it should appear with an HTML document (albeit non-responsive in this ugly example).

Capture d’écran du 2024-10-18 14-20-10

Given the fact that I'm just re-using editor.php which sets the height to "100% - 140px" to accomodate for the Chamilo header, I need a way to both remove that 140px margin and remove the header itself, which is provided by Display::display_reduced_header() normally used for the learning path and other "fullscreen" places in Chamilo.

@LinneyS LinneyS linked an issue Oct 18, 2024 that may be closed by this pull request
@t0rtila t0rtila merged commit 5cdbce3 into ONLYOFFICE:develop Oct 18, 2024
3 checks passed
@LinneyS
Copy link
Member

LinneyS commented Oct 18, 2024

Thank you
https://github.com/ONLYOFFICE/onlyoffice-chamilo/releases/tag/v1.5.0

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

Successfully merging this pull request may close these issues.

View documents in learning paths
4 participants