mglaredo / moodle-block_boaidp

README for boaidp, version 2.0 July 17th, 2013 This is the new implementation of Moodle's Block for metadata associated to Moodle's Courses and their further edition (in a manually mode). At this basic version only static predefined fields are present on block instance configuration. No dynamic creation of metadata schema. No additional tables. No preload fields values (users must fill manually). The main aims of these metadata is to serve as basis (Data Provider) for OAI-PMH 2.0 Harvester implementations. This Moodle's Block is written in PHP, following the Moodle Development/Contributions guidelines/recommendations. GETTING ON GITHUB https://github.com/mglaredo/moodle-block_boaidp
2 stars 0 forks source link

OAI-PMH Harvester URL #3

Open nadavkav opened 11 years ago

nadavkav commented 11 years ago

I am using the http://omeka.org/ to harvest data from various repositories, including Moodle. What is the URL I can provide Omeka so it can harvest the course's metadata that is currently collected by this block?

mglaredo commented 11 years ago

Hi again Nadav,

I've started the migration to Moodle 2.x according some people suggested. So far, I've completely rewrote the Data Model on new Moodle's block details but the harvesting functions not yet!. Sorry, I'm working on it...

nadavkav commented 11 years ago

Great News :smile:

nadavkav commented 11 years ago

btw, I see that you are not saving the course's meta data on a separate table, why?

Are you aware of the following metadata patches to Moodle's core? https://tracker.moodle.org/browse/CONTRIB-3527 https://tracker.moodle.org/browse/MDL-18319 https://tracker.moodle.org/browse/MDL-34634 totara's course custom patch : https://moodle.org/mod/forum/discuss.php?d=203936#p903046 Remote-Learner's ELIS : https://moodle.org/mod/forum/discuss.php?d=203936#p889626

mglaredo commented 11 years ago

Sincerely, I'm just starting with new particularities from Moodle 2.x versus 1.9 and, in contrast to before implementation, I'm trying to do it as easier than I see. Those tracker are very interesting but I prefer to get a basic contribution based only on core functionallity so far.

Thank you again!

mglaredo commented 11 years ago

Hi Nadav,

I don't know Omeka software, I used to test the block with http://re.cs.uct.ac.za/ repository explorer. Could you test at any moment this Beta Release (https://github.com/mglaredo/moodle-block_boaidp/releases/tag/2.0.4) integrating the OAI-PMH query interface?

The OAI Base URL would be: http://yourMoodleSite/moodle/blocks/boaidp/phpoai2/oai2.php

I'm not sure if I'm having actually some problems with the correctness of XML generated or this old-fashioned explorer is giving to me wrong testings.

See you.

nadavkav commented 11 years ago

Wooow ! You are quick :smile:

Just tested it. And it almost worked perfectly. ( I fixed/commented out a tiny piece of code....and now it works!!!)

I had to remark the following line to have the Omeka harvest the course I added the block to /blocks/boaidp/phpoai2/oai2/listrecords.php (line 147) $query = selectallQuery('');// . $extquery;

Since I was getting the following error:

Debug info: Unknown column 'oai_set' in 'where clause' SELECT distinct t2.instanceid, t1.id, t1.blockname, t1.parentcontextid, t1.configdata FROM mdl_block_instances t1, mdl_context t2 WHERE t2.instanceid = t2.instanceid AND t1.parentcontextid=t2.id AND blockname='boaidp' and oai_set LIKE '%eLearning Courses%' [array ( )] Error code: dmlreadexception Stack trace: line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 148 of /blocks/boaidp/phpoai2/oai2/listrecords.php: call to mysqli_native_moodle_database->get_records_sql() line 135 of /blocks/boaidp/phpoai2/oai2.php: call to include()

When Omeka was harvesting using the request: http://localhost/moodle-macam/moodle24-dev/blocks/boaidp/phpoai2/oai2.php?set=eLearning+Courses&metadataPrefix=oai_dc&verb=ListRecords

mglaredo commented 11 years ago

Not so quick as you! jeje

I have to stop the "Moodle 2.x Refactoring" for now, but I'd like to accomplish the milestone on August by contributing a STABLE version. I would take into account some issues besides your problem.

So thank you for your testing. Which credits do you prefer for you?, I'll include your testing contribution for next release!

See you.

nadavkav commented 11 years ago

No need for credit :-)

Thank you for all your work on this beautiful project!