I'm currently coding up a Gallery 2 module for moodle but I have run into a big problem that reaches beyond my knowledge/familiarity with Moodle.
I have all of the embedding code working just fine on a basic level, but a call to Gallery 2 embed functions mess up Moodle.
After I call:
GalleryEmbed::init() in 1.5.2+ or
GalleryEmbed::handleRequest() in 1.6+
Moodle SQL functions (eg: get_records) no longer return associative arrays. The arrays only have the numbered indexes instead of both numbered and associative.
What could Gallery 2 possibly do to cause Moodle to behave like this? I think it might have to do with adodb, which is used by Moodle and Gallery 2. Also, Gallery 2 is affecting some global setting because I have tried to functionalize all of my Gallery 2 calls but that did not fix the problem.
More info: Both Gallery 2 and Moodle have their own directories and databases.
Thanks for any help,
Mark
This is what you are looking for.
Ah-hah! This looks very promissing. I'll post back after I played around with it.
Thanks,
Mark
Thanks,
Mark
This did the trick!
I call these lines after the Gallery2 code:
global $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
I think I'll change it to the following later on:
global $ADODB_FETCH_MODE;
$adodbfetchbackup = $ADODB_FETCH_MODE; // backup
// Gallery2 Code
$ADODB_FETCH_MODE = $adodbfetchbackup; // restore
Thanks for the help!!!
Mark
I call these lines after the Gallery2 code:
global $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
I think I'll change it to the following later on:
global $ADODB_FETCH_MODE;
$adodbfetchbackup = $ADODB_FETCH_MODE; // backup
// Gallery2 Code
$ADODB_FETCH_MODE = $adodbfetchbackup; // restore
Thanks for the help!!!
Mark
Here are some scripts I use that create a user in Gallery 2 when a Moodle user is created. Also works with bulk user upload and user password changes. Very rough at this point.
Thanks for this! I'll check it out when I can.
Cheers,
Mark
Cheers,
Mark
Hope to see Gallery 2 and Moodle together...
Working on it
Getting basic implementation down first. I'll post back to the community when the code is ready.
Cheers,
Mark
Cheers,
Mark
Thanks, Inform as when it is ready then....