Moodle

Approved courses ignore default category setting

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: Administration
  • Labels:
    None
  • Environment:
    any
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

To recreate:

Enable courses requests.
Select default category other then miscellaneous
Teacher requests course
Administrator approves
Course settings, Category drop down defaults to Miscellaneous.

Activity

Hide
Dan Poltawski added a comment -

This is also causing major breakage in permisison in 1.9.. fixing..

Show
Dan Poltawski added a comment - This is also causing major breakage in permisison in 1.9.. fixing..
Hide
Dan Poltawski added a comment -

e.g.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 1' at line 3

SELECT MIN(visible) FROM course_categories WHERE id IN ()

  • line 686 of lib/dmllib.php: call to debugging()
  • line 1112 of lib/dmllib.php: call to get_recordset_sql()
  • line 2108 of lib/datalib.php: call to get_field_sql()
  • line 1904 of lib/moodlelib.php: call to course_parent_visible()
  • line 25 of course/edit.php: call to require_login()

Notice: Trying to get property of non-object in /var/www/moodle/course/edit_form.php on line 16
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 100' at line 5

SELECT ctx.path, ctx.depth FROM context ctx JOIN course_categories cc ON (cc.parent=ctx.instanceid AND ctx.contextlevel=40) WHERE cc.id=

  • line 686 of lib/dmllib.php: call to debugging()
  • line 481 of lib/dmllib.php: call to get_recordset_sql()
  • line 2128 of lib/accesslib.php: call to get_record_sql()
  • line 2520 of lib/accesslib.php: call to create_context()
  • line 16 of course/edit_form.php: call to get_context_instance()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()

Error: could not insert new context level "40", instance "".

  • line 2245 of lib/accesslib.php: call to debugging()
  • line 2520 of lib/accesslib.php: call to create_context()
  • line 16 of course/edit_form.php: call to get_context_instance()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()

Incorrect context specified

  • line 326 of lib/accesslib.php: call to debugging()
  • line 49 of course/edit_form.php: call to has_capability()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()
Show
Dan Poltawski added a comment - e.g. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 1' at line 3 SELECT MIN(visible) FROM course_categories WHERE id IN ()
  • line 686 of lib/dmllib.php: call to debugging()
  • line 1112 of lib/dmllib.php: call to get_recordset_sql()
  • line 2108 of lib/datalib.php: call to get_field_sql()
  • line 1904 of lib/moodlelib.php: call to course_parent_visible()
  • line 25 of course/edit.php: call to require_login()
Notice: Trying to get property of non-object in /var/www/moodle/course/edit_form.php on line 16 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 100' at line 5 SELECT ctx.path, ctx.depth FROM context ctx JOIN course_categories cc ON (cc.parent=ctx.instanceid AND ctx.contextlevel=40) WHERE cc.id=
  • line 686 of lib/dmllib.php: call to debugging()
  • line 481 of lib/dmllib.php: call to get_recordset_sql()
  • line 2128 of lib/accesslib.php: call to get_record_sql()
  • line 2520 of lib/accesslib.php: call to create_context()
  • line 16 of course/edit_form.php: call to get_context_instance()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()
Error: could not insert new context level "40", instance "".
  • line 2245 of lib/accesslib.php: call to debugging()
  • line 2520 of lib/accesslib.php: call to create_context()
  • line 16 of course/edit_form.php: call to get_context_instance()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()
Incorrect context specified
  • line 326 of lib/accesslib.php: call to debugging()
  • line 49 of course/edit_form.php: call to has_capability()
  • line 120 of lib/formslib.php: call to course_edit_form->definition()
  • line 68 of course/edit.php: call to moodleform->moodleform()
Hide
Dan Poltawski added a comment -

Thanks for the report, I've fixed this in CVS

Show
Dan Poltawski added a comment - Thanks for the report, I've fixed this in CVS
Hide
Ray Lawrence added a comment -

Cheers!

Show
Ray Lawrence added a comment - Cheers!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: