gjbarnard / moodle-format_grid

Grid course format contributed by Gareth J Barnard originally created by Paul Krix
GNU General Public License v3.0
21 stars 56 forks source link

Import quiz error + Number of topics reduced to 1 #203

Closed giselebrugger closed 1 week ago

giselebrugger commented 8 months ago

Describe the bug When the "import" or "backup + restore" feature is used in Grid format courses, if there are any quizzes, they are not imported, and the number of course topics is changed to 1.

Moodle: [4.3.2 (Build: 20231222) Grid: 403.1.2 - 2023101502

https://github.com/gjbarnard/moodle-format_grid/assets/5620195/78146623-e8b6-4014-8c0a-9fda5beab03a

gjb2048 commented 8 months ago

Can't replicate:

https://github.com/gjbarnard/moodle-format_grid/assets/1058419/3a506212-a81d-4ceb-9f99-9347bd6b369b

giselebrugger commented 8 months ago

Hello Gareth Other case with Moodle: Moodle 4.3.2+ (Build: 20240112) Theme: boost_union Grid: 403.1.1 - 2023101501

https://github.com/gjbarnard/moodle-format_grid/assets/5620195/d368bc8c-6453-4c9a-a1b6-bf83b6ea5b5a The first test was done with the Moove theme, and the second one with the Boost Union theme.

https://github.com/gjbarnard/moodle-format_grid/assets/5620195/0be3fdcd-77db-4106-9c13-30bdd98bf26e

But if I change the format of the destination course to topics, the importation occurs as expected.

https://github.com/gjbarnard/moodle-format_grid/assets/5620195/280a85f7-0071-4c7c-a3f7-626b74224f03

Do you have any idea what could be causing this error? To expedite matters for the teachers, I installed the Sharing Cart block, and they are able to import from one course to another.

Thank you for your time in testing this case.

gjb2048 commented 8 months ago

Dear @giselebrugger,

Theme won't matter in this case and as you can see, I do Grid to Grid and can't replicate.

Gareth

gjb2048 commented 8 months ago

And previously you stated 403.1.2 (in development) and now 403.1.1 and yet there isn't anything different between the two that would 'fix' this if it occurred.

giselebrugger commented 8 months ago

Hello Gareth There are two different moodles. Moodle grenn (Ciencias Médicas) with Moodle: [4.3.2 (Build: 20231222) and Grid: 403.1.2 - 2023101502 and Moodle Itaca with Moodle: 4.3.2+ (Build: 20240112)] -theme: boost_union -Grid: 403.1.1 - 2023101501

I did one more test. If I import the entire course without selecting just a few items, the import happens as expected from grid to grid without changing the number of topics to 1.

Could you confirm the type of question in your quiz? my course contains only multiple choice questions in one of the quizzes (Medical Sciences - green moodle) in the other moodle (Itaca) it has different types of questions

gjb2048 commented 8 months ago

I just had one true/false question, but that won't make a difference. As stated, I can't replicate when performing a partial import with just the quiz in the section.

gjb2048 commented 8 months ago

Also @giselebrugger are there any errors in the PHP error log?

giselebrugger commented 8 months ago

Hello @gjb2048 no error Teste-GRID-Import-AVA-CMMG

But when there is any quiz in the import it resets the number of topics to 1 and the quiz does not matter. This is intriguing. :(

gjb2048 commented 8 months ago

The quiz is a Red Herring, because I can't replicate with a quiz so it must be something else. Was there anything in the PHP log file?

giselebrugger commented 8 months ago

Some more tests done. 1- when I import the entire course, there are no errors and everything is imported (including the quiz)

2- when I select just a few items to import and if there is a quiz among them, all resources and activities are imported except the quiz and the number of topics is changed to 1.

see course modules before import grid_antes_importar_quiz

In this situation I found the following error in the Apache log [Sun Mar 17 21:51:14.570995 2024] [php:notice] [pid 429076] [client 186.233.35.129:6636] Section not fully restored: id 27594, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 21:51:14.581050 2024] [php:notice] [pid 429076] [client 186.233.35.129:6636] Module not fully restored: id 38038, referer: https://ava.cmmg.edu.br/backup/import.php

course sections after import (only 2 sections e no more 10 ) moodlecourse_sectionsafter

after_import

the session 27594 was not created and module 38038 (quiz) exist section_not_exist

If i access mymoodle/mod/quiz/view.php?id=38038 error

This is becoming a mystery :)

gjb2048 commented 8 months ago

No idea!

gjb2048 commented 8 months ago

Turn on developer level debugging, try again and see what errors occur - even in the log.

gjb2048 commented 8 months ago

Screenshot 2024-03-17 231636

giselebrugger commented 8 months ago

with debug mode developer and course empty

