Closed eynimeni closed 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:
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()
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?
Edit a single option (by an icon with the link)
@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.
@eynimeni On 2. Same issue with customfields:
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?
There is a screen rec to depict above issue https://screenrec.com/share/E6CAIiYNw1
We integrated a new feature to treat multiple bookinactions simultanously: bulkoperations To execute the operations and tests, the following steps apply:
[x] 1) Integrate the list of bookingoptions via shortcode "[bulkoperations]"
[x] 2) Make sure a list with all bookingoptions is displayed. Default columns are: ID, Title, Edit.
[x] 3) Try to add predefined custom fields as table columns. With shortcode argument customfields=shortname1,shortname2 -> [bulkoperations customfields=field1,field2] these fields and values should be displayed, given they are defined in the .../mod/booking/customfield.php settings. Make sure to use the shortname as argument! Columnname displayed should be fullname of field.
[x] 4) Try sorting, filter and searching of table -> I just saw that these functions need to be fixed for customfields. I will do so when I find the time!
[x] 5) Test Pagination etc.
[x] 6) Test Edit Link, should lead to Settings of the bookingoption of this line
[x] 7) Test Button "Edit Bookingoptions": Select multiple bookingoptions via checkboxes, Press Button, Choose Field in List, Button "Load a template rule", Enter values, make sure, values are applied in all of the selected bookingoptions. Please check for several of these fields: "Still available", "Price", "Invisible", "Cancelling is only possible...", "Disable cancellation of this booking option".
[x] 8) Test Button "Edit Send mail to teacher(s)": Select multiple bookingoptions via checkboxes, enter (formated) text into the fields, click on "Send"-Button, make sure, e-mails are send to all teachers of all selected courses.