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

A generic templates structure that will allow for designing more than one list/single view in the same activity

    Details

    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Currently there are 5 distinct view templates (list, single, asearch, add, rss) however users may want to omit some of these templates (e.g. omit single or asearch) or have more than one view of a certain type (e.g. two types of list). The current templates approach makes this practically impossible for the average user.

      Suggested improvement:

      A generic templates structure which will allow the user to determine and design the activity's available views according to one's own preferences. So, for instance, one may want to offer students to select from 3 different list views and omit the single and search views. The template placeholders may be defaulted to the list, single, search etc. but the single and search could be override and redefined as lists. Views could be switch to by a dropdown list in the main view tab.

      Template Settings:

      • View mode: yes/no
      • Edit mode: yes/no
      • Max entries per page: n
      • Search: yes/no
      • RSS: yes/no
      • RSS title: string
      • Name: string
      • Entry template: string
      • List header template: string
      • List footer template: string

      View mode - determines whether the view can be displayed in view (non-edit) mode. An advanced option could limit to certain roles. With this option set to 'no' the template won't be available in view mode (and if edit mode is set to 'no' the template won't be available at all. Possible scenario: I design a list view for students which displays the entries without a delete option and another list view for myself with the delete option. The latter is set disable view mode (and disable edit mode) so that students cannot use it. If I want to delete certain entries I can switch to templates, enable the view mode of this list view, view the list and delete the entries and then deactivate the view mode.

      Edit mode - determines whether the view can be displayed in edit mode. The main motivation here is to allow quick editing of many records in a list view. Another motivation is using only one template for adding/editing/viewing of a single entry which is what an average user who works simply with default templates will need anyway.

      The other options are self explanatory.

      The current templates could be mapped to the proposed scheme in the following way.

      List view template:

      • View mode: yes
      • Edit mode: no
      • Max entries per page:
      • Advanced Search: no
      • RSS: no
      • Name: 'List view'
      • Entry template: '...'
      • List header template: ''
      • List footer template: ''

      Single view template:

      • View mode: yes
      • Edit mode: no
      • Max entries per page: 1
      • Advanced Search: no
      • RSS: no
      • Name: 'Single view'
      • Entry template: '...'
      • List header template: null
      • List footer template: null

      Add entry view template:

      • View mode: no
      • Edit mode: yes
      • Max entries per page: 1
      • Advanced Search: no
      • RSS: no
      • Name: 'Add/Edit entry'
      • Entry template: '...'
      • List header template: null
      • List footer template: null

      And so on.

      Comments are welcome.

        Gliffy Diagrams

          Attachments

          1. dataform.zip
            170 kB
          2. dataform-2011070800.zip
            141 kB
          3. dataform-2011070900.zip
            141 kB
          4. dataform-fields-calculated.png
            dataform-fields-calculated.png
            24 kB
          5. dataform-filter-form.png
            dataform-filter-form.png
            17 kB
          6. dataform-filters-search-operators.png
            dataform-filters-search-operators.png
            18 kB
          7. dataform-M2.png
            dataform-M2.png
            57 kB
          8. dataform-presets-ui.png
            dataform-presets-ui.png
            24 kB
          9. dataform-ratings-entry.png
            dataform-ratings-entry.png
            39 kB
          10. df-block.png
            df-block.png
            18 kB
          11. df-groups-separateparticipants.png
            df-groups-separateparticipants.png
            28 kB
          12. df-view-charts1.png
            df-view-charts1.png
            43 kB
          13. df-view-charts2.png
            df-view-charts2.png
            48 kB
          14. df-view-slideshow.png
            df-view-slideshow.png
            292 kB

            Issue Links

              Activity

                People

                • Votes:
                  9 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated: