Issue Details (XML | Word | Printable)

Key: MDL-15670
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Andrei Bautu
Votes: 0
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-15635

Database export/import library

Created: 16/Jul/08 05:01 PM   Updated: 29/Aug/08 05:32 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File 200807301445-lib.php.patch (6 kB)
2. Text File 200807311040-dbtransfer.patch (29 kB)
3. Text File 200808150940-import_record_fix.patch (0.9 kB)


Participants: Andrei Bautu, Penny Leach and Petr Skoda
Security Level: None
Resolved date: 29/Aug/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Create code to export database data to XML file and import XML data into existing database

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Penny Leach added a comment - 30/Jul/08 06:08 PM
I know that xmldb classes use camel case, but coding guidelines specify lower case and underscores, even for classes and their methods:

http://docs.moodle.org/en/Development:Coding#Coding_style


Andrei Bautu added a comment - 30/Jul/08 07:23 PM
Ok. I've switched to C-style namings (aka ugly, old and longer naming )

Penny Leach added a comment - 31/Jul/08 01:14 AM
looking pretty good - there's still DatabaseImporter in camel case but other than that it seems ok style wise.

import_table calls export functions - maybe a copy/paste error? it looks like the import side of things is less finished than the export classes.


Andrei Bautu added a comment - 15/Aug/08 02:42 PM
Fix wrong variable names in import_record.

Petr Skoda added a comment - 29/Aug/08 04:39 AM
merging in progress...

Petr Skoda added a comment - 29/Aug/08 05:28 AM
  • found one minor problem - the $CFG->version is not always int, could be float too
  • adding support for creation of tables if no tables present yet
  • moved the files around a bit - I suppose they might be moved around a bit more
  • made the function params more strict
  • tweaked whitespace and comments a bit

Big thanks, this is great!

committing into cvs