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

JSON data format export missing column names

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0
    • 3.10.4
    • Libraries
    • MOODLE_310_STABLE
    • MOODLE_400_STABLE
    • Hide

      Exporting from table

      1. Login as admin
      2. Navigate to Reports > Logs in site administration
      3. Change All days dropdown to Today, <date> and press Get these logs
      4. Set Download table data as to Javascript Object Notation (.json) and press Download
      5. Open downloaded file in a text editor
      6. Confirm that the exported JSON contains an array of objects as such (where each object property matches the corresponding column from the table):

        [[{
            "time": "19\/05\/21, 14:46",
            "userfullname": "Admin User",
            "affecteduser": "-",
            "eventcontext": "Front page",
            "component": "Logs",
            "eventname": "Log report viewed",
            "description": "The user with id '2' viewed the log report for the course with id '1'.",
            "origin": "web",
            "ipaddress": "172.20.0.1"
        },{
            ...
        },
        

      Exporting forum posts

      1. Create a new course
      2. Navigate to Announcement forum
      3. Add a new topic
      4. Open the Actions menu and press Export
      5. Set Format to Javascript Object Notation (.json) and press Export
      6. Open downloaded file in a text editor
      7. Confirm that the exported JSON contains an array of objects as such:

        [[{
            "id": 1,
            "discussion": 1,
            "parent": 0,
            "userid": 2,
            "userfullname": "Admin User",
            "created": 1621431779,
            "modified": 1621431779,
            "mailed": 0,
            "subject": "ASF",
            "message": "<p dir=\"ltr\" style=\"text-align:left;\">ASdaf<br \/><\/p>",
            "messageformat": 1,
            "messagetrust": 0,
            "attachment": 0,
            "totalscore": 0,
            "mailnow": 0,
            "deleted": 0,
            "privatereplyto": 0,
            "privatereplytofullname": null,
            "wordcount": 1,
            "charcount": 5
        }]]
        

      Show
      Exporting from table Login as admin Navigate to Reports > Logs in site administration Change All days dropdown to Today, <date> and press Get these logs Set Download table data as to Javascript Object Notation (.json) and press Download Open downloaded file in a text editor Confirm that the exported JSON contains an array of objects as such (where each object property matches the corresponding column from the table): [[{ "time": "19\/05\/21, 14:46", "userfullname": "Admin User", "affecteduser": "-", "eventcontext": "Front page", "component": "Logs", "eventname": "Log report viewed", "description": "The user with id '2' viewed the log report for the course with id '1'.", "origin": "web", "ipaddress": "172.20.0.1" },{ ... }, Exporting forum posts Create a new course Navigate to Announcement forum Add a new topic Open the Actions menu and press Export Set Format to Javascript Object Notation (.json) and press Export Open downloaded file in a text editor Confirm that the exported JSON contains an array of objects as such: [[{ "id": 1, "discussion": 1, "parent": 0, "userid": 2, "userfullname": "Admin User", "created": 1621431779, "modified": 1621431779, "mailed": 0, "subject": "ASF", "message": "<p dir=\"ltr\" style=\"text-align:left;\">ASdaf<br \/><\/p>", "messageformat": 1, "messagetrust": 0, "attachment": 0, "totalscore": 0, "mailnow": 0, "deleted": 0, "privatereplyto": 0, "privatereplytofullname": null, "wordcount": 1, "charcount": 5 }]]

      When using the Javascript Object Notation (.json) data format export, the record columns are usually omitted from the file, making it difficult to know the context of each row and/or use it in another system

        1. MDL-71685_Export from table.png
          66 kB
          Angelia Dela Cruz
        2. MDL-71685_Export from forum.png
          45 kB
          Angelia Dela Cruz

            pholden Paul Holden
            pholden Paul Holden
            Amaia Anabitarte Amaia Anabitarte
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 35 minutes
                1h 35m

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