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

Undefined property: stdClass::$gradepointdefault when initialising PHPUnit

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 3.0
    • None
    • Gradebook, Unit tests

    Description

      On Moodle 3.0+ (Build: 20151209), version 2015111600.04 if you initialise PHPUnit (on Windows) with:

      php admin\tool\phpunit\cli\init.php
      

      then you get the following error:

      PHP Notice:  Undefined property: stdClass::$gradepointdefault in F:\moodledev\moodle30\lib\grade\grade_item.php on line 270
      

      looking at the line it has:

      self::set_properties($this, array('grademax' => $CFG->gradepointdefault));
      

      This is not defined in the $CFG global or is it mentioned in config-dist.php. If it would is auto generated when installing then for those who upgrade and copy their config.php file there is no indication about adding it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gb2048 Gareth J Barnard
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: