9 Commits

Author SHA1 Message Date
Marina Glancy
89b909f6de MDL-57769 course: prepare to remove numsections option 2017-03-30 08:26:12 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Marina Glancy
bb01883867 MDL-10405 course: auto delete sections when numsections changed 2015-02-09 16:46:19 +08:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
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