if ($okbareme) {
                    $competences_bareme = referentiel_get_competences_activite($activite_id, $bareme->id);
                    $str_a_evaluer = referentiel_affiche_liste_codes_competence('/', $competences_activite, $referentiel_referentiel->id) . "\n";
                    if (!empty($str_a_evaluer)) {
                        echo '<br /><span class="bold">' . get_string('liste_competence_cochees', 'referentiel') . '</span> ' . "\n" . " " . $str_a_evaluer;
                    }
                    // echo '<br />'."\n";
                    //echo '<div class="error">'."\n";
                    // modification
                    referentiel_modifier_evaluation_codes_item($bareme, $referentiel_referentiel->id, $competences_activite, $competences_bareme, false, $activite_id);
                    //echo '</div>'."\n";
                } else {
                    if (empty($CFG->referentiel_hierarchy)) {
                        echo referentiel_modifier_selection_liste_codes_item_competence('/', $liste_codes_competence, $competences_activite, $activite_id);
                    } else {
                        echo referentiel_modifier_selection_codes_item_hierarchique($referentiel_referentiel->id, $competences_activite, true);
                    }
                }
            }
            echo '</div>' . "\n";
        }
        if (has_capability('mod/referentiel:comment', $context)) {
            ?>
<span class="bold"><?php 
            print_string('commentaire', 'referentiel');
            ?>
</span>
<br />
<textarea cols="100" rows="10" name="commentaire_activite"><?php 
            p($commentaire_activite);
            ?>
                    ?>
</textarea>
    </td>
</tr>
<tr valign="top">
    <td align="right">
    	<b><?php 
                    print_string('aide_saisie_competences', 'referentiel');
                    ?>
:</b></td>
    <td align="left" colspan="3">
<?php 
                    if (!referentiel_hierarchical_display($referentiel->id)) {
                        echo referentiel_modifier_selection_liste_codes_item_competence('/', $liste_codes_competence, $competences_task);
                    } else {
                        referentiel_modifier_selection_codes_item_hierarchique($referentiel_referentiel->id, $competences_task, false);
                    }
                    ?>
    </td>
</tr>
<tr valign="top">
    <td align="right">
    	<b><?php 
                    print_string('criteres_evaluation', 'referentiel');
                    ?>
:</b>
    	</td>
    <td align="left" colspan="3">
<textarea cols="80" rows="8" name="criteres_evaluation"><?php 
                    p($criteres_evaluation);
                    ?>