moosh icon indicating copy to clipboard operation
moosh copied to clipboard

question_edit_contexts not found error

Open heuristican opened this issue 7 years ago • 1 comments

  • moosh version: 0.29
  • moodle version: 3.6.2
    • database: MariaDb
  • php version: 7.2.7
  • operating system: Windows Server 2016

Actual behaviour

!!! Exception - Class 'Moosh\Command\Moodle26\Question\question_edit_contexts' not found !!!

Expected behaviour

Questions in the xml file to be added under a quiz

Steps to reproduce

c:\inetpub\wwwroot\lms>php C:\Windows\System32\moosh\moosh.php -n question-import "questions.xml" 3

Attached txt file contains the content of the file used in the command. File is generated by question bank export feature of another Moodle instance. This file structure may not be suitable for this command but it seems the problem is not related to the file.

questions.txt

heuristican avatar Apr 05 '19 14:04 heuristican

This still happens with the latest Moosh version 0.3. Here's more detail on the error:

/var/www/html# moosh -n question-import ./blocks/integrityadvocate/tests/fixtures/questions.xml 1
!!! Exception - Class 'Moosh\Command\Moodle26\Question\question_edit_contexts' not found !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 40 of /moosh/Moosh/Command/Moodle26/Question/QuestionImport.php: Error thrown
* line 351 of /moosh/moosh.php: call to Moosh\Command\Moodle26\Question\QuestionImport->execute()
!!
/var/www/html# fgrep -ir question_edit_contexts moosh/*
moosh/Moosh/Command/Moodle26/Question/QuestionImport.php:        $contexts = new question_edit_contexts($quizcontext);
/var/www/html# fgrep -ir edit_contexts moosh/*
moosh/Moosh/Command/Moodle26/Question/QuestionImport.php:        $contexts = new question_edit_contexts($quizcontext);

mwithheld avatar Feb 07 '20 06:02 mwithheld