Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-7932

Instance removing issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.5.7
    • None
    • MOODLE_35_STABLE

      cron.php returns error:

      Adhoc task failed: core_course\task\course_delete_modules,Coding error detected, it must be fixed by a programmer: The course module XXX could not be deleted.

       

      The error appears when the course recycle bin is enabled.
      The first issue appears in bigbluebutonbn because of lack of returned value in bigbluebuttonbn_delete_instance_log() in mod/bigbluebuttonbn/lib.php.

      function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn)

      { global $DB; $sql = "SELECT * FROM \{bigbluebuttonbn_logs}

      ";
      $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
      $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
      $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
      return bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);//!!!!!!!!!!
      }
      'Return' should be added to prevent the issue in course_delete_module() in course/lib.php:
      ...

                  //bigbluebuttonbn_delete_instance()
      if (!$deleteinstancefunction($cm->instance)) { 
      throw new moodle_exception('cannotdeletemoduleinstance', {{, }}, null,
      "Cannot delete the module $modulename (instance).");
      }
      ...

      If the issue appeared once it cause the repeated issue in the cron.

      In DB it looks like:

      • No record in mdl_bigbluebuttonbn,
      • Kept record in mdl_course_modules

            jfederico Jesus Federico
            pfranks Enovation Solutions
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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