Hello there,
We are developing a webservice for Limesurvey 1.7...
Our Main Goal is to import an existing Survey, change the relevant Data (ID and Surveytitle) and in a second step we add tokens to the survey and activate it.
My Question is:
How can I manage to import a survey.csv file, which lies on any webspace?
I tried it like that:
require_once('../config-defaults.php'
;
//we import a survey to change it.
$the_full_file_path = "../docs/demosurveys/studiply-test.csv";
//$the_full_file_path = "localhost/limesurvey/docs/demosurveys/studiply-test.csv";
$argv[1] = $the_full_file_path;
$argc[2] = "admin";
$argc[3] = "password";
include("../admin/cmdline_importsurvey.php"
;
the uncommented file_path is the one who finds the file, but gives back an error message: "Call to a member function MetaTables() on a non-object".
The commented path doesn't even find the file and I don't understand why.
Hopefully someone could help, I've already spent hours on this issue...
greetings
Tim
/edit: I experimented a bit with importsurvey, cmdline_importsurvey, http_importsurvey, even tried it with setting the $_SESSION[loginID],[USER_RIGHT_MANAGE_*] Variables but it always comes to this Error:
"Call to a member function MetaTables() on a non-object"
and I really don't know where the error occours and why...
please help, I am getting frustrated..
thx