Beispiel #1
0
/**
* Displays the title of a tool. Optionally, there can be a subtitle below
* the normal title, a supra title above the normal title and a list of
* tools links following the title.
*
* e.g. supra title:
* group
* GROUP PROPERTIES
*
* e.g. subtitle:
* AGENDA
* calender & events tool
*
* e.g. tools:
* AGENDA | (tool link 1) (tool link 2) (tool link 3)
*
* @author Hugues Peeters <*****@*****.**>
* @author Antonin Bourguignon <*****@*****.**>
* @param  mixed $titleElement - it could either be a string or an array
*                               containing 'supraTitle', 'mainTitle',
*                               'subTitle'
* @param string $helpUrl
* @param array $toolList
* @return void
*/
function claro_html_tool_title($titleParts, $helpUrl = null, $commandList = array(), $advancedCommandList = array())
{
    if (!is_array($advancedCommandList)) {
        pushClaroMessage('advanced command list is not an array ' . var_export($advancedCommandList, true), 'error');
        $advancedCommandList = array();
    }
    if (get_conf('displayAllCommandsLinkByDefault', false)) {
        $commandList = array_merge($commandList, $advancedCommandList);
        $advancedCommandList = array();
    }
    $toolTitle = new ToolTitle($titleParts, $helpUrl, $commandList, $advancedCommandList);
    return $toolTitle->render();
}
Beispiel #2
0
    if ('resetAttemptForUser' == $cmd) {
        $userId = $userInput->getMandatory('userId');
        $trackId = $userInput->getMandatory('trackId');
        $trackingReset->resetAttemptForUser($userId, $trackId);
        $dialogBox->success('<p>' . get_lang('User attempt deleted from tracking') . '</p>');
    } elseif ('resetAllAttemptsForUser' == $cmd) {
        $userId = $userInput->getMandatory('userId');
        $exId = $userInput->getMandatory('exId');
        $trackingReset->resetAllAttemptsForUser($userId, $exId);
        $dialogBox->success('<p>' . get_lang('All user attempts deleted from tracking') . '</p>');
    } elseif ('resetResultsForAllUsers' == $cmd) {
        $exId = $userInput->getMandatory('exId');
        $trackingReset->resetResultsForAllUsers($exId);
        $dialogBox->success('<p>' . get_lang('All results of exercise deleted from tracking') . '</p>');
    }
    $toolTitle = new ToolTitle(get_lang('Reset exercise tracking'));
    Claroline::getDisplay()->body->appendContent($toolTitle->render());
    Claroline::getDisplay()->body->appendContent($dialogBox->render());
    echo Claroline::getDisplay()->render();
} catch (Exception $e) {
    Claroline::getDisplay()->body->appendContent($e->getMessage());
    if (claro_debug_mode()) {
        Claroline::getDisplay()->body->appendContent($e->getTraceAsString());
    }
    echo Claroline::getDisplay()->render();
}
class CLQWZ_TrackingReset
{
    private $tbl_qwz_tracking;
    private $tbl_qwz_tracking_questions;
    private $tbl_qwz_tracking_answers;