Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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 mod_quiz\question;
18
 
19
/**
20
 * A {@see qubaid_condition} for finding all the question usages belonging to a particular user and quiz combination.
21
 *
22
 * @package   mod_quiz
23
 * @category  question
24
 * @copyright 2018 Andrew Nicols <andrwe@nicols.co.uk>
25
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 * @deprecated This class was never needed because qubaids_for_users_attempts already existed and is more flexible.
27
 */
28
class qubaids_for_quiz_user extends qubaids_for_users_attempts {
29
    /**
30
     * Constructor.
31
     *
32
     * @param int $quizid The quiz to search.
33
     * @param int $userid The user to filter on
34
     * @param bool $includepreviews Whether to include preview attempts
35
     * @param bool $onlyfinished Whether to only include finished attempts or not
36
     */
37
    public function __construct(int $quizid, int $userid,
38
            bool $includepreviews = true, bool $onlyfinished = false) {
39
        debugging('qubaids_for_quiz_user is deprecated. Please use qubaids_for_users_attempts instead.');
40
        parent::__construct($quizid, $userid,
41
                $onlyfinished ? 'finished' : 'all', $includepreviews);
42
    }
43
}