Posts made by Joseph Rézeau

Picture of Développeurs Picture of Développeurs de plugins Picture of Testeurs Picture of Traducteurs

Bonjour,

Il faudrait préciser ton rôle dans ce cours : enseignant, créateur de ce contenu H5P, etc

Si tu as les droits d'édition (enseignant ) dans ce cours, il faut faire la manipulation suivante :

  • cliquer sur l'activité H5P que tu veux télécharger
  • onglet Paramètress
  • Modification Contenu interactif

  • Afficher les options

  • Sauvegarder

Sous l'activité H5P, en bas à gauche tu vois un lien cliquable

Tu écris "les activités de ce H5P n'apparaissent pas dans la banque de contenus" C'est normal, les activité créées avec le plugin H5P (icône noire) n'ont rien à voir avec la banque de contenus, qui contient les activités créées avec l'activité H5P propre à Moodle (icône bleue).

Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Marcus,

That finally worked! Here are the details... for a Windows 11 user.

0.- On your Windows box at the root (or anywhere else) create a new directory which will be used by Chromium to store data (to avoid the error message "Google Chrome cannot read and write to its data directory:") Call it, e.g. c:\moodleapp

  1. After installing Chromium-Canary, go to the Google Chrome Canary shortcut on your Windows desktop and right-click Properties.
  2. In the Target field, it says "C:\Users\josep\AppData\Local\Google\Chrome SxS\Application\chrome.exe". Of course user will be a different name from "josep".
  3. Immediately after "C:\Users\josep\AppData\Local\Google\Chrome SxS\Application\chrome.exe", enter a space and this: --allow-file-access-from-files --disable-web-security --user-data-dir=c:\moodapp -allow-running-insecure-content master.apps.moodledemo.net
  4. Done! Now when you click that Google Chrome Canary shortcut on your Windows desktop you are taken to Moodle App demo where you can enter your Moodle site URL, then log in, etc.
  5. When Chrome Canary is launched you will see this warning "

    You are using an unsupported command-line flag: —disable-web-security. Stability and security will suffer." Disregard it. The very first time you launch it the Moodle App Demo site will take some time to appear, this is because Chrome is writing a number of files in your user-data-dir=c:\moodapp as defined previously. The following connections will be much faster.

Can someone update the doc at https://moodledev.io/general/app/development/setup/app-in-browser to make it more current?

Average of ratings: Useful (2)
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Hello Lujis,

I understand that you are experiencing performance issues during course import or copying in Moodle, specifically related to the execution of an SQL query that deletes orphaned `lesson_branch` records. You have shared the code snippet responsible for this process from the `restore_lesson_stepslib.php` file.

To address your concern, you are considering removing the SQL query and instead planning to execute it on a nightly basis to avoid any problems with orphaned `lesson_branch` records. Before proceeding with such a modification, it's essential to thoroughly evaluate the potential impact and explore possible improvements to the SQL query.

Upon reviewing the code snippet you shared, it appears that the query is designed to delete orphaned `lesson_branch` records by joining the `lesson_branch` and `lesson_pages` tables. This query checks for records in `lesson_branch` where the corresponding `pageid` does not exist in `lesson_pages`.

To improve the performance of this query, you can consider the following suggestions:

1. Indexing: Ensure that appropriate indexes are present on the relevant columns (`pageid` in `lesson_branch` and `id` in `lesson_pages`). Indexing can significantly improve the performance of join operations.

2. Query Optimization: Depending on your database engine, you can analyze the query execution plan and identify any areas that can be optimized. Tools like EXPLAIN (in MySQL) or equivalent features in other database systems can provide insights into query execution.

3. Batch Processing: Instead of running the query for each individual record, you can explore batching the deletion process. By deleting orphaned `lesson_branch` records in smaller chunks or batches, you can potentially reduce the impact on performance.

4. Data Cleanup Strategy: If you still face performance issues even after optimizing the query, you can consider alternative data cleanup strategies. For example, you could schedule periodic cleanup tasks during low-traffic periods to manage orphaned records more efficiently.

However, please exercise caution when modifying code in the Moodle core. Making changes without a thorough understanding of the implications can lead to unforeseen issues or compatibility problems with future Moodle updates.

I would recommend reaching out to the Moodle community or forum for further assistance. Developers and experienced Moodle users can provide more specific insights and advice based on their expertise and knowledge of the Moodle codebase.

Best regards,

Chat GPT