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

Importing entries into a database activity generates php warnings

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Pre-requisites

      • Debugging should be set to "Developer" level.

      Testing: Import of csv file.

      1. Create a database activity.
      2. Create two fields: A URL and a text area.
      3. Create a csv file with contents similar to what is mentioned in the description.
      4. Import the file [Settings ► Database activity administration ► Import entries].
        Check that no php warnings are generated when importing the file.

      Testing: URL form aesthetics.

      1. Click the 'Add entry' tab.
        Observe that the 'Choose a link...' button is next to the URL field.
      2. Click the 'Fields' tab and edit the url field type.
      3. Check 'Autolink the URL'.
      4. Click the 'Add entry' tab.
        Observe that the 'Choose a link...' button is next to the URL field.
      Show
      Pre-requisites Debugging should be set to "Developer" level. Testing: Import of csv file. Create a database activity. Create two fields: A URL and a text area. Create a csv file with contents similar to what is mentioned in the description. Import the file [Settings ► Database activity administration ► Import entries] . Check that no php warnings are generated when importing the file. Testing: URL form aesthetics. Click the 'Add entry' tab. Observe that the 'Choose a link...' button is next to the URL field. Click the 'Fields' tab and edit the url field type. Check 'Autolink the URL'. Click the 'Add entry' tab. Observe that the 'Choose a link...' button is next to the URL field.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-36112-master

      Description

      Here is the contents of my csv file. It imports successfully but I get the following php warnings. My database activity contains a URL and a text area field.

      myblog, about me
      http://bob.com,I am bob. Fear me.
      http://joe.com, I am joe. I like Joe. Joe good.
      http://blamo.com,blamo i am.
       
       

      Notice: Undefined offset: 1 in /home/andrew/Desktop/code/moodle/int/master/mod/data/import.php on line 162 Added 1. Entry (ID 1)
      Notice: Undefined offset: 1 in /home/andrew/Desktop/code/moodle/int/master/mod/data/import.php on line 162 Added 2. Entry (ID 2)
      Notice: Undefined offset: 1 in /home/andrew/Desktop/code/moodle/int/master/mod/data/import.php on line 162 Added 3. Entry (ID 3)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abgreeve Adrian Greeve
              Reporter:
              andyjdavis Andrew Davis
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Dec/12