4 Commits

Author SHA1 Message Date
Marina Glancy
850acb3560 MDL-35768 MDL-36017 Avoid calling format_base::get_course() when not necessary
- If we want to check fields 'numsections' or 'hiddensections' call course_get_format()->get_format_options()
- We still use extended course object in course/edit.php, update_course(), create_course(), and inside course formats
2012-11-05 11:22:06 +08:00
Marina Glancy
b5cf83f080 MDL-36017 Fields numsections, hiddensections and coursedisplay are now format-specific options
- Fields added to format_legacy as default course format options;
- Upgrade script copies fields values from table course to course_format_options;
- Fields removed from table course;
- Fields removed from edit course form;
- Since front-page course has a 'numsections' setting, format_site defines it as it's option;
- Removed accessing those fields in core code unless we know that format supports them and in this
  case instead of $course = $DB->get_record('course'); we use:
  $course = course_get_format($courseorid)->get_course(); This way all format-specific options
  are added to the $course object
2012-11-02 10:56:19 +08:00
Dan Poltawski
54495fe41d MDL-33375 course: set anchor after changing sections
So scrolling isn't required
2012-05-28 14:44:23 +08:00
Dan Poltawski
3a35a9ff8b MDL-32771 - course: add ability to increase/reduce number of sections
* addsection.php is renamed to changenumsections.php to reflect new purpose
* The add button is changed to a +- toggle rahter than big 'add section'
2012-05-08 15:00:46 +08:00