• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apsolu / local_apsolu / 14858536449

05 May 2025 02:31PM UTC coverage: 10.418% (-0.01%) from 10.429%
14858536449

push

github

jboulen
feat(notification): autorise les gestionnaires à rendre obligatoire la mise en copie du contact fonctionnel sur les formulaires de notification

0 of 5 new or added lines in 1 file covered. (0.0%)

31 existing lines in 2 files now uncovered.

519 of 4982 relevant lines covered (10.42%)

0.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/classes/core/messaging.php
1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16

17
namespace local_apsolu\core;
18

19
/**
20
 * Classe gérant les options de messagerie.
21
 *
22
 * @package    local_apsolu
23
 * @copyright  2022 Université Rennes 2 <dsi-contact@univ-rennes2.fr>
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 */
26
class messaging {
27
    /**
28
     * Option pour exprimer le "non".
29
     */
30
    const DEFAULT_NO = '0';
31

32
    /**
33
     * Option pour exprimer le "oui".
34
     */
35
    const DEFAULT_YES = '1';
36

37
    /**
38
     * Option pour exprimer le "toujours".
39
     */
40
    const DEFAULT_ALWAYS = '-1';
41

42
    /**
43
     * Option désactivant l'adresse de réponse.
44
     */
45
    const DISABLE_REPLYTO_ADDRESS = '0';
46

47
    /**
48
     * Option forçant l'utilisation de l'adresse de réponse.
49
     */
50
    const FORCE_REPLYTO_ADDRESS = '1';
51

52
    /**
53
     * Option laissant le choix à l'enseignant d'utiliser ou non l'adresse de réponse.
54
     */
55
    const ALLOW_REPLYTO_ADDRESS_CHOICE = '2';
56

57
    /**
58
     * Option permettant de choisir par défautdésactivant l'adresse de réponse.
59
     */
60
    const DO_NOT_USE_REPLYTO_ADDRESS = '0';
61

62
    /**
63
     * Option forçant l'utilisation de l'adresse de réponse.
64
     */
65
    const USE_REPLYTO_ADDRESS = '1';
66

67
    /**
68
     * Retourne la liste des options possible dans le choix de mise en copie de l'adresse de contact fonctionnel.
69
     *
70
     * @return array
71
     */
72
    public static function get_functional_contact_options() {
NEW
73
        $options = [];
×
NEW
74
        $options[self::DEFAULT_NO] = get_string('no');
×
NEW
75
        $options[self::DEFAULT_YES] = get_string('yes');
×
NEW
76
        $options[self::DEFAULT_ALWAYS] = get_string('always');
×
77

NEW
78
        return $options;
×
79
    }
80

81
    /**
82
     * Retourne la liste des options possible dans le choix d'adresse de réponse.
83
     *
84
     * @return array
85
     */
86
    public static function get_replyto_options() {
87
        $options = [];
×
88
        $options[self::DISABLE_REPLYTO_ADDRESS] = get_string('disable_replyto', 'local_apsolu');
×
89
        $options[self::FORCE_REPLYTO_ADDRESS] = get_string('force_replyto', 'local_apsolu');
×
90
        $options[self::ALLOW_REPLYTO_ADDRESS_CHOICE] = get_string('allow_to_choose_or_not_a_replyto_address', 'local_apsolu');
×
91

92
        return $options;
×
93
    }
94

95
    /**
96
     * Retourne la liste des options possible dans le choix par défaut d'adresse de réponse.
97
     *
98
     * @return array
99
     */
100
    public static function get_default_replyto_options() {
101
        $options = [];
×
102
        $options[self::DO_NOT_USE_REPLYTO_ADDRESS] = get_string('do_not_use_replyto_address', 'local_apsolu');
×
103
        $options[self::USE_REPLYTO_ADDRESS] = get_string('use_replyto_address', 'local_apsolu');
×
104

105
        return $options;
×
106
    }
107
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc