FlexPage 1.9 and Oracle db = SOLVED

FlexPage 1.9 and Oracle db = SOLVED

by Fred Lunau -
Number of replies: 0
Hi,
For those who are looking to use Oracle db and Flexpage 1.9, you need to make 2 changes to the lib.php in the <moodledir>/course/format/page folder.

In the page_blocks_setup() function, find the following block of code and make the changes in bold:

$blocks = get_records_sql("(SELECT i.id $as pageitemid, b.id, b.blockid, b.pageid, b.pagetype, i.position, i.sortorder $as weight, i.visible, to_char(b.configdata) $as configdata
FROM {$CFG->prefix}format_page_items i,
{$CFG->prefix}block_instance b
WHERE i.blockinstance = b.id
AND b.pageid = $pageid
AND b.pagetype = '$type'
AND i.pageid = {$PAGE->formatpage->id})
UNION
(SELECT i.id $as pageitemid, b.id, b.blockid, b.pageid, b.pagetype, i.position, i.sortorder $as weight, i.visible, to_char(i.cmid) $as configdata
FROM {$CFG->prefix}format_page_items i,
{$CFG->prefix}block_instance b
WHERE i.blockinstance = 0
AND b.pageid = $pageid
AND b.pagetype = '$type'
AND i.pageid = {$PAGE->formatpage->id}
AND b.id = $dummy->id)
ORDER BY position, weight");

Hope this helps,

Fred
Average of ratings: -