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

enrol_database and enrol_ldap should use the api function for discovering default category

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Trivial Trivial
    • None
    • 2.7
    • Course, Enrolments
    • MOODLE_27_STABLE

      They are both doing code like this themselves:

       if (!$DB->record_exists('course_categories', array('id'=>$defaultcategory))) {
                  $trace->output("default course category does not exist!", 1);
                  $categories = $DB->get_records('course_categories', array(), 'sortorder', 'id', 0, 1);
                  $first = reset($categories);
                  $defaultcategory = $first->id;
              }
      

      Instead they should use coursecat::get_default()

            Unassigned Unassigned
            poltawski Dan Poltawski
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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