-
Improvement
-
Resolution: Fixed
-
Minor
-
4.1
-
MOODLE_401_STABLE
-
MOODLE_401_STABLE
-
MDL-75234-master -
-
2
-
HQ Sprint 0.3 Database
The current database activity requires the user to create the templates or, at least, access the templates tab (which will create them without the user's knowledge). This restriction is completely unnecessary as the activity is capable of generating default templates in real-time if the stored template is null.
It is especially important in the add entry form because the default template is generated and stored in the database without asking the user and, if the user creates a new field, it will be appended at the end of the template, no matter what content the template has.
The template generator is the data_generate_default_template function and has one param called $update to decide if the template is stored in the DB or not.
This issue includes:
- Review all uses of data_generate_default_template with $update=true (the default value) and remove it from the code except the places when the user explicitly saves a template.
- Check whenever an entry is printed (even the add entry form) and validate that the $manager->get_template is used (that method returns the default template is there is none in the database).
- Remove any error or alert displayed when the user does not have the templates stored in the DB. Tey won't be necessary anymore now they will be auto-generated in real time (until the user defines its own or apply a preset).
- blocks
-
MDL-75410 Reset all templates in one go
- Closed
-
MDL-75498 Add ##otherfields##, [[FIELD#name]] and [[FIELD#description]] tags to the database templates
- Closed
- caused a regression
-
MDL-76811 Generator unit tests for mod_data generator wrong
- Closed
- has a non-specific relationship to
-
MDL-75276 Update default layouts for the new database templates
- Closed