コード例 #1
0
/**
 * Code run after the seplsubmission_onlinetext module database tables have been created.
 * Moves the plugin to the top of the list (of 3)
 * @return bool
 */
function xmldb_seplsubmission_onlinetext_install()
{
    global $CFG;
    // Set the correct initial order for the plugins.
    require_once $CFG->dirroot . '/mod/sepl/adminlib.php';
    $pluginmanager = new sepl_plugin_manager('seplsubmission');
    $pluginmanager->move_plugin('onlinetext', 'up');
    $pluginmanager->move_plugin('onlinetext', 'up');
    return true;
}
コード例 #2
0
/**
 * Code run after the module database tables have been created.
 * Moves the comments plugin to the bottom
 * @return bool
 */
function xmldb_seplsubmission_comments_install()
{
    global $CFG;
    require_once $CFG->dirroot . '/mod/sepl/adminlib.php';
    // Set the correct initial order for the plugins.
    $pluginmanager = new sepl_plugin_manager('seplsubmission');
    $pluginmanager->move_plugin('comments', 'down');
    $pluginmanager->move_plugin('comments', 'down');
    return true;
}