Note: You are currently viewing documentation for Moodle 3.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Database activity import.

Database activity import: Difference between revisions

From MoodleDocs
No edit summary
(redirected to Building Database)
 
Line 1: Line 1:
{{Database}}
#redirect [[Building_Database]]
<p class="note">'''Please refer to [[TOC_with_notes#Database|these notes]] before editing this page.'''</p>
 
Location: ''Settings > Database activity administration > Import''
 
 
Database activity entries may be imported by uploading a text file. The easiest way to determine the format of the text file is to manually add an entry to the database and then export it. The resulting export text file may then be edited and used for importing entries.
 
CSV means Comma-Separated-Values and is a common format for text interchange.
 
The expected file format is a plain text file with a list of field names as the first record. The data then follows, one record per line.
 
The field delimiter defaults to a comma character and the field enclosure is not set by default (field enclosures are characters that surround each field in each record).
 
Records should be delimited by new lines (usually generated by pressing RETURN or ENTER in your text editor). Tabs can be specified using \t and newlines by \n.
 
Sample file:
 
  name,height,weight
  Kai,180cm,80kg
  Kim,170cm,60kg
  Koo,190cm,20kg
 
Warning: all field types may not be supported.
 
==See also==
 
* [[Database export]]

Latest revision as of 20:05, 27 September 2011

Redirect to: