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

Create a new ##id## tag to use in Database activity templates

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-75146-master
    • Hide

      Covered by automatic test.

      Extra manual test

      1. Create a database activity with some fields (you can use the image gallery preset)
      2. Access the templated tab, go the the "list template" and add "##id##" in the "Repeated entry" editor and save it.
      3. Add some entry to the database. Once the entry is saved and the page displayed is the single entry view with the new entry, note down the "rid" parameter that appears in the URL.
      4. Go to the "list view" 
      5. Check the ##id## tag has been replaced by the entry id (it is the "rid" param from step 3)
      Show
      Covered by automatic test. Extra manual test Create a database activity with some fields (you can use the image gallery preset) Access the templated tab, go the the "list template" and add "##id##" in the "Repeated entry" editor and save it. Add some entry to the database. Once the entry is saved and the page displayed is the single entry view with the new entry, note down the "rid" parameter that appears in the URL. Go to the "list view"  Check the ##id## tag has been replaced by the entry id (it is the "rid" param from step 3)
    • 1
    • HQ Sprint 0.1 Database

      As a teacher
      I want to identify an element by a unique id on a Database template
      so I can apply styling and behavior to the element

      For some of the new templates defined on the Database project prototype we need some elements to be collapsable. To implement this accordion behavior in an easy way, we need to identify the elements by the id.

      A new ##id## tag will be added to templates so the users and the new presets could use to implement the behavior they need.

       

      Prototype: https://www.figma.com/proto/vmspDJsBAYrPfECMrgpGEd/4.1-Database?page-id=0%3A1&node-id=288%3A105628&viewport=90%2C15691%2C0.25&scaling=scale-down&starting-point-node-id=288%3A105628&show-proto-sidebar=1

       

      This issue is part of the Moodle 4.1 database module project. All the related code to this issue that does not follow the current coding style or present maintenance problems will be refactored. In this case, the refactored areas are focused in 3 main areas:

      • Create a generic mod_data\manager class for the mod_data (similar to the one used in mod_h5pactivity)
      • Refactor the template editor to use output classes and mustache files (the functionality will remain the same)
      • Refactor the print entry parser into its own class mod_data\template and use it instead of the current global function

            tusefomal Ferran Recio
            amaia Amaia Anabitarte
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ilya Tregubov Ilya Tregubov
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 1 day, 55 minutes
                1w 1d 55m

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