function game_OnExportHTML($game, $context, $html)
{
    global $CFG;
    /*
            if( $game->gamekind == 'cross'){
                $destdir = "{$CFG->dataroot}/{$game->course}/export";
                if( !file_exists( $destdir)){
                    mkdir( $destdir);
                }
                game_OnExportHTML_cross( $game, $context, $html, $destdir);
                return;
            }
    */
    $destdir = game_export_createtempdir();
    switch ($game->gamekind) {
        case 'cross':
            game_OnExportHTML_cross($game, $context, $html, $destdir);
            break;
        case 'hangman':
            game_OnExportHTML_hangman($game, $context, $html, $destdir);
            break;
        case 'snakes':
            game_OnExportHTML_snakes($game, $html, $destdir);
            break;
        case 'millionaire':
            game_OnExportHTML_millionaire($game, $context, $html, $destdir);
            break;
    }
    remove_dir($destdir);
}
Пример #2
0
function game_OnExportHTML($game, $context, $html)
{
    global $CFG;
    $destdir = game_export_createtempdir();
    switch ($game->gamekind) {
        case 'cross':
            game_OnExportHTML_cross($game, $context, $html, $destdir);
            break;
        case 'hangman':
            game_OnExportHTML_hangman($game, $context, $html, $destdir);
            break;
        case 'snakes':
            game_OnExportHTML_snakes($game, $html, $destdir, $context);
            break;
        case 'millionaire':
            game_OnExportHTML_millionaire($game, $context, $html, $destdir);
            break;
    }
    remove_dir($destdir);
}