chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
798 stars 480 forks source link

Chamilo Rapid can't be configured #3102

Closed CrowCakes closed 4 years ago

CrowCakes commented 4 years ago

Describe There isn't a way to set up the Chamilo Rapid (PPT to Learning Path) configuration through the LMS portal

To Reproduce Steps to reproduce the behavior:

  1. Follow instructions found in https://11.chamilo.org/documentation/installation_guide.html#11._Chamilo_rapid_ppt_conversion
  2. Login as Admin and navigate to Adminstration
  3. Under Portal, search for "Chamilo Rapid" or "Rapid"
  4. No results
  5. Check in any course's Learning Paths toolbar for the PPT icon
  6. No icon

Expected behavior I expected to find a page to configure Chamilo Rapid settings and the icon to access the service in Learning Paths

Desktop:

Server

CrowCakes commented 4 years ago

As I post this report, I almost immediately found the location of the page, and it's not where the installtion guide says it is.

Solution

  1. Login as Admin
  2. Navigate to Administration
  3. Under Portal, click Plugins
  4. Click the Configure extensions tab
  5. Click the green button that says Chamilo Rapid

Currently, I am having problems getting it to actually convert PPT files, but that is an issue for another ticket. Issue resolved, I guess.

ywarnier commented 4 years ago

You can leave it open, we'll check the installation guide before the 1.11.12 release. This being said, we haven't really touched the Rapid code in ages, so it might not work and the real issue might just be that we have to fix it, but I wouldn't get my hopes too high for a quick solution as very few people use it (if any).

CrowCakes commented 4 years ago

I should note that I got the Rapid system to work, but it required the WordPress headless server to run in the same environment (localhost) as the LMS. Please include this information when the installation guide is next updated.

For some strange reason, the generated learning path had the wrong URLs to the converted image files. I won't escalate this into another issue, but I fixed it by changing the url field in the access_url table. Did I mess up during installation?

ywarnier commented 4 years ago

@CrowCakes Wordpress? You mean LibreOffice, right? You can actually setup a remote LibreOffice system but you will still require an installation of Chamilo there. I don't remember the details on how to do it, though. I think you just install another Chamilo on the remote server and point the Rapid system to that URL, and that's it... any chance you have time to try that out?

CrowCakes commented 4 years ago

Yes, I meant LibreOffice. I can probably try the remote system out, since it seems that my client won't be using the LMS for a while. Should I point the host address to the address of the remote Chamilo? e.g. x.x.x.x/chamilo

lonesomewalker commented 4 years ago

The libreoffice server can be installed anywhere, it only depends how you implement this service. (localhost vs. ip bindings...)

hsonymmx commented 4 years ago

I should note that I got the Rapid system to work, but it required the WordPress headless server to run in the same environment (localhost) as the LMS. Please include this information when the installation guide is next updated.

For some strange reason, the generated learning path had the wrong URLs to the converted image files. I won't escalate this into another issue, but I fixed it by changing the url field in the access_url table. Did I mess up during installation?

Hello to all. I have the same problem with wrong generated Urls for images after conversion. In access_url table I have http://localhost/. What do you have changed? Thank you, David

P.S.: LibreOffice runs on the same Chamilo installation server .

CrowCakes commented 4 years ago

Hello to all. I have the same problem with wrong generated Urls for images after conversion. In access_url table I have http://localhost/. What do you have changed? Thank you, David

P.S.: LibreOffice runs on the same Chamilo installation server .

As far as I know, http://localhost only applied for my dev environment, which was not published to the Internet. For my production environment, I changed access_url to the root of the LMS, which was https://insert-domain-here/chamilo in my case.

ywarnier commented 4 years ago

We usually recommend using subdomains instead of subdirectories for installations of Chamilo. Subdomains reduce the complexity of management in Chamilo, there is clearly a better support for it as most developers work with subdomains, and it also allows you to better manage your Chamilo installation at an Apache2 configuration level.

For the remote Rapid installation, as far as I can remember yes, it's only installing a "dummy" Chamilo installation somewhere else, with LibreOffice running in the background. As described in the documentation, we usually use "screen" to let it run in the background.

Just to mention that I have recently installed a Chamilo (in a subdomain) and I just left a LibreOffice instance running as indicated in the documentation and then went to the extension configuration page, added "localhost", port "2002", without login/pass and that pretty much worked straight away.

Keep in mind this only adds an icon on the learning paths page to upload a document with Chamilo Rapid.

If you have issues, it is likely that you'll see some problem description lines appear in the Apache log, explaining (the best we can) what's wrong.

hsonymmx commented 4 years ago

