当前位置: 首页>>代码示例>>PHP>>正文


PHP referentiel_get_user_info函数代码示例

本文整理汇总了PHP中referentiel_get_user_info函数的典型用法代码示例。如果您正苦于以下问题:PHP referentiel_get_user_info函数的具体用法?PHP referentiel_get_user_info怎么用?PHP referentiel_get_user_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了referentiel_get_user_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: presave_process

 function presave_process($content)
 {
     // override method to allow us to add xhtml headers and footers
     global $CFG;
     global $USER;
     $xp = "#Moodle Referentiel CSV Export;latin1;" . referentiel_get_user_info($USER->id) . "\n";
     $xp .= $content;
     return $xp;
 }
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:9,代码来源:format.php

示例2: referentiel_get_user_info

                        $souscription_libre = 1;
                    }
                    if (isset($record_t->cle_souscription)) {
                        $cle_souscription = $record_t->cle_souscription;
                    } else {
                        $cle_souscription = '';
                    }
                    if (isset($record_t->tache_masquee)) {
                        $tache_masquee = $record_t->tache_masquee;
                    } else {
                        $tache_masquee = 0;
                    }
                    // DEBUG
                    // echo "<br/>DEBUG ::<br />\n";
                    // print_object($record_t);
                    $auteur_info = referentiel_get_user_info($auteurid);
                    // dates
                    $date_creation_info = userdate($date_creation);
                    $date_modif_info = userdate($date_modif);
                    // $date_debut_info=userdate($date_debut);
                    // $date_fin_info=userdate($date_fin);
                    $date_debut_info = $date_debut;
                    $date_fin_info = $date_fin;
                    // AFFICHER tache
                    ?>
<div align="center">
<h3><?php 
                    print_string('modifier_task', 'referentiel');
                    ?>
</h3>
<form name="form" method="post" action="<?php 
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:31,代码来源:task_inc_html.php

示例3: referentiel_print_notification_user

