Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 14... Línea 14...
14
// You should have received a copy of the GNU General Public License
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/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
Línea -... Línea 17...
-
 
17
namespace qbank_history;
17
namespace qbank_history;
18
 
Línea 18... Línea 19...
18
 
19
use core_question\local\bank\filter_condition_manager;
19
use core_question\local\bank\question_action_base;
20
use core_question\local\bank\question_action_base;
20
 
21
 
Línea 47... Línea 48...
47
            // We cannot do most actions on them, because that leads to errors.
48
            // We cannot do most actions on them, because that leads to errors.
48
            return [null, null, null];
49
            return [null, null, null];
49
        }
50
        }
Línea 50... Línea 51...
50
 
51
 
-
 
52
        if (question_has_capability_on($question, 'use')) {
-
 
53
            $currentfilter = $this->qbank->base_url()->param('filter');
-
 
54
            if ($currentfilter) {
-
 
55
                $currentfilter = filter_condition_manager::update_filter_param_to_category(
-
 
56
                    $currentfilter, $question->categoryid);
-
 
57
            } else if (empty($question->isdummy)) {
-
 
58
                $currentfilter = json_encode(filter_condition_manager::get_default_filter(
-
 
59
                    $question->categoryid . ',' . $question->contextid));
-
 
60
            }
51
        if (question_has_capability_on($question, 'use')) {
61
 
52
            $url = helper::question_history_url(
62
            $url = helper::get_question_history_url(
53
                $question->questionbankentryid,
63
                $question->questionbankentryid,
54
                $this->qbank->returnurl,
64
                $this->qbank->returnurl,
55
                $this->qbank->course->id,
65
                $this->qbank->cm->id,
56
                $this->qbank->base_url()->param('filter'),
66
                $currentfilter,
57
            );
67
            );
58
            return [$url, 't/log', $this->strpreview];
68
            return [$url, 't/log', $this->strpreview];
Línea 59... Línea 69...
59
        }
69
        }