Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75234

Use default templates in mod_data if the templates are not created.

    XMLWordPrintable

Details

    • 2
    • HQ Sprint 0.3 Database

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              tusefomal Ferran Recio
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Amaia Anabitarte Amaia Anabitarte
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 3 days, 1 hour, 35 minutes
                  1w 3d 1h 35m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.