/// Some capability checks.
if (empty($cm->visible) && (!has_capability('moodle/course:viewhiddenactivities', $context) && !has_capability('mod/referentiel:managecomments', $context))) {
    print_error(get_string("activityiscurrentlyhidden"), 'error', "{$CFG->wwwroot}/course/view.php?id={$course->id}");
}
// ensure the files area exists for this course
// Moodle 1.9
// make_upload_directory( "$course->id/$CFG->moddata/referentiel" );
if ($certificat_id) {
    // So do you have access?
    if (!(has_capability('mod/referentiel:writereferentiel', $context) or referentiel_certificat_isowner($certificat_id)) or !confirm_sesskey()) {
        print_error(get_string('noaccess', 'referentiel'));
    }
}
// MODIF JF mai 2011
if ($referentiel->ref_referentiel) {
    $existe_pedagos = referentiel_pedagogies_exists($referentiel->ref_referentiel);
} else {
    $existe_pedagos = 0;
}
// parametres d'impression
$param = referentiel_get_param_configuration($referentiel->id, 'config_impression');
// DEBUG
// echo "<br />DEBUG :: print_certificat.php :: 168 \n";
// print_r($param);
// exit;
// selecteur
$userid_filtre = 0;
if (!empty($userid)) {
    $userid_filtre = $userid;
}
// RECUPERER LES FORMULAIRES
Ejemplo n.º 2
0
$txt->pourcentage = get_string('format_pourcentage', 'referentiel');
$txt->reduit1 = get_string('format_reduit1', 'referentiel');
$txt->reduit2 = get_string('format_reduit2', 'referentiel');
$txt->referentiel = get_string('referentiel', 'referentiel');
$txt->download = get_string('download', 'referentiel');
$txt->downloadextra = get_string('downloadextra', 'referentiel');
$txt->exporterror = get_string('exporterror', 'referentiel');
$txt->exportname = get_string('exportname', 'referentiel');
$txt->exportreferentiel = get_string('exportreferentiel', 'referentiel');
$txt->exportcertificat = get_string('exportcertificat', 'referentiel');
$txt->fileformat = get_string('fileformat', 'referentiel');
$txt->modulename = get_string('modulename', 'referentiel');
$txt->modulenameplural = get_string('modulenameplural', 'referentiel');
// Pedagogies
if ($referentiel_referentiel->id) {
    $existe_pedagos = referentiel_pedagogies_exists($referentiel_referentiel->id);
} else {
    $existe_pedagos = 0;
}
// RECUPERER LES FORMULAIRES
if (isset($SESSION->modform)) {
    // Variables are stored in the session
    $form = $SESSION->modform;
    unset($SESSION->modform);
} else {
    $form = (object) $_POST;
}
if ($cancel) {
    redirect('index.php');
}
if (isset($action) && $action == 'delete' && confirm_sesskey()) {