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

apsolu / local_apsolu / 19634351883

24 Nov 2025 11:49AM UTC coverage: 9.346% (-0.04%) from 9.384%
19634351883

push

github

jboulen
feat(export): implémente la possibilité de sélectionner la liste des champs additionnels à afficher sur certaines vues

0 of 21 new or added lines in 2 files covered. (0.0%)

22 existing lines in 3 files now uncovered.

559 of 5981 relevant lines covered (9.35%)

0.23 hits per line

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

0.0
/classes/event/update_user_payment.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\event;
18

19
use moodle_url;
20

21
/**
22
 * Event to log payment.
23
 *
24
 * @package    local_apsolu
25
 * @copyright  2016 Université Rennes 2 <dsi-contact@univ-rennes2.fr>
26
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 */
28
class update_user_payment extends \core\event\base {
29
    /**
30
     * Initialise l'évènement.
31
     *
32
     * @return void
33
     */
34
    protected function init() {
35
        // Values: c (create), r (read), u (update) or d (delete).
UNCOV
36
        $this->data['crud'] = 'u';
×
37

38
        // Values: LEVEL_TEACHING, LEVEL_PARTICIPATING or LEVEL_OTHER.
UNCOV
39
        $this->data['edulevel'] = self::LEVEL_OTHER;
×
40
    }
41

42
    /**
43
     * Retourne le nom de l'évènement.
44
     *
45
     * @return string
46
     */
47
    public static function get_name() {
UNCOV
48
        return get_string('payment_updated', 'local_apsolu');
×
49
    }
50

51
    /**
52
     * Retourne la description de l'évènement.
53
     *
54
     * @return string
55
     */
56
    public function get_description() {
57
        $paymentid = '';
×
UNCOV
58
        if (isset($this->other->paymentid) === true) {
×
UNCOV
59
            $paymentid = $this->other->paymentid;
×
UNCOV
60
        } else if (isset($this->other->payment->id) === true) {
×
UNCOV
61
            $paymentid = $this->other->payment->id;
×
62
        }
63

UNCOV
64
        if (isset($this->other->items) === false || is_array($this->other->items) === false) {
×
UNCOV
65
            $this->other->items = [];
×
66
        }
67

UNCOV
68
        $description = 'The user with id #' . $this->userid . ' updated the payment for the user with id #' . $this->relateduserid .
×
UNCOV
69
           ' (paymentid: ' . $paymentid . ', cards: ' . implode(', ', $this->other->items) . ').';
×
70

UNCOV
71
        return $description;
×
72
    }
73

74
    /**
75
     * Retourne l'url liée à l'évènement.
76
     *
77
     * @return moodle_url
78
     */
79
    public function get_url() {
UNCOV
80
        return new moodle_url('/local/apsolu/payment/admin.php', ['tab' => 'payments', 'userid' => $this->relateduserid]);
×
81
    }
82
}
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