Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Questions
    • Labels:
      None
    • Testing Instructions:
      Hide

      The main thing to test is that this change does not break question import/export, either in the question bank or the lesson.

      (But note MDL-27797 which I found when I tested this.)

      Show
      The main thing to test is that this change does not break question import/export, either in the question bank or the lesson. (But note MDL-27797 which I found when I tested this.)
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      1/ globals in library files are very strongly discouraged - please use functions instead
      2/ in is not acceptable to place initialisation code into library file with PHP functions
      3/ the define("RANDOM", "random"); should have some prefix - I know no other library or module is dumb enough to do this, but it is not nice a all to have this in core code
      4/ question_register_questiontype(new question_calculated_qtype()); in the middle of function definitions is horrible - we have real plugin infrastructure in place now, there is no need to do things like this any more
      5/ the names of plugins should be always in language packs - preferable $string['pluginname'] in the corresponding lang pack - hardcoding them in get_name() is ugly
      6/ the name of the question type classes should start with qtype_xxxx and qformat_yyyy for question formats - not sure is it is not too late this
      7/ all functions in questionlib.php shoudl have prefix question (ex.:get_grade_options(), delete_attempt()) - we have only one global scope, with should not pollute it with such general function names
      8/ etc.

      The main problem here is that the whole structure of questions subsystem is very non-standard - now is the only time to fix things, we will not be able to break BC and fix sloppy designs of API in the next 10 years

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Jul/11