예제 #1
0
function referentiel_set_option_impression_certificat($referentiel_instance_id, $form)
{
    //  sauvegarde de la configuration d'impression locale
    // $form : un formulaire de saisie
    $ok = false;
    if (!empty($referentiel_instance_id) && !empty($form)) {
        $str_config = referentiel_initialise_configuration($form, 'config_impression');
        return referentiel_set_vecteur_configuration_impression($str_config, $referentiel_instance_id);
    }
    return $ok;
}
예제 #2
0
    unset($SESSION->modform);
} else {
    $form = (object) $_POST;
}
// variable d'action
if (!empty($form->cancel) && $form->cancel == get_string("quit", "referentiel")) {
    // Abandonner
    redirect($viewurl);
    exit;
}
// mise à jour de la configuration
if (!empty($form->action) && $form->action == 'modifierconfig' && !empty($form->mode) && $form->mode == 'config') {
    // sauvegarder
    $config = referentiel_initialise_configuration($form, 'config');
    referentiel_global_set_vecteur_config($config, $occurrence_object->referentiel->id);
    $config_impression = referentiel_initialise_configuration($form, 'config_impression');
    referentiel_global_set_vecteur_config_imp($config_impression, $occurrence_object->referentiel->id);
    redirect($viewurl);
    exit;
}
$strlastmodified = get_string('lastmodified');
$icon = $OUTPUT->pix_url('icon', 'referentiel');
// affichage
$pagetitle = get_string('occurrence', 'block_referentiel', $occurrence_object->referentiel->code_referentiel) . ' ' . get_string('config', 'block_referentiel');
$PAGE->set_url('/blocks/referentiel/config.php', array('blockid' => $blockid, 'courseid' => $courseid, 'occurrenceid' => $occurrenceid));
$PAGE->requires->css('/mod/referentiel/referentiel.css');
$PAGE->requires->js('/mod/referentiel/functions.js');
$PAGE->set_pagelayout('standard');
$PAGE->set_heading($course->fullname);
$PAGE->set_title($pagetitle);
$PAGE->navbar->add($occurrence_object->referentiel->code_referentiel);