https://github.com/gjbarnard/moodle-format_grid/assets/5620195/cb9462e6-9207-4bb7-9aa0-e8cf8f586df7

LOG apache [Sun Mar 17 23:23:51.079378 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] instantiating backup controller 21021ecdd24095cf528befcb325acb6b, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.087631 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] setting controller status to 100, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.095097 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] loading controller plan, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.187334 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] setting controller status to 300, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.194469 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] applying plan defaults, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.203451 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] setting controller status to 400, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.212183 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] setting file inclusion to , referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.218941 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.226899 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] setting controller status to 500, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.236536 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.244101 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.251618 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.260966 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:51.267767 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] calculating controller checksum 219b763f1fd2cfeefde34c9a4106ff72, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:53.999442 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:54.007365 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:54.017783 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:54.025216 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:54.032512 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:23:54.039520 2024] [php:notice] [pid 456473] [client 186.233.35.129:6727] calculating controller checksum 219b763f1fd2cfeefde34c9a4106ff72, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.398383 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.407968 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.423323 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.431561 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.441218 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:02.465075 2024] [php:notice] [pid 457110] [client 186.233.35.129:6586] calculating controller checksum c15b10f14fe5e000fc08fb56ebfedeef, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.016061 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.025195 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.043332 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.159233 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 700, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.167224 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.174177 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum 2145d80fa8f3fb2da7ea0163c065b32c, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.211023 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.222764 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 800, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.231673 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.239212 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum 28c51df226f2384ee2145ca3f3a8514c, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.268663 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.365478 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] section skipped by _included setting, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.373041 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Avisos, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.380549 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] section skipped by _included setting Sa\xc3\xbade p\xc3\xbablica, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.389738 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Question\xc3\xa1rio - Professora Roberta Viegas Magalh\xc3\xa3es, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.396368 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula inaugural, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.405060 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Sistemas de sa\xc3\xbade no mundo, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.415756 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Legisla\xc3\xa7\xc3\xa3o do SUS, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.424456 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Organiza\xc3\xa7\xc3\xa3o Institucional do SUS, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.434262 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Redes de aten\xc3\xa7\xc3\xa3o em sa\xc3\xbade, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.444213 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] section skipped by _included setting Sistema de Sa\xc3\xbade Privado (SSP) - Prof. Andr\xc3\xa9 Couto e Gama, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.454001 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 01 - Apresenta\xc3\xa7\xc3\xa3o da Disciplina, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.463489 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 02 - Sa\xc3\xbade e efeitos sobre a Gest\xc3\xa3o4, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.470523 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - Aula 02 - Redes de Aten\xc3\xa7\xc3\xa3o \xc3\xa0 Sa\xc3\xbade - Eug\xc3\xaanio_2ed-1, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.477774 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - 8a Conferencia Nacional de Sa\xc3\xbade - Relatorio final, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.485488 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 03 - Gest\xc3\xa3o e efeitos sobre a Sa\xc3\xbade, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.494475 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - Aula 03 - clinical-governance - The more I know, the less I sleep, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.502240 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - Aula 03 - Princ\xc3\xadpios para a gest\xc3\xa3o da cl\xc3\xadnica IMPORTANTE, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.509009 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 04 - Sa\xc3\xbade Suplementar e Per\xc3\xadodo n\xc3\xa3o Regulado, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.517684 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 05 - SSP e Assist\xc3\xaancia Suplementar, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.537811 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - OECD Health Statistics 2021, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.545157 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - Private Health Insurance in OECD Countries - Benefits and costs, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.552533 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Paper - IMPORTANTE - private-health-insurance, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:07.559732 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] activity skipped by _included setting Aula 06 - SSP - Segmenta\xc3\xa7\xc3\xa3o e Rol - Da Cobertura Assistencial, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.414751 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 1000, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.422917 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.445922 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] instantiating restore controller 0575f6f8c9ad8d96d7be150767b899ff, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.456618 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 100, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.464204 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading backup info, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.472258 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller plan, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.485156 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 300, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.492153 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] applying restore defaults, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.499695 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Unknown setting: questionbank, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.508915 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 400, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.516312 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] checking plan security, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.523335 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 500, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.533222 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 600, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.542179 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.549721 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum 350f0fdf61fac011eeae6a45d83c0c87, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.577169 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.666568 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 700, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.673732 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.680853 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum ca5c4ae07c6b946ee97b9583275a9c91, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.699995 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.709082 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 800, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.719605 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.728651 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum f4dd9de214e1fb7aa15024b3f7f4b191, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.751863 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:16.937454 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Section not fully restored: id 27605, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:16.946552 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Module not fully restored: id 38040, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.039706 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] processing file aliases queue. 0 entries., referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.072894 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 1000, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.082097 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php

