Forums | Mahara Community

Developers /
insert file in mahara database


anonymous profile picture
Account deleted
Posts: 14

12 January 2012, 10:39

for my project i used mahara and i developed a popup to insert file from any application without have the requirement to navigate in mahara web. ( logon is made automatically with a smart card) .

i tryied to update sql database with my file modifying artefact.file.files table and in this my file record is equal to the normal record made uploading files from my profile . but file not appears in available files in any showing also if the new directory is created with teh right new number.

is there any other table to update that i not now t have it there.

princpal reason for this development is to integrate mahara in Interactive Boards editor software and use ut as  the learning enviroment i need in my class 

anonymous profile picture
Account deleted
Posts: 808

15 January 2012, 15:39

Hi Tommaso,

You need to check that you have the right matching record in the artefact table, and set the owner field correctly.

You may find it helpful to take a look at the page which takes uploaded files from the mobile phone app MaharaDroid.  You can find this in htdocs/artefact/file/mobileupload.php.  That page is designed to be used with MaharaDroid, but it's pretty general purpose, so a similar approach should work for you.

R.

anonymous profile picture
Account deleted
Posts: 14

16 January 2012, 2:14

Thanks for your help richard i am now trying to enter in gitorius . but if possible to ave another answer. the way i tryied to solve the problem is to look the table in artefact and compare it with the record created by mahara. I shold like to know if it is required only to compare  the artefact.file.files table  or other artefact tables must be controlled.

anonymous profile picture
Account deleted
Posts: 14

19 January 2012, 9:04

to have mobileupload.php file   option i need to configure network option , but :

entering as admin if i try to configure networking the answer is that it is not able to find my php configuration or it has not enaugh option .and says that the module nort found is xlrmpc .. please help !!!

 

anonymous profile picture
Account deleted
Posts: 808

19 January 2012, 15:52

Hi Tommaso,

The "Enable networking" option is only necessary when you want to link your Mahara site to a Moodle site. In that case you really do need to have the PHP xmlrpc extension available on your server.

But you can turn on "Allow Mobile Uploads" even if you have networking turned off.

In reply to your other question, I think you only need to insert records into artefact and artefact_file_files.  But if you read the code in mobileupload.php and the functions called by it, and you make sure you do the same things, everything should be fine.

anonymous profile picture
Account deleted
Posts: 14

23 January 2012, 9:09

ok , is this option available from which version ? i was not able to find mobileupload.php file in my server

23 January 2012, 11:02

This is available from 1.4 onward.

-dajan

7 results