justinhunt / moodle-filter_poodll

The PoodLL Filter
6 stars 17 forks source link

in 2.8.7 assigning grades to activities while not subscribed to Poodll #27

Open dustinbrisebois opened 7 years ago

dustinbrisebois commented 7 years ago

When attempting to assign a grade to an Assignment in an LMS site where Poodll is installed but not subscribed to site errors out with:

Notice: Undefined property: stdClass::$filter_poodll_usecourseid in /var/www/data/default/lms/filter/poodll/classes/poodlltools.php on line 523 Skip to main content

The line of code:

  if ($CFG->filter_poodll_usecourseid) {
      $courseid = $COURSE->id;
  } else {
      $courseid = -1;
  }

Assumes poodll services are available -- this should be caught either with an isset($CFG->filter_poodll_usecourseid) or some other logic check in the workflow.

The grade is assigned once the error is accepted.

justinhunt commented 7 years ago

Indeed. Its redundant really anyway that section. Thanks for the report, I will see what I can do. It won't be for a few days though.

J