Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Undefined array key "text" with Moodle 4.4 #12

Open
leonstr opened this issue Jul 18, 2024 · 0 comments
Open

Warning: Undefined array key "text" with Moodle 4.4 #12

leonstr opened this issue Jul 18, 2024 · 0 comments

Comments

@leonstr
Copy link

leonstr commented Jul 18, 2024

Steps to reproduce issue

  1. Install plugin set, create course, go to course's question bank.
  2. Click Create a new question ..., select Variable numeric set with units and click Add.
  3. Set:
  4. Question name.
  5. Question text.
  6. Answer 1:
    1. 15, +/-: 1, Grade: 100%
  7. Unit 1:
    1. match('cm')
    2. Grade: 100%
  8. Click Save changes.

Expected results

The question is saved.

Actual results

Whoops\Exception\ErrorException thrown with message "Undefined array key "text""

Stacktrace:
#4 Whoops\Exception\ErrorException in /var/www/moodle/question/type/varnumunit/questiontype.php:121
#3 default_error_handler in /var/www/moodle/question/type/varnumunit/questiontype.php:121
#2 qtype_varnumunit:save_units in /var/www/moodle/question/type/varnumunit/questiontype.php:205
#1 qtype_varnumunit:save_question_options in /var/www/moodle/question/type/questiontypebase.php:538
#0 question_type:save_question in /var/www/moodle/question/bank/editquestion/question.php:294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant