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

Warning: count(): Parameter must be an array or an object that implements Countable in mod/lesson/import_form.php on line 72

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.7
    • 3.6.5, 3.7.1
    • Lesson
    • MOODLE_37_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-65605-master
    • Hide

      PHP 7.2 is required.

      Lesson:

      1. Log in as admin and create a course (or use an existing course)
      2. Go into the course and turn the editing mode on, and then add a lesson activity to the course (just enter a name and leave other fields to their default values)
      3. Go to the lesson activity and click on the "Import questions" link
      4. Click on the "Import" button without uploading any file
      5. Verify that you see a form validation message saying the file field is required
      6. Verify that no error is displayed on the page

      Question:

      1. Log in as admin and create a course (or use an existing course)
      2. Go into the course. Then click on the cog icon and then follow "More... > Question bank > Import"
      3. Click on the "Import" button without uploading any file
      4. Verify that you see a form validation message saying the file field is required
      5. Verify that no error is displayed on the page
      Show
      PHP 7.2 is required. Lesson: Log in as admin and create a course (or use an existing course) Go into the course and turn the editing mode on, and then add a lesson activity to the course (just enter a name and leave other fields to their default values) Go to the lesson activity and click on the "Import questions" link Click on the "Import" button without uploading any file Verify that you see a form validation message saying the file field is required Verify that no error is displayed on the page Question: Log in as admin and create a course (or use an existing course) Go into the course. Then click on the cog icon and then follow "More... > Question bank > Import" Click on the "Import" button without uploading any file Verify that you see a form validation message saying the file field is required Verify that no error is displayed on the page

    Description

      1. Given I am logged in as a teacher
      2. And I am viewing a lesson
      3. And I click "Import questions"
      4. When I click "Import" without uploading a file first
      5. Then I should be told to add a file

      Actual:

      Warning: count(): Parameter must be an array or an object that implements Countable in /Users/nicols/Sites/moodles/sm/moodle/mod/lesson/import_form.php on line 72
      

      And no meaningful error.

      Attachments

        Activity

          People

            rezaie9 Shamim Rezaie
            dobedobedoh Andrew Lyons
            Peter Dias Peter Dias
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Anna Carissa Sadia Anna Carissa Sadia
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8/Jul/19

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m