Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27353

notice of deprecation of ereg() while editing embedded cloze type question

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1
    • 2.0.2
    • Quiz
    • None
    • PHP Version 5.3.2-1ubuntu4.8
      System Linux aparup 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64
      Build Date Apr 27 2011 05:26:29
      Server API Apache 2.0 Handler
    • MOODLE_20_STABLE
    • MOODLE_21_STABLE
    • Hide

      1) create cloze question, use described question text and see that notice doesn't appear.

      Show
      1) create cloze question, use described question text and see that notice doesn't appear.

      notice seen:
      Deprecated: Function ereg() is deprecated in /home/aparup/mcode/m20/mysql/moodle/question/type/numerical/questiontype.php on line 1014 Call Stack: 0.0008 837768 1.

      {main}

      () /home/aparup/mcode/m20/mysql/moodle/question/question.php:0 0.4790 60071160 2. embedded_cloze_qtype->save_question() /home/aparup/mcode/m20/mysql/moodle/question/question.php:251 0.4818 60181848 3. default_questiontype->save_question() /home/aparup/mcode/m20/mysql/moodle/question/type/multianswer/questiontype.php:174 0.4944 60326800 4. embedded_cloze_qtype->save_question_options() /home/aparup/mcode/m20/mysql/moodle/question/type/questiontype.php:384 0.5132 60435832 5. default_questiontype->save_question() /home/aparup/mcode/m20/mysql/moodle/question/type/multianswer/questiontype.php:133 0.5150 60438064 6. question_numerical_qtype->save_question_options() /home/aparup/mcode/m20/mysql/moodle/question/type/questiontype.php:384 0.5180 60471992 7. question_numerical_qtype->apply_unit() /home/aparup/mcode/m20/mysql/moodle/question/type/numerical/questiontype.php:186

      seen briefly when using example 2 from http://docs.moodle.org/en/question/type/multianswer as question text :-
      "
      This question consists of some text with an answer embedded right here

      {1:MULTICHOICE:Wrong answer#Feedback for this wrong answer~Another wrong answer#Feedback for the other wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}

      and right after that you will have to deal with this short answer

      {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}

      and finally we have a floating point number

      {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8~%50%23.8:2#Feedback for half credit answer in the nearby region of the correct answer}

      .
      The multichoice question can also be shown in the vertical display of the standard moodle multiple choice.

      {2:MCV:1. Wrong answer#Feedback for this wrong answer~2. Another wrong answer#Feedback for the other wrong answer~=3. Correct answer#Feedback for correct answer~%50%4. Answer that gives half the credit#Feedback for half credit answer}

      Or in an horizontal display that is included here in a table

      {2:MCH:a. Wrong answer#Feedback for this wrong answer~b. Another wrong answer#Feedback for the other wrong answer~=c. Correct answer#Feedback for correct answer~%50%d. Answer that gives half the credit#Feedback for half credit answer}

      A shortanswer question where case must match. Write moodle in upper case letters

      {1:SHORTANSWER_C:moodle#Feedback for moodle in lower case ~=MOODLE#Feedback for MOODLE in upper case ~%50%Moodle#Feedback for only first letter in upper case}

      Note that addresses like www.moodle.org and smileys all work as normal:
      a) How good is this? {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}
      b) What grade would you give it?

      {3:NUMERICAL:=3:2}

      "

            timhunt Tim Hunt
            nebgor Aparup Banerjee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.