see this: [Sun Mar 17 23:24:08.499695 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Unknown setting: questionbank, referer: https://ava.cmmg.edu.br/backup/import.php

gjb2048 commented 8 months ago

In that case no idea, and looks like it's not related to the Grid code.

giselebrugger commented 8 months ago

I took another test. 1- I created a course 2- I configured it with the course format: Topics 3- I only imported the session that contained 01 quiz (in the same way as the last video) 4- I compared the apache logs

TOPICS: [Sun Mar 17 23:53:55.421974 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:55.430599 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] setting controller status to 800, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:55.437598 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:55.448395 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] calculating controller checksum 24de54d603fabf81c17cc655951e6f0c, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:55.470193 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:56.183857 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] processing file aliases queue. 0 entries., referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:56.225959 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] setting controller status to 1000, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:53:56.235098 2024] [php:notice] [pid 466273] [client 186.233.35.129:6064] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php

GRID [Sun Mar 17 23:24:08.699995 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.709082 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 800, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.719605 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.728651 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] calculating controller checksum f4dd9de214e1fb7aa15024b3f7f4b191, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:08.751863 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] loading controller from db, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:16.937454 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Section not fully restored: id 27605, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:16.946552 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] Module not fully restored: id 38040, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.039706 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] processing file aliases queue. 0 entries., referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.072894 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] setting controller status to 1000, referer: https://ava.cmmg.edu.br/backup/import.php [Sun Mar 17 23:24:17.082097 2024] [php:notice] [pid 456918] [client 186.233.35.129:6617] saving controller to db, referer: https://ava.cmmg.edu.br/backup/import.php

when is GRID have 2 more lines

Section not fully restored: id 27605, referer: https://ava.cmmg.edu.br/backup/import.php Module not fully restored: id 38040, referer: https://ava.cmmg.edu.br/backup/import.php

gjb2048 commented 8 months ago

Ok, still stumped. Only thing I can think of is to have a copy of the course with the issue (mbz file without users) and see if I can replicate locally. If so then look at attaching the debugger and attempting to deduce what is going on.

giselebrugger commented 8 months ago

Hello @gjb2048 I have made a copy of the course available here: https://ginux.online/tmp/backup-moodle2-course-3722-1111111-11091111-5618-80m76s6d24.189315-20240318-1307-nu.mbz When you upload it, could you let me know so I can delete it? Thank you for taking the time to do these tests. :)

gjb2048 commented 8 months ago

@giselebrugger Thanks, done, and can replicate - odd.

gjb2048 commented 8 months ago

@giselebrugger Try removing this line https://github.com/gjbarnard/moodle-format_grid/blob/main/backup/moodle2/restore_format_grid_plugin.class.php#L190 and see if it fixes it for you.

giselebrugger commented 8 months ago

@gjb2048 YESSSSSSSSSSSSSSSSSSSSSSSSS the topic was restored with 100% success without any errors and without reducing the number of topics to 1. You managed to kill the riddle. Thank you very much You managed to replicate the mistake with the course I sent?

gjb2048 commented 8 months ago

@giselebrugger I did manage to replicate, all a bit odd. The backup / restore code / logic is difficult!

anieminen commented 8 months ago

Hi,

Nice debugging! 👍

We have a similar problem with one course using Grid format. Some of the course sections can not be imported or restored to another course, although there are only a couple of file and URL resources. Also with backup&restore I could only copy 4 out of 7 sections on that course. There are the same "Section not fully restored" and "Module not fully restored" messages in Apache logs.

I tried removing the line from the code mentioned above, and that seemed to fix the problem. Actually I removed these two lines to make it also work with backup & restore to a new course.

So thank you both for this. I hope @gjb2048 can figure out an "official" fix too :)

gjb2048 commented 8 months ago

The snag is with the way that Moodle course creation works with CSV files, that the 'after course restore' code is not called only the section and thus I have to count the number of sections in order to make things work - at the moment.

gjb2048 commented 8 months ago

Ok, looks like this fix now breaks #189.

gjb2048 commented 8 months ago

For some odd reason, uploading a csv file that creates a new course (with a template course as reference) has backup::TARGET_CURRENT_ADDING (1) as the target!

gjb2048 commented 8 months ago

Dear @giselebrugger,

I've had to improve the solution so that it does not break CSV import, please test: https://github.com/gjbarnard/moodle-format_grid/commit/7504fed97afe2323272cc304e2bdfa093b432ded.

Thanks,

Gareth

giselebrugger commented 8 months ago

Hello @gjb2048 I did two tests: 1- importing only part of the content (including a quiz) 2- importing all course content In all 2 tests it worked correctly without any errors thank you very much

gjb2048 commented 8 months ago

Dear @giselebrugger

Thank you for taking the time to test. Appreciated.

Kind regards,

Gareth