Wunderbyte-GmbH / moodle-mod_booking

Moodle Booking Module
https://www.wunderbyte.at
21 stars 39 forks source link

Testing Bulkoperations #588

Closed eynimeni closed 2 months ago

eynimeni commented 2 months ago

We integrated a new feature to treat multiple bookinactions simultanously: bulkoperations To execute the operations and tests, the following steps apply:

semteacher commented 2 months ago

Upd: after few attempts - changes have been saved without error. Conditions when this error emerged are unclear. Might be related to state of the my dev's DB. Have tried to edit multiple option manually. Got this error: image

SELECT id,course FROM {course_modules} WHERE id = ?
[array (
  0 => 0,
)]
Error code: invalidcoursemodule
* line 1658 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1634 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 270 of /lib/classes/context/module.php: call to moodle_database->get_record()
* line 254 of /mod/booking/classes/option/fields_info.php: call to core\context\module::instance()
* line 214 of /mod/booking/classes/form/option_form_bulk.php: call to mod_booking\option\fields_info::set_data()
* line 75 of /lib/form/classes/external/dynamic_form.php: call to mod_booking\form\option_form_bulk->process_dynamic_submission()
* line ? of unknownfile: call to core_form\external\dynamic_form::execute()
* line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()
* line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()
eynimeni commented 2 months ago

sorry, I couldn't reproduce this error on my platform. tried a possible fix. can you checkout testing-bulk-operations branch and see if error still occurs?

semteacher commented 2 months ago

Edit a single option (by an icon with the link)

  1. The "Return to" param has been added and the code was refactored (see https://github.com/Wunderbyte-GmbH/moodle-mod_booking/commit/93e5c6eb71ce9aae43c88ce9011950da80d4e147)
  2. An issue emerged: the embedded list has not been updated after a single option had been edited (bulk update working OK): image image
eynimeni commented 2 months ago

@semteacher I took out the possibility to edit the title, it makes no sense to me I think. I briefly tested editing one option with another field, seems to work out fine. please let me know, if this solves the problems.

semteacher commented 2 months ago

@eynimeni On 2. Same issue with customfields: image image

Only values displayed existed before the "bulkoperation" table was created. Any updates are not being shown even on page reload. Could it be caused by cache issue?

semteacher commented 2 months ago

There is a screen rec to depict above issue https://screenrec.com/share/E6CAIiYNw1