Beispiel #1
0
require_login($course, true, $cm);
add_to_log($course->id, "rafl", "view", "view.php?id={$cm->id}", "{$rafl->id}");
/// Print the page header
$strrafls = get_string('modulenameplural', 'rafl');
$strrafl = get_string('modulename', 'rafl');
$navlinks = array();
$navlinks[] = array('name' => $strrafls, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
$navlinks[] = array('name' => format_string($rafl->name), 'link' => '', 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header_simple(format_string($rafl->name), '', $navigation, '', '', true, update_module_button($cm->id, $course->id, $strrafl), navmenu($course, $cm));
/**
 ********************************************** DAN HAS BEEN HERE START *************************************************
 */
// Better move to the top of this file
require_once dirname(__FILE__) . '/locallib.php';
$rafl = new localLibRafl();
// Debugging
//var_dump($rafl->get_lp_item_structure($rafl->get_rafl_item_id_by_country('uk')));
//$rafl->update_moodle_item($cm->course, $raflitemid, $text);
//$rafl->create_share(3456, 123456);
//$rafl->update_share_contributors(3456, array(7655, 7644));
//die('done!');
// In case we should ever do countries: Gimme the right rafl item in the right language for this country
$country_item_id = $rafl->get_rafl_item_id_by_country('uk');
// Print the rafl page
$rafl->display_rafl_component($cm->course, $country_item_id, $CFG->prefix);
/**
 ********************************************** DAN HAS BEEN HERE END *************************************************
 */
// Finish the page
print_footer($course);
Beispiel #2
0
            }
            $canviewrafl = true;
        }
    }
    if ($canviewrafl) {
        require_once $CFG->dirroot . '/mod/rafl/locallib.php';
        $rafl = new localLibRafl();
        // get the right module id
        $moduleid = $rafl->get_course_module_id($course->id);
        $country_item_id = $rafl->get_rafl_item_id_by_country('uk');
        page_print_position($pageblocks, BLOCK_POS_LEFT, null);
        echo '<td id="middle-column">';
        if (!empty($notifymessage)) {
            notify($notifymessage);
        }
        $rafl->display_rafl_component($course->id, $country_item_id, $CFG);
        echo '</td>';
        page_print_position($pageblocks, BLOCK_POS_RIGHT, null);
    } else {
        echo '<tr>';
        page_print_position($pageblocks, BLOCK_POS_LEFT, null);
        echo '<td id="middle-column">';
        notify('You do not have permission for RAFL View on this learning path.  Please switch back to Standard View.');
        echo '</td>';
        echo '<td id="right-column"></td>';
        echo '</tr>';
    }
} else {
    // standard mode
    /// Layout the whole page as three columns.
    echo '<tr>';