function referentiel_print_notification_user($instanceid, $courseid, $context, $t_codes_competence, $userid, $records_teacher)
{
    $s = "";
    $s_entete = "";
    $s_debut = "";
    $s_competences = "";
    if (!empty($records_teacher) && !empty($instanceid) && !empty($courseid) && !empty($userid) && !empty($t_codes_competence)) {
        $nb_lig = 0;
        $nb_col = 0;
        $maxcol = 8;
        // nombre max de colonnes par page : une colonne = un teacher
        $colwidth = (int) (100 / ($maxcol + 1)) . '%';
        // DEBUG
        //echo("TEACHERS<br />\n");
        //print_object($records_teacher);
        //echo("<br />\n");
        foreach ($records_teacher as $record_t) {
            // liste d'id teachers
            if ($record_t) {
                $t_teachers[] = $record_t->userid;
            }
        }
        $teachers_list = implode(',', $t_teachers);
        $nb_teachers = count($t_teachers);
        $nb_lig = $nb_teachers % $maxcol;
        // nombre de pages
        $identite_user = referentiel_get_user_info($userid);
        if ($identite_user) {
            $message = '<h3>' . get_string('liste_repartition', 'referentiel') . get_string('identite_utilisateur', 'referentiel', $identite_user) . '</h3>';
        } else {
            $message = '<h3>' . get_string('liste_repartition', 'referentiel') . '</h3>';
        }
        $t_teacherids_accompagnement = referentiel_get_accompagnements_user($instanceid, $courseid, $userid);
        // DEBUG
        /*
                        echo("print_lib_repartition.php :: 134 :: TEACHERS ACCOMPAGNATEURS pour $userid<br />\n");
                        print_object($t_teacherids_accompagnement);
                        echo("<br />\n");
                        // DEBUG
                        echo("codes <br />\n");
                        print_object($t_codes_competence);
                        echo("<br />\n");
        */
        $t_repartition_competences = referentiel_get_repartition_notification($instanceid, $courseid, $t_codes_competence, $t_teacherids_accompagnement, $records_teacher);
        /*
        // DEBUG
        echo("print_lib_repartition.php :: 122:: COMPETENCES<br />\n");
        print_object($t_repartition_competences);
        echo("<br />\n");
        */
        if ($t_repartition_competences) {
            // DEBUG
            /*
                        echo("print_lib_repartition.php :: 130 :: COMPETENCES<br />\n");
                        print_object($t_repartition_competences);
                        echo("<br />\n");
                        //exit;
            */
            $col = 0;
            $lig = 0;
            $s_debut .= '<div align="center">' . "\n";
            $s_debut .= $message . "\n";
            $s_debut .= '<table class="activite">' . "\n";
            // teachers
            $max_index = min($nb_teachers, $maxcol);
            $index_teacher_deb = 0;
            $index_teacher_fin = $max_index;
            $k = 0;
            $j = 0;
            $col = 0;
            while ($k < $nb_teachers) {
                if ($col == 0) {
                    $s_entete = "<tr valign='top'><th align='left' width='10%'>" . get_string('item', 'referentiel') . ' \\ ' . get_string('referent', 'referentiel') . "</th>\n";
                    for ($j = $index_teacher_deb; $j < $index_teacher_fin; $j++) {
                        $s_entete .= "<th width='" . $colwidth . "'>\n";
                        $s_entete .= "<b>" . referentiel_get_user_nom($t_teachers[$j]) . ' ' . referentiel_get_user_prenom($t_teachers[$j]) . "</b>\n";
                        $s_entete .= "</th>\n";
                    }
                    $s_entete .= "</tr>\n";
                    $s .= $s_entete;
                    $k += $max_index;
                }
                // competences
                $s_competences = "";
                foreach ($t_repartition_competences as $cle => $une_repartition) {
                    if ($une_repartition) {
                        // DEBUG
                        // echo("print_lib_repartition.php :: 173 :: CLE $cle <br />REPARTITION<br />\n");
                        // print_object($une_repartition);
                        // echo("<br />EXIT :: print_lib_repartition.php :: 188 \n");
                        // exit;
                        $s_competences .= "<tr valign='top'><td>\n";
                        $s_competences .= "<b>" . $cle . "</b>\n";
                        $s_competences .= "</td>";
                        while (list($key, $val) = each($une_repartition)) {
                            if ($index_teacher_deb <= $key && $key < $index_teacher_fin) {
                                $s_competences .= "<td>{$val}</td>";
                            }
                        }
                        $s_competences .= "</tr>\n";
//.........这里部分代码省略.........
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:101,代码来源:print_lib_repartition.php

示例4: referentiel_print_graph_certificats

function referentiel_print_graph_certificats($referentiel_instance, $referentiel_referentiel, $gusers, $currentgroup = 0)
{
    global $DB;
    global $CFG;
    global $USER;
    // contexte
    $cm = get_coursemodule_from_instance('referentiel', $referentiel_instance->id);
    $course = $DB->get_record('course', array('id' => $cm->course));
    if (empty($cm) or empty($course)) {
        print_error('REFERENTIEL_ERROR 5 :: print_lib_certificat.php :: You cannot call this script in that way');
    }
    $context = context_module::instance($cm->id);
    $roles = referentiel_roles_in_instance($referentiel_instance->id);
    $iseditor = $roles->is_editor;
    $isadmin = $roles->is_admin;
    $isteacher = $roles->is_teacher;
    $istutor = $roles->is_tutor;
    $isstudent = $roles->is_student;
    $isguest = $roles->is_guest;
    // codes item
    $liste_codes = referentiel_purge_dernier_separateur($referentiel_referentiel->liste_codes_competence, '/');
    // empreintes
    $liste_empreintes = referentiel_purge_dernier_separateur($referentiel_referentiel->liste_empreintes_competence, '/');
    // poids
    $liste_poids = referentiel_purge_dernier_separateur($referentiel_referentiel->liste_poids_competence, '/');
    // cours ?
    if (!empty($course)) {
        $course_name = $course->shortname;
    } else {
        $course_name = "";
    }
    // groupes ?
    if (!empty($currentgroup)) {
        $group_name = groups_get_group_name($currentgroup);
    } else {
        $group_name = "";
    }
    $titre = get_string('certification_etat', 'referentiel');
    if (!empty($course_name)) {
        $titre .= ' (' . $course_name;
        if (!empty($group_name)) {
            $titre .= ' - ' . $group_name;
        }
        $titre .= ')';
    }
    $titre = str_replace(' ', '_', $titre);
    // utilisateurs
    $record_id_users = referentiel_get_students_course($course->id, 0, 0);
    //seulement les stagiaires
    // groupes ?
    if ($gusers && $record_id_users) {
        $record_users = array_intersect($gusers, array_keys($record_id_users));
        // recopier
        $record_id_users = array();
        foreach ($record_users as $record_id) {
            $a_obj = new stdClass();
            $a_obj->userid = $record_id;
            $record_id_users[] = $a_obj;
        }
    }
    if ($record_id_users) {
        // Afficher
        foreach ($record_id_users as $record_id) {
            // afficher la liste d'users
            // recupere les enregistrements de certificats ou les cree si necessaire
            $records_c[] = referentiel_certificat_user($record_id->userid, $referentiel_referentiel->id);
        }
        if ($records_c) {
            // Let's get the datas
            $separateur1 = '/';
            $separateur2 = ':';
            $separateur3 = '|';
            $t_user = array();
            // tableau des userid
            $t_code = explode($separateur1, $liste_codes);
            $t_empreinte = explode($separateur1, $liste_empreintes);
            $t_poids = explode($separateur1, $liste_poids);
            $moyennes = array();
            $t_valides = array(array());
            // $t_declarees = array(array());
            $user_name_souligne = "";
            foreach ($records_c as $record_c) {
                // pour tous les certificats
                if ($record_c) {
                    $certificat_id = $record_c->id;
                    $commentaire_certificat = stripslashes($record_c->commentaire_certificat);
                    $synthese_certificat = stripslashes($record_c->synthese_certificat);
                    $competences_certificat = $record_c->competences_certificat;
                    $competences_activites = $record_c->competences_activite;
                    $decision_jury = stripslashes($record_c->decision_jury);
                    $date_decision = $record_c->date_decision;
                    $ref_referentiel = $record_c->ref_referentiel;
                    $user_id = $record_c->userid;
                    $teacherid = $record_c->teacherid;
                    $verrou = $record_c->verrou;
                    $dossier_ferme = $record_c->valide;
                    $evaluation = $record_c->evaluation;
                    $user_name = referentiel_get_user_nom($user_id) . ' ' . referentiel_get_user_prenom($user_id);
                    $user_info = referentiel_get_user_info($user_id);
                    $teacher_info = referentiel_get_user_info($teacherid);
//.........这里部分代码省略.........
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:101,代码来源:print_lib_certificat.php

示例5: referentiel_print_task_detail

function referentiel_print_task_detail($record_t, $context, $detail = true, $numero = 0)
{
    $s = '';
    $s0 = '';
    $s1 = '';
    $s2 = '';
    $nblignes = 4;
    // hauteur du tableau
    if ($record_t) {
        $taskid = $record_t->id;
        $type_task = stripslashes($record_t->type_task);
        $description_task = stripslashes($record_t->description_task);
        $competences_task = $record_t->competences_task;
        $criteres_evaluation = stripslashes($record_t->criteres_evaluation);
        $ref_instance = $record_t->ref_instance;
        $ref_referentiel = $record_t->ref_referentiel;
        $ref_course = $record_t->ref_course;
        $auteurid = $record_t->auteurid;
        $date_creation = $record_t->date_creation;
        $date_modif = $record_t->date_modif;
        $date_debut = $record_t->date_debut;
        $date_fin = $record_t->date_fin;
        // Modalite souscription
        $souscription_libre = $record_t->souscription_libre;
        $cle_souscription = stripslashes($record_t->cle_souscription);
        $tache_masquee = $record_t->tache_masquee;
        $user_info = referentiel_get_user_info($auteurid);
        // dates
        $date_creation_info = userdate($date_creation);
        $date_modification_info = userdate($date_modif);
        $date_debut_info = userdate($date_debut);
        $date_fin_info = userdate($date_fin);
        // charger les consignes associees à la tache courante
        if (!empty($taskid)) {
            // AFFICHER LA LISTE DES consigneS
            $compteur_consigne = 0;
            $records_consigne = referentiel_get_consignes($taskid);
            if ($records_consigne) {
                // afficher
                // DEBUG
                // echo "<br/>DEBUG ::<br />\n";
                // print_r($records_consigne);
                $nbconsigne = count($records_consigne);
                $s1 .= '<!-- CONSIGNES -->
<div class="ref_affdoc">' . "\n";
                if ($nbconsigne > 1) {
                    $s1 .= '<span class="bold">' . get_string('consignes_associees', 'referentiel', $nbconsigne) . '</span>' . "\n";
                } else {
                    $s1 .= '<span class="bold">' . get_string('consigne_associee', 'referentiel', $nbconsigne) . '</span>' . "\n";
                }
                $s1 .= "\n";
                foreach ($records_consigne as $record_d) {
                    $consigne_id = $record_d->id;
                    $type_consigne = stripslashes($record_d->type_consigne);
                    $description_consigne = stripslashes($record_d->description_consigne);
                    $url_consigne = $record_d->url_consigne;
                    $ref_task = $record_d->ref_task;
                    if (isset($record_d->cible_consigne) && $record_d->cible_consigne == 1) {
                        $cible_consigne = '_blank';
                        // fenêtre cible
                    } else {
                        $cible_consigne = '';
                    }
                    if (isset($record_d->etiquette_consigne)) {
                        $etiquette_consigne = $record_d->etiquette_consigne;
                        // fenêtre cible
                    } else {
                        $etiquette_consigne = '';
                    }
                    // affichage de l'url
                    if (preg_match('/moddata\\/referentiel/', $url_consigne)) {
                        // l'URL doit être transformée
                        $data_r = new Object();
                        $data_r->id = $consigne_id;
                        $data_r->userid = $auteurid;
                        $data_r->author = referentiel_get_user_info($auteurid);
                        $data_r->url = $url_consigne;
                        $data_r->filearea = 'consigne';
                        $url_consigne = referentiel_m19_to_m2_file($data_r, $context, false, true);
                    }
                    $date_creation = userdate($record_d->timestamp);
                    if ($detail) {
                        $s2 .= '<span class="bold">' . get_string('consigne', 'referentiel') . '</span><i>' . $consigne_id . '</i>
<span class="bold">' . get_string('date_creation', 'referentiel') . '</span>
<i>' . $date_creation . '</i>
<span class="bold">' . get_string('type', 'referentiel') . '</span>
' . $type_consigne . '
<span class="bold">' . get_string('description', 'referentiel') . '</span><span class="white">
' . nl2br($description_consigne) . '</span>
<span class="bold">' . get_string('url', 'referentiel') . '</span>' . "\n";
                        $s2 .= referentiel_affiche_url($url_consigne, $etiquette_consigne, $cible_consigne);
                        $s2 .= '<br />' . "\n";
                    } else {
                        $s2 .= ' &nbsp; ' . referentiel_affiche_url($url_consigne, $etiquette_consigne, $cible_consigne);
                    }
                }
            }
        }
        $s0 .= '
<a name="task_' . $taskid . '"></a>' . "\n";
//.........这里部分代码省略.........
开发者ID:OctaveBabel,项目名称:moodle-itop,代码行数:101,代码来源:print_lib_task.php

示例6: write_index

 function write_index()
 {
     // add xhtml headers and footers
     global $CFG;
     global $USER;
     // get css bit
     $css_lines = file("{$CFG->dirroot}/mod/referentiel/format/html/html.css");
     $css = implode(' ', $css_lines);
     $xp = "<html>\n";
     $xp .= "<head>\n";
     $xp .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n";
     $xp .= "<meta author=\"" . referentiel_get_user_info($USER->id) . "\">\n";
     $xp .= "<title>" . get_string('archive_file', 'referentiel') . "</title>\n";
     $xp .= $css;
     $xp .= "</head>\n";
     $xp .= "<body>\n";
     $xp .= "<div id='dataDiv'><h1 align='center'>" . get_string('generatedby', 'referentiel') . "</h1>\n";
     $xp .= "<p align='center'>" . date("Y-m-d H:g:s") . "</p>\n";
     $xp .= "<div align='center'>\n";
     $xp .= $this->get_url_users() . "\n";
     $xp .= "</div>\n";
     $xp .= "</body>\n";
     $xp .= "</html>\n";
     return $xp;
 }
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:25,代码来源:archive_format.php

示例7: definition


//.........这里部分代码省略.........
         $mode = '';
     }
     if (isset($option->modulename)) {
         $modulename = $option->modulename;
     } else {
         $modulename = '';
     }
     if (isset($option->select_acc)) {
         $select_acc = $option->select_acc;
     } else {
         $select_acc = 0;
     }
     if (isset($option->data_filtre)) {
         $data_filtre = $option->data_filtre;
     } else {
         $data_filtre = NULL;
     }
     if (isset($arguments['action'])) {
         $action = $arguments['action'];
     } else {
         $action = 'addactivity';
     }
     // visible elements
     $mform->addElement('header', 'general', $arguments['msg']);
     $mform->addHelpButton('general', 'creer_activiteh', 'referentiel');
     // preparer les variables globales pour Overlib
     referentiel_initialise_data_referentiel($this->occurrenceid);
     if (has_capability('mod/referentiel:managecertif', $this->context)) {
         // enseignant
         $mform->addElement('html', '<p><i>' . get_string('creer_activite_teacher', 'referentiel') . '</i></p>' . "\n");
     }
     $jauge_activite_declarees = referentiel_print_jauge_activite($userid, $this->occurrenceid);
     if ($jauge_activite_declarees) {
         $jauge_activite_declarees = get_string('competences_declarees', 'referentiel', referentiel_get_user_info($userid)) . ' ' . $jauge_activite_declarees . "\n";
         $mform->addElement('html', '<div class="qheader">' . $jauge_activite_declarees . '</div>');
     }
     $mform->addElement('text', 'type_activite', get_string('type_activite', 'referentiel'), array('size' => '40'));
     $mform->setType('type_activite', PARAM_ALPHA);
     $mform->addRule('type_activite', get_string('missingtype', 'referentiel'), 'required', null, 'server');
     $mform->setDefault('type_activite', $type_activite);
     $mform->addElement('editor', 'description_activite', get_string('description', 'referentiel'));
     $mform->setType('description_activite', PARAM_TEXT);
     $mform->addRule('description_activite', get_string('missingdescription', 'referentiel'), 'required', null, 'server');
     $mform->setDefault('description_activite', $description_activite);
     //if (isteacher($this->userid)){
     if (has_capability('mod/referentiel:approve', $this->context)) {
         $mform->addElement('textarea', 'commentaire_activite', get_string('commentaire', 'referentiel'), 'wrap="virtual" cols="80" rows="5"');
         $mform->setType('commentaire_activite', PARAM_TEXT);
         $mform->setDefault('commentaire_activite', $commentaire_activite);
     } else {
         //echo get_string('commentaire','referentiel').': '.$commentaire_activite."\n";
         $mform->addElement('hidden', 'commentaire_activite', $commentaire_activite);
         $mform->setType('commentaire_activite', PARAM_TEXT);
     }
     // $saisie_competences=referentiel_modifier_selection_codes_item_hierarchique($this->occurrenceid, $competences_activite, $ref_task, $activite_id, '', 1);
     // $saisie_competences=referentiel_modifier_selection_codes_item_hierarchique($this->occurrenceid, '', $ref_task, $activite_id, '', 1);
     // Cette approche ne fonctionne pas
     // $mform->addElement('html', "\n".'<br /><div class="qheader">'.$saisie_competences.'</div><br />'."\n");
     $this->modifier_selection_codes_item_hierarchique($mform, $this->occurrenceid, '', $ref_task, $activite_id, '', 1);
     /*
     echo '<br />'."\n";
     referentiel_selection_liste_codes_item_hierarchique($this->occurrenceid);
     echo '<br />'."\n";
     */
     $radioarray = array();
     $radioarray[] = $mform->createElement('radio', 'depot_document', '', get_string('yes'), 1, NULL);
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:67,代码来源:input_activity_form.php

示例8: write_etudiant

 function write_etudiant($record)
 {
     // initial string;
     $expout = "";
     // add comment
     //        $expout .= "\n\n<!-- etudiant: $record->id  -->\n";
     if ($record) {
         // add header
         //			$expout .= "<div class=\"referentiel\">\n";
         //    		$expout .= "<h4>Etudiant</h4>\n";
         //
         $expout .= "<ul>\n";
         //
         $id = trim($record->id);
         $userid = trim($record->userid);
         $ref_etablissement = trim($record->ref_etablissement);
         $num_etudiant = trim($record->num_etudiant);
         $ddn_etudiant = trim($record->ddn_etudiant);
         $lieu_naissance = trim($record->lieu_naissance);
         $departement_naissance = trim($record->departement_naissance);
         $adresse_etudiant = trim($record->adresse_etudiant);
         $login = trim(referentiel_get_user_login($record->userid));
         if ($num_etudiant == $login) {
             $texte = $num_etudiant;
         } elseif ($num_etudiant == '') {
             $texte = $login;
         } else {
             $texte = $num_etudiant . " (" . $login . ")";
         }
         $expout .= " <li><b>" . get_string('id', 'referentiel') . "</b> : {$id}</li>\n";
         $expout .= " <li><b>" . get_string('userid', 'referentiel') . "</b> : {$userid}</li>\n";
         $expout .= " <li><b>" . get_string('nom_prenom', 'referentiel') . "</b> : " . referentiel_get_user_info($record->userid) . "</li>\n";
         $expout .= " <li><b>" . get_string('num_etudiant', 'referentiel') . "</b> : {$texte}</li>\n";
         $expout .= " <li><b>" . get_string('ddn_etudiant', 'referentiel') . "</b> : {$ddn_etudiant}</li>\n";
         $expout .= " <li><b>" . get_string('lieu_naissance', 'referentiel') . "</b> : {$lieu_naissance}</li>\n";
         $expout .= " <li><b>" . get_string('departement_naissance', 'referentiel') . "</b> : {$departement_naissance}</li>\n";
         $expout .= " <li><b>" . get_string('adresse_etudiant', 'referentiel') . "</b> : {$adresse_etudiant}</li>\n";
         $expout .= " <li><b>" . get_string('ref_etablissement', 'referentiel') . "</b> : {$ref_etablissement}</li>\n";
         /*
         // Etablissement
         $record_etablissement=referentiel_get_etablissement($record->ref_etablissement);
         	    	if ($record_etablissement){
         	$expout .= $this->write_etablissement( $record_etablissement );
         }
         */
         $expout .= " </ul>\n";
         //			$expout .= "</div>\n";
     }
     return $expout;
 }
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:50,代码来源:format.php

示例9: get_string

<input type="submit" name="cancel" value="' . get_string("quit", "referentiel") . '" />
<br />' . "\n";
                foreach ($records_etudiant as $record) {
                    $etudiant_id = $record->id;
                    $num_etudiant = $record->num_etudiant;
                    $ddn_etudiant = $record->ddn_etudiant;
                    $lieu_naissance = $record->lieu_naissance;
                    $departement_naissance = $record->departement_naissance;
                    $adresse_etudiant = $record->adresse_etudiant;
                    $ref_etablissement = $record->ref_etablissement;
                    $userid = $record->userid;
                    $user_info = referentiel_get_user_info($record->userid);
                    // DEBUG
                    // echo "<br/>DEBUG ::<br />\n";
                    // print_object($record);
                    $user_info = referentiel_get_user_info($userid);
                    // AFFICHER etudiant
                    echo '<hr><h3 align="center">' . get_string('student', 'referentiel') . '</h3>
<input type="checkbox" name="tetudiant_id[]" id="tetudiant_id_' . $etudiant_id . '" value="' . $etudiant_id . '" />
<b>' . get_string('select_student', 'referentiel') . '</b>
<br />' . "\n";
                    echo '
<table cellpadding="5" width="80%">
<tr valign="top">
    <td align="right">
	<b>' . get_string('nom_prenom', 'referentiel') . ':</b>
	</td>
    <td align="left">' . $user_info . '</td>
</tr>

<tr valign="top">
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:31,代码来源:etudiant_inc.php

示例10: while

         if ($user_nb_activities_displayed == 0) {
             // Afficher les predecesseurs sans activite avant d'afficher les declarations de celui-ci
             $s_no_activity = '';
             $k = $index_user - 1;
             // rechercher le successeur sans activite
             while ($k > 0 && $t_users_count[$k] == 0) {
                 $s_no_activity = '<div align="center" class="grise">' . referentiel_print_aucune_activite_user($t_users[$k]) . '</div>' . "\n" . $s_no_activity;
                 $k--;
             }
             if (!empty($s_no_activity)) {
                 echo $s_no_activity;
             }
         }
         $first_activity = 0;
     }
     echo '<div align="center">' . get_string('competences_declarees', 'referentiel', '<span class="bold">' . referentiel_get_user_info($record_a->userid) . '</span>') . "\n" . referentiel_print_jauge_activite($record_a->userid, $referentiel_referentiel->id) . '</div>' . "\n";
     if ($modeaff == 2) {
         //
         if ($index_user >= 0 && isset($t_users_count[$index_user]) && $t_users_count[$index_user] > 0) {
             // nb activites
             echo '<div align="center"><i>' . get_string('activitynumber', 'referentiel', $t_users_count[$index_user]) . '</i></div>' . "\n";
         }
     }
 }
 referentiel_print_activite_detail($bareme, $record_a, $context, $modeaff == 1);
 if ($record_a->ref_course == $course->id) {
     referentiel_menu_activite($cm, $context, $record_a->id, $record_a->userid, $referentiel->id, $record_a->approved, $selacc, $modeaff == 1, $mode);
     if (!$record_a->approved) {
         echo '<div align="center">' . referentiel_ajout_document($record_a, $mode, $selacc) . "</div>\n";
     }
 } else {
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:31,代码来源:list_activites_users.php

示例11: referentiel_conversion_url_m19

function referentiel_conversion_url_m19($delete = false, $verbose = false)
{
    // move all m19 links and data to m2.x links and files
    global $CFG;
    global $DB;
    // documents
    $params = array('urlm19' => '%/moddata/referentiel/%');
    $sql = "SELECT id, ref_activite, url_document FROM {referentiel_document} WHERE url_document LIKE :urlm19 ORDER BY ref_activite ";
    $recs_documents = $DB->get_records_sql($sql, $params);
    if (!empty($recs_documents)) {
        $activiteid = 0;
        foreach ($recs_documents as $doc) {
            if ($doc->ref_activite != $activiteid) {
                $activiteid = $doc->ref_activite;
                $activite = $DB->get_record('referentiel_activite', array('id' => $doc->ref_activite));
                $cm = get_coursemodule_from_instance('referentiel', $activite->ref_instance, $activite->ref_course);
                $context = context_module::instance($cm->id);
            }
            $data_r = new Object();
            $data_r->id = $doc->id;
            $data_r->userid = $activite->userid;
            $data_r->author = referentiel_get_user_info($activite->userid);
            $data_r->url = $doc->url_document;
            $data_r->filearea = 'document';
            $url_document = referentiel_m19_to_m2_file($data_r, $context, $verbose, $delete);
        }
    }
    // consignes
    $params = array('urlm19' => '%/moddata/referentiel/%');
    $sql = "SELECT id, ref_task, url_consigne FROM {referentiel_consigne} WHERE url_consigne LIKE :urlm19 ORDER BY ref_task ";
    $recs_consignes = $DB->get_records_sql($sql, $params);
    if (!empty($recs_consignes)) {
        $taskid = 0;
        foreach ($recs_consignes as $doc) {
            if ($doc->ref_task != $taskid) {
                $taskid = $doc->ref_task;
                $task = $DB->get_record('referentiel_task', array('id' => $doc->ref_task));
                $cm = get_coursemodule_from_instance('referentiel', $task->ref_instance, $task->ref_course);
                $context = context_module::instance($cm->id);
            }
            $data_r = new Object();
            $data_r->id = $doc->id;
            $data_r->userid = $task->auteurid;
            $data_r->author = referentiel_get_user_info($task->auteurid);
            $data_r->url = $doc->url_consigne;
            $data_r->filearea = 'consigne';
            $url_consigne = referentiel_m19_to_m2_file($data_r, $context, $verbose, $delete);
        }
    }
    //$CFG->referentiel_migration_19_2x=0;
    // pas de nouvelle conversion en principe...
}
开发者ID:OctaveBabel,项目名称:moodle-itop,代码行数:52,代码来源:lib.php

示例12: referentiel_print_etudiant_2

function referentiel_print_etudiant_2($userid, $referentiel_id, $context, $appli)
{
    //	fusion de referentiel_print_etudiant($record) et de referentiel_menu_etudiant($context, $record->id, $referentiel_instance->id, $record->approved);
    global $CFG;
    global $USER;
    global $OUTPUT;
    $s = "";
    if ($userid) {
        $record = referentiel_get_etudiant_user($userid);
        if ($record) {
            $s .= '<tr bgcolor="white">';
            $s .= '<td>' . referentiel_get_user_login($userid);
            $s .= '</td><td>' . referentiel_get_user_info($record->userid);
            $s .= '</td><td>';
            if ($record->num_etudiant == 'l_inconnu') {
                $s .= get_string('l_inconnu', 'referentiel');
            } else {
                $s .= stripslashes($record->num_etudiant);
            }
            $s .= '</td><td>';
            if ($record->ddn_etudiant == 'l_inconnu') {
                $s .= get_string('l_inconnu', 'referentiel');
            } else {
                $s .= stripslashes($record->ddn_etudiant);
            }
            $s .= '</td><td>';
            if ($record->lieu_naissance == 'l_inconnu') {
                $s .= get_string('l_inconnu', 'referentiel');
            } else {
                $s .= stripslashes($record->lieu_naissance);
            }
            $s .= '</td><td>';
            if ($record->departement_naissance == 'l_inconnu') {
                $s .= get_string('l_inconnu', 'referentiel');
            } else {
                $s .= stripslashes($record->departement_naissance);
            }
            $s .= '</td><td>';
            if ($record->adresse_etudiant == 'l_inconnu') {
                $s .= get_string('l_inconnu', 'referentiel');
            } else {
                $s .= stripslashes($record->adresse_etudiant);
            }
            $s .= '</td><td>';
            $s .= referentiel_select_etablissement($record->userid, $record->ref_etablissement, $appli);
            $s .= '</td><td>';
            // menu
            if (has_capability('mod/referentiel:managecertif', $context) or $USER->id == $record->userid) {
                $s .= '&nbsp; <a href="' . $CFG->wwwroot . '/mod/referentiel/etudiant.php?d=' . $referentiel_id . '&amp;userid=' . $record->userid . '&amp;mode=updateetudiant&amp;sesskey=' . sesskey() . '"><img src="' . $OUTPUT->pix_url('/t/edit') . '" alt="' . get_string('edit') . '" title="' . get_string('edit') . '" /></a>' . "\n";
            }
            if (has_capability('mod/referentiel:managecertif', $context)) {
                $s .= '&nbsp; <a href="' . $CFG->wwwroot . '/mod/referentiel/etudiant.php?d=' . $referentiel_id . '&amp;userid=' . $record->userid . '&amp;mode=deleteetudiant&amp;sesskey=' . sesskey() . '"><img src="' . $OUTPUT->pix_url('/t/delete') . '" alt="' . get_string('delete') . '" title="' . get_string('delete') . '" /></a>' . "\n";
            }
            $s .= '</td></tr>' . "\n";
        }
    }
    return $s;
}
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:58,代码来源:print_lib_etudiant.php

示例13: write_certificat

 /**
  * Turns referentiel instance into an xml segment
  * @param referentiel instanceobject
  * @return string xml segment
  */
 function write_certificat($record)
 {
     global $CFG;
     // initial string;
     $s1 = '';
     $s2 = '';
     $nbchamps = 0;
     $expout = "";
     // add comment and div tags
     if ($record) {
         // DEBUG
         // echo "<br />DEBUG LIGNE 1021<br />\n";
         // print_r($referentiel_instance);
         $id = trim($record->id);
         $commentaire_certificat = trim($record->commentaire_certificat);
         $synthese_certificat = trim($record->synthese_certificat);
         $competences_certificat = trim($record->competences_certificat);
         $competences_activite = trim($record->competences_activite);
         $decision_jury = trim($record->decision_jury);
         if ($record->date_decision) {
             $date_decision = userdate(trim($record->date_decision));
         } else {
             $date_decision = "";
         }
         $userid = trim($record->userid);
         $teacherid = trim($record->teacherid);
         if ($teacherid != 0) {
             $nom_prenom_teacher = referentiel_get_user_info($teacherid);
         } else {
             $nom_prenom_teacher = "";
         }
         $ref_referentiel = trim($record->ref_referentiel);
         $verrou = trim($record->verrou);
         $valide = trim($record->valide);
         $evaluation = trim($record->evaluation);
         $pourcentages = '';
         // calcul des pourcentages
         if ($this->certificat_sel_param->certificat_sel_certificat_pourcent) {
             if (isset($verrou) && $verrou != "") {
                 if ($verrou != 0) {
                     $bgcolor = 'verrouille';
                 } else {
                     $bgcolor = 'deverrouille';
                 }
             } else {
                 $bgcolor = 'deverrouille';
             }
             // Tableau
             $pourcentages = referentiel_retourne_certificat_consolide('/', ':', $competences_certificat, $ref_referentiel, ' class="' . $bgcolor . '"');
         }
         // USER
         if (isset($record->userid) && $record->userid > 0) {
             $record_etudiant = referentiel_get_etudiant_user($record->userid);
             if (!$record_etudiant) {
                 // creer l'enregistrement car on en a besoin immediatement
                 if (referentiel_add_etudiant_user($record->userid)) {
                     $record_etudiant = referentiel_get_etudiant_user($record->userid);
                 }
             }
             if ($record_etudiant) {
                 $s2 = '';
                 if ($this->certificat_sel_param->certificat_sel_decision_jury) {
                     $s2 .= "<th class='referentiel'>" . get_string('decision', 'referentiel') . "</th>\n";
                     $s2 .= "<th class='referentiel'>" . get_string('datedecision', 'referentiel') . "</th>\n";
                     $nbchamps += 2;
                 }
                 if ($this->certificat_sel_param->certificat_sel_certificat_referents) {
                     $s2 .= "<th class='referentiel'>" . get_string('valide_par', 'referentiel') . "</th>\n";
                     $nbchamps++;
                 }
                 if ($this->certificat_sel_param->certificat_sel_certificat_detail) {
                     $s2 .= "<th class='referentiel'>" . get_string('verrou', 'referentiel') . "</th>\n";
                     $s2 .= "<th class='referentiel'>" . get_string('evaluation', 'referentiel') . "</th>\n";
                     $nbchamps += 2;
                 }
                 if ($this->certificat_sel_param->certificat_sel_commentaire) {
                     $s2 .= "<th class='referentiel'>" . get_string('commentaire', 'referentiel') . "</th>\n";
                     $s2 .= "<th class='referentiel'>" . get_string('synthese', 'referentiel') . "</th>\n";
                     $nbchamps += 2;
                 }
                 if ($this->certificat_sel_param->certificat_sel_activite_competences) {
                     $s2 .= "<th class='referentiel'>" . get_string('competences_declare', 'referentiel') . "</th>\n";
                     $nbchamps++;
                 }
                 if ($this->certificat_sel_param->certificat_sel_certificat_competences) {
                     $s2 .= "<th class='referentiel'>" . get_string('competences_certificat', 'referentiel') . "</th>\n";
                     $nbchamps++;
                 }
                 $s1 .= "<!-- certification : {$record->id}  -->\n";
                 $s1 .= "<table class='referentiel'>\n";
                 $s1 .= $this->write_etudiant($record_etudiant, $nbchamps);
                 $s1 .= "<tr class='referentiel'><td class='referentiel' colspan='" . $nbchamps . "'><b>" . get_string('certificat', 'referentiel') . "</b></td></tr>\n";
                 $s1 .= "<tr class='referentiel'>\n</tr>\n";
                 $s1 .= $s2;
                 $s1 .= "</tr>\n";
//.........这里部分代码省略.........
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:101,代码来源:print.php

示例14: referentiel_liste_activite

function referentiel_liste_activite($record_a, $classcolor)
{
    global $CFG;
    $s = "";
    if ($record_a) {
        $activite_id = $record_a->id;
        $type_activite = stripslashes($record_a->type_activite);
        $description_activite = stripslashes($record_a->description_activite);
        $competences_activite = $record_a->competences_activite;
        $commentaire_activite = stripslashes($record_a->commentaire_activite);
        $ref_instance = $record_a->ref_instance;
        $ref_referentiel = $record_a->ref_referentiel;
        $ref_course = $record_a->ref_course;
        $userid = $record_a->userid;
        $teacherid = $record_a->teacherid;
        $date_creation = $record_a->date_creation;
        $date_modif_student = $record_a->date_modif_student;
        $date_modif = $record_a->date_modif;
        $approved = $record_a->approved;
        $ref_task = $record_a->ref_task;
        $user_info = referentiel_get_user_info($userid);
        $teacher_info = referentiel_get_user_info($teacherid);
        // dates
        if ($date_creation != 0) {
            $date_creation_info = userdate($date_creation);
        } else {
            $date_creation_info = '';
        }
        if ($date_modif != 0) {
            $date_modif_info = userdate($date_modif);
        } else {
            $date_modif_info = '';
        }
        if ($date_modif_student == 0) {
            $date_modif_student = $date_creation;
        }
        if ($date_modif_student != 0) {
            $date_modif_student_info = userdate($date_modif_student);
        } else {
            $date_modif_student_info = '';
        }
        $s .= "\n" . '<div class="activite_' . $classcolor . '">';
        $s .= ' <a href="' . $CFG->wwwroot . '/mod/referentiel/activite.php?d=' . $ref_instance . '&activite_id=' . $activite_id . '">' . get_string('activite', 'referentiel') . ' ' . $activite_id . '</a>' . "\n";
        $s .= ' <b>' . $type_activite . '</b> ';
        $s .= '<br />' . get_string('auteur', 'referentiel') . ' <b>' . $user_info . '</b> ';
        // MODIF JF 2012/05/06
        $group_info = referentiel_liste_groupes_user($ref_course, $userid);
        if (!empty($group_info)) {
            $s .= ' (' . $group_info . ') ';
        }
        $s .= ' (<i>' . get_string('date_modif_student', 'referentiel') . ' ' . $date_modif_student_info . '</i>) ';
        if (!empty($competences_activite)) {
            $s .= '<br />';
            $s .= get_string('competences', 'referentiel') . ' ';
            $s .= ' ' . referentiel_affiche_liste_codes_competence('/', $competences_activite, $ref_referentiel);
        }
        if (!empty($description_activite)) {
            $s .= '<br />';
            $s .= get_string('description', 'referentiel') . '<i><span class="small">';
            if (strlen($description_activite) > 1024) {
                $s .= substr(nl2br($description_activite), 0, 1024) . '(...)';
            } else {
                $s .= nl2br($description_activite);
            }
            $s .= '</span></i> ';
        }
        $s .= '<br />';
        if ($teacher_info) {
            $s .= get_string('referent', 'referentiel') . ' <b>' . $teacher_info . '</b>';
        } else {
            $s .= '<span class="alerte">' . get_string('pasdereferent', 'referentiel') . '</span>';
        }
        if ($date_modif_info) {
            $s .= ' (<i>';
            $s .= get_string('date_modif', 'referentiel') . ' ' . $date_modif_info;
            $s .= '</i>) ';
        }
        if ($commentaire_activite) {
            $s .= '<br />';
            $s .= '<i><span class="small">';
            if (strlen($commentaire_activite) > 1024) {
                $s .= substr(nl2br($commentaire_activite), 0, 1024) . '(...)';
            } else {
                $s .= nl2br($commentaire_activite);
            }
            $s .= '</i></span>' . "\n";
        }
        $s .= '</div>' . "\n";
    }
    return $s;
}
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:91,代码来源:liste_activites.php

示例15: write_task

 /**
  * Turns task into an xml segment
  * @param task object
  * @return string xml segment
  */
 function write_task($task)
 {
     global $CFG;
     // initial string;
     $expout = "";
     // add comment
     if ($task) {
         // DEBUG
         // echo "<br />\n";
         // print_r($task);
         $id = $task->id;
         $type_task = trim($task->type_task);
         $description_task = trim($task->description_task);
         $competences_task = trim($task->competences_task);
         $criteres_evaluation = trim($task->criteres_evaluation);
         $ref_instance = $task->ref_instance;
         $ref_referentiel = $task->ref_referentiel;
         $ref_course = $task->ref_course;
         $auteurid = trim($task->auteurid);
         $date_creation = $task->date_creation;
         $date_modif = $task->date_modif;
         $date_debut = $task->date_debut;
         $date_fin = $task->date_fin;
         $expout .= "\n\n<!-- task: {$task->id}  -->\n";
         $expout .= "<table class='competence'>\n";
         $expout .= "<tr>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('id', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('type_task', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('description', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('competences', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('criteres_evaluation', 'referentiel') . "</b></th>\n";
         // $expout .= "    <th class=\"competence\"><b>".get_string('instance','referentiel')."</b></th>\n";
         // $expout .= "    <th class=\"competence\"><b>".get_string('referentiel','referentiel')."</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('course') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('auteur', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('date_creation', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('date_modif', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('date_debut', 'referentiel') . "</b></th>\n";
         $expout .= "    <th class=\"competence\"><b>" . get_string('date_fin', 'referentiel') . "</b></th>\n";
         $expout .= "</tr>\n";
         $expout .= "<tr>\n";
         $expout .= "<td class=\"competence\"> {$id}</td>\n";
         $expout .= "<td class=\"competence\"> {$type_task}</td>\n";
         $expout .= "<td class=\"competence\"> {$description_task}</td>\n";
         $expout .= "<td class=\"competence\"> {$competences_task}</td>\n";
         $expout .= "<td class=\"competence\"> {$criteres_evaluation}</td>\n";
         /*
                     $expout .= "<td class=\"competence\"> $ref_instance</td>\n";
                     $expout .= "<td class=\"competence\"> $ref_referentiel</td>\n";
         */
         $expout .= "<td class=\"competence\">" . referentiel_get_course_link($ref_course, true) . "</td>\n";
         $expout .= "<td class=\"competence\">" . referentiel_get_user_info($auteurid) . "</td>\n";
         $expout .= "<td class=\"competence\">" . date("Y-m-d H:i:s", $date_creation) . "</td>\n";
         $expout .= "<td class=\"competence\">" . date("Y-m-d H:i:s", $date_modif) . "</td>\n";
         $expout .= "<td class=\"competence\">" . date("Y-m-d H:i:s", $date_debut) . "</td>\n";
         $expout .= "<td class=\"competence\">" . date("Y-m-d H:i:s", $date_fin) . "</td>\n";
         $expout .= "</tr>\n";
         $expout .= "</table>\n";
         // consigneS
         $records_consignes = referentiel_get_consignes($task->id);
         if ($records_consignes) {
             // DEBUG
             // echo "<br/>DEBUG :: ITEMS <br />\n";
             // print_r($records_consignes);
             $expout .= "<table class='item'>\n";
             $expout .= "   <tr>\n";
             $expout .= "     <th class=\"item\"><b>" . get_string('type_consigne', 'referentiel') . "</b></th>\n";
             $expout .= "     <th class=\"item\"><b>" . get_string('description', 'referentiel') . "</b></th>\n";
             $expout .= "     <th class=\"item\"><b>" . get_string('url', 'referentiel') . "</b></th>\n";
             $expout .= "     <th class=\"item\"><b>" . get_string('task', 'referentiel') . "</b></th>\n";
             $expout .= "   </tr>\n";
             foreach ($records_consignes as $record_d) {
                 $expout .= $this->write_consigne($record_d);
             }
             $expout .= "</table>\n";
         }
     }
     return $expout;
 }
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:84,代码来源:format.php


注:本文中的referentiel_get_user_info函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。