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

Exception when missing checkbox field in db activity template

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-79604-403
    • MDL-79604-master
    • Easy
    • Hide

      Setup

      1. Login as administrator
      2. Create a course
      3. Create a new database activity
      4. In this db activity create two Fields e.g Name of type Shorttext and List of type Checkbox with multiple options. Set both fields to be Required field.
      5. Edit the Template and remove everything except the name field. You should have something like e.g.:

        Enter your name: [[Name]]

      Test

      1. Go to Database tab and click on Add entry
      2. Only the Name field with the input text field should appear. Enter a value and press Add
      3. Confirm that no exception appears
      Show
      Setup Login as administrator Create a course Create a new database activity In this db activity create two Fields e.g Name of type Shorttext and List of type Checkbox with multiple options. Set both fields to be Required field . Edit the Template and remove everything except the name field. You should have something like e.g.: Enter your name: [[Name]] Test Go to Database tab and click on Add entry Only the Name field with the input text field should appear. Enter a value and press Add Confirm that no exception appears

      If a database with at least one checkbox field is created and later this checkbox field is ommitted in the template, an exception is thrown.

      Instead of an exception an error message should show up or nothing should happen at all.

       Steps to reproduce:

      1. Create a new database activity
      2. In this db activity create two fields e.g Name of type Shorttext and List of type Checkbox. Set both fields to be mandatory.
      3. Edit the template and remove everything except the name field. You should have something like e.g.:
        Enter your name: [[Name]]
      4. Go to the page where you may enter a new dataset. Only the Name field with the input text field should appear. Enter a value and press Add

      Expected output: No exception should appear. It can be disussed whether an error message (mandatory field X was not set) may appear.

      What actually happes: An exeption appears.

            strobotta Stephan Robotta
            strobotta Stephan Robotta
            Mikel Martín Corrales Mikel Martín Corrales
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 50 minutes
                3h 50m

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