Hello Yannick, I have made further investigations and I can say that LibreOffice conversion works as expected in background and slides were imported correctly. But they are not visible in Learning Path, giving me error 404, when inspected.

Annotazione 2020-04-23 160257 Annotazione 2020-04-23err404

Here below the last rows of apache log: [Thu Apr 09 01:58:58.741463 2020] [proxy_fcgi:error] [pid 15445:tid 140590750586624] [client 46.101.251.6:47948] AH01071: Got error 'Primary script unknown' [Thu Apr 09 01:59:50.138667 2020] [proxy_fcgi:error] [pid 12117:tid 140590645688064] [client 167.99.212.81:49378] AH01071: Got error 'Primary script unknown' [Thu Apr 09 22:57:59.947319 2020] [:error] [pid 25566:tid 140427552319232] [client 13.90.170.182:51454] [client 13.90.170.182] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "Xo@MV8MlcRaQ36GySmhsKwAAAIo"] [Fri Apr 10 01:28:12.000635 2020] [:error] [pid 25566:tid 140427573298944] [client 52.175.205.75:58357] [client 52.175.205.75] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "Xo@vi8MlcRaQ36GySmh-DQAAAIg"] [Wed Apr 15 17:53:30.416607 2020] [:error] [pid 30704:tid 140368347641600] [client 178.174.174.11:55128] [client 178.174.174.11] ModSecurity: Warning. Matched phrase "/.git/" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.git/HEAD"] [unique_id "Xpct@vKDifZXr5B5b80mHAAAAQc"] [Wed Apr 15 17:53:31.103897 2020] [:error] [pid 30704:tid 140368221763328] [client 178.174.174.11:55160] [client 178.174.174.11] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "Xpct@-KDifZXr5B5b80mHgAAARM"] [Thu Apr 16 01:24:16.020062 2020] [:error] [pid 31479:tid 139923776567040] [client 178.174.174.11:52720] [client 178.174.174.11] ModSecurity: Warning. Matched phrase "/.git/" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.git/HEAD"] [unique_id "XpeXnx-A9w3r-e6MJC71OQAAAMg"] [Thu Apr 16 01:24:16.625977 2020] [:error] [pid 31375:tid 139923713627904] [client 178.174.174.11:52796] [client 178.174.174.11] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "XpeXoG-7RDFfE1fzFDxA4QAAAI4"] [Tue Apr 21 04:41:44.993145 2020] [:error] [pid 24262:tid 139805071476480] [client 13.90.170.182:56117] [client 13.90.170.182] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "Xp5daO1R3U2ZrFrAefYrCAAAAQw"] [Tue Apr 21 04:41:45.376398 2020] [:error] [pid 24262:tid 139805060986624] [client 13.90.170.182:56119] [client 13.90.170.182] ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "ecampus.abaroma.it"] [uri "/.env"] [unique_id "Xp5dae1R3U2ZrFrAefYrCgAAAQ0"]

I'm using Comodo WAF rules. Despite CWAF errors, Chamilo works well as other websites hosted in the same server.

Other LPs, not converted from Chamilo RAPID, work without issues. The strange thing is that all the files (html and images) were loaded in server's folder of the course. I really can't figured out how the server responds with a "404".

My system:

Thanks a lot, David

lonesomewalker commented 4 years ago

ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI.

hsonymmx commented 4 years ago

ModSecurity: Warning. Matched phrase "/.env" at REQUEST_URI.

Hi lonsomewalker, Already disabled the corrsponding rule in modsecurity. Nothing. I believe that it could be related to file/folder permission. My question is that if it is possible that LibreOffice did not have sufficient priviliges to write in course's folders. But in my Chamilo permissions are 0644 for files and 0755 for directories. Unique exception is "Config" directory inside "App" dir. For Config dir. permissions are 0555. Maybe, I must authorize root user (LibreOffice) to write in courses's directories in configuration.php? I don't know how o do it... Thank you and stay safe, David

lonesomewalker commented 4 years ago

I don't know how you set up the headless server, but i wrote an install guide for that some years ago. Still working.

hsonymmx commented 4 years ago

Installed proper -headless version for my distro. Installed step by step, libreoffice-writer, impress, calc. Followed also Chamilo Installation guide v. 1.11.8. for chamilo rapid setup. After installation I have run: soffice --accept="socket,host=localhost,port=2002,tcpNoDelay=1;urp;" --headless --nodefault --nofirststartwizard --nolockcheck --nologo --norestore &

The "&" it is not a typo... is for multitasking the server to be ready to another request.

That's all... Thank you for your feedback. David