200 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Ruslan Kabalin
f81d63553e MDL-33546: course: Fix current week hightlighting after dragging the section 2013-06-18 13:01:18 +10:00
David Monllao
af248633f5 MDL-40109 format_weeks: Removing extra space 2013-06-10 13:30:10 +08:00
Eloy Lafuente (stronk7)
aed9401e14 MDL-39764 style: phpdoc changed to inline comments 2013-06-04 01:41:58 +02:00
Gareth J Barnard
86f590b45f MDL-39764 course_format: Allow courses to have numsections > maxsections. 2013-06-03 23:36:32 +01:00
Eloy Lafuente (stronk7)
cedb0aab5a MDL-39434 Bump all versions near 2.5 release 2013-05-01 18:03:29 +02:00
Damyon Wiese
c2bb7f6007 MDL-38907 Course: Remove unused CSS causing jump menu to be center aligned. 2013-04-08 16:45:44 +08:00
Gareth J Barnard
dafa91279f MDL-37901 format_topics & format_weeks: Fix drag icon tooltip after move. 2013-03-02 12:38:29 +00:00
Dan Poltawski
6065652f24 Merge branch 'wip-MDL-37976-master' of git://github.com/marinaglancy/moodle 2013-02-12 16:13:48 +08:00
Marina Glancy
2333bfa7e8 MDL-37976 fixed missing global 2013-02-12 12:59:35 +11:00
Gareth J Barnard
cbddba1887 MDL_34798 format_topics and format_weeks: Adjust section names when moving up. 2013-02-11 13:43:42 +00:00
Eloy Lafuente (stronk7)
663dbbc2e6 MDL-36933 Bump everything to 2012112900
(versions, requires and dependencies)
2012-11-30 03:30:09 +01:00
Dan Poltawski
2c59d2ca8c Merge branch 'MDL-36550-master' of git://github.com/FMCorz/moodle 2012-11-27 10:36:59 +08:00
Frederic Massart
e40bd74620 MDL-36550 usability: CSS updates on course page 2012-11-26 17:00:29 +08:00
Adrian Greeve
341bfedf90 MDL-36795 - lib / administration: maxsections now limits the default setting for numsections.
In the default course settings, setting the maximum number topics / weeks  to 0 would not
change the default number of sections on the same page as any other number would.
A more appropriate check has been put in place.

This also incorporates a fix for MDL-28584. The course edit screen now also checks to see
if maxsections is set or numeric. If it is not set or numeric then it defaults to 52.
2012-11-26 14:41:50 +08:00
Dan Poltawski
21dfaa0133 Merge branch 'wip-MDL-35770-master' of git://github.com/marinaglancy/moodle 2012-11-15 13:51:07 +08:00
Marina Glancy
399ad6bf3b MDL-35770 Include file defining base class in order to work correctly in cron 2012-11-15 13:26:28 +08:00
Dan Poltawski
f315d159c8 Merge branch 'wip-MDL-35770-master' of git://github.com/marinaglancy/moodle
Conflicts:
	course/format/lib.php
2012-11-15 10:59:17 +08:00
Marina Glancy
081c8f7fe0 MDL-36594 Add function format_base::is_section_current()
- added function format_base::is_section_current()
- overwritten in format_weeks::is_section_current()
- deprecated function format_section_renderer_base::is_section_current()
2012-11-14 15:54:13 +08:00
Marina Glancy
1b2581f430 MDL-35770 Moved format_weeks_get_section_dates() to format_weeks::get_section_dates() 2012-11-14 14:31:07 +08:00
Marina Glancy
0f070867b8 MDL-35770 Converted weeks format to new course formats API 2012-11-14 13:58:40 +08:00
Marina Glancy
62a3f7ef46 MDL-35770 Created class format_weeks as copy of format_legacy 2012-11-14 13:58:34 +08:00
Frederic Massart
bb128107e3 MDL-36449 usability: Normalising icons on course page 2012-11-14 11:38:06 +08:00
Dan Poltawski
a353088f2c Merge branch 'wip-MDL-36342-master' of git://github.com/barbararamiro/moodle
Conflicts:
	theme/base/style/core.css
2012-11-06 14:48:22 +08:00
Barbara Ramiro
651f639ed0 MDL-36342 Usability: New icons for section in SVG and PNG formats 2012-11-05 23:43:02 +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
Marina Glancy
4ede27b253 MDL-35339 deprecate get_course_section() replace with course_create_sections_if_missing()
By passing course object instead of course id we ensure proper cache reset"
2012-10-15 14:08:14 +08:00
Marina Glancy
eda43c7d10 MDL-35339 Use get_fast_modinfo() in course sections display functions
- Avoid using field course_sections.sequence for retrieving the modules list, use functionality from
get_fast_modinfo() instead;
- In the following functions/methods mark arguments $mod, $modnames, $modnamesused and $sections as
  not used because they can be taken any time from get_fast_modinfo():
  - function print_section()
  - protected function format_section_renderer_base::section_summary()
  - private function format_section_renderer_base::section_activity_summary
  - public function format_section_renderer_base::print_single_section_page
  - public function format_section_renderer_base::print_multiple_section_page
2012-10-15 14:08:13 +08:00
Paul Nicholls
f32cdf71a6 MDL-35134: course/format/weeks: remove trailing comma in object definition
IE doesn't like trailing commas in object (or array) definitions, and will cease processing JavaScript when it hits one.
2012-08-30 11:31:35 +12:00
Dan Poltawski
1c1246ec28 MDL-34829 course - allow directly linked sections to work.
Even if not in single section mode.
2012-08-14 22:56:36 +02:00
Eloy Lafuente (stronk7)
c5e783e512 MDL-33794 version.php: Bump all versions, requires and dependencies to 2012061700 2012-06-18 02:37:00 +02:00
Tim Hunt
bb410a1ecc MDL-33681 course: cannot have a section called '0'.
No reason to prevent this. It is just a matter of doing a proper test,
rather than the sloppy PHP !empty().
2012-06-12 17:45:40 +01:00
Dan Poltawski
786cd60ee3 Merge branch 'MDL-32824-master-2' of git://git.luns.net.uk/moodle
Conflicts:
	course/format/weeks/format.js
	course/format/weeks/lib.php
2012-05-29 15:21:55 +08:00
Ruslan Kabalin
9f3015ecf8 MDL-32824: Make dragdrop work correctly with section titles/links
Initially, the default section title was swapped within the course format
javascript functions. Though some section titles may be custom and does not
require swapping, in addition they may have links to single section view. This
introduces some callback functions for define what needs to be done in
sections libs and js files.
2012-05-25 11:39:44 +01:00
Dan Poltawski
b6283a4970 MDL-33307 format_weeks - sort out week date display
* Introduce function format_weeks_get_section_dates which is used
  as the consistent place to calculate the current section start and
  end date

* Rework callback_weeks_get_section_name to not use the above function
  rather than do crazy needless looping through all sections to work
  out the current week title.

* Change the just introduced is_current renderer function to share
  the format_weeks_get_section_dates function to ensure both the title
  and 'current week' are using the same dates to do their job
2012-05-24 23:10:28 +08:00
Dan Poltawski
2ea6533a36 MDL-33307 format_weeks - highlight current week 2012-05-24 23:10:27 +08:00
Adrian Greeve
9ec5ee5168 MDL-33146 - course - Changed weekdates to sectionname to fix a JavaScript error 2012-05-23 16:13:32 +08:00
Ruslan Kabalin
405eaac272 MDL-32744: Maintain format specific CSS selectors in the format configuration.
This updates existing core formats and introduce a configuration function.
2012-05-21 13:53:04 +01:00
Ruslan Kabalin
a7d0e1fdb5 MDL-32742: Remove right div swapping
Swapping div.right is not required, as toolboxes determine section id on each toggle event.
2012-05-09 13:50:03 +01:00
Dan Poltawski
cbf449972f MDL-32508 course formats: make renderer methods protected
The renderer isn't a public API yet, its just reducing code duplication
and tidying things up. So not making the methods public for other plugins
to abuse. We hope to solve this properly in 2.4
2012-05-04 10:53:06 +08:00
Dan Poltawski
a8f02a3462 MDL-32508 course_formats: change format_renderer_base to format_section_renderer_base
Make it clear that this isn't a golden supported API
2012-05-04 10:53:05 +08:00
Dan Poltawski
1804b7c1bc MDL-32508 course/formats: Respect single page course display mode
Topics and weeks have been converted to use a shared renderer to output
their content.

Note, I started with good intentions but this renderer has mixed
paradgims due to fast and cheap winning out on the trinity.

AMOS BEGIN
   MOV [currenttopic,access],[currentsection,format_topics]
   MOV [currentweek,access],[currentsection,format_weeks]
AMOS END
2012-05-04 10:53:01 +08:00
Dan Poltawski
d9e1326536 MDL-32508 course: deprecate get_section_url format callback 2012-05-04 10:52:59 +08:00
Dan Poltawski
f755868314 MDL-32508 course formats: Remove key callback
This was used by course formats but now there is a standardised
'section' param
2012-05-04 10:52:59 +08:00
Dan Poltawski
45774bddf7 MDL-32508 course: Switch to 'section' URL param
This is a course format independent url param and replaces weekly/topic specific params.
By using a standardised param we are able to use this url consistenly across the codebase
and reduce the risk of param collision
2012-05-04 10:52:58 +08:00
Dan Poltawski
3fe600aacf MDL-32505 course formats: zooming feature be gone! 2012-05-04 10:52:57 +08:00
Dan Poltawski
b9bcdb54da MDL-32505 course: drop course_display table and settings 2012-05-04 10:52:56 +08:00
Ruslan Kabalin
c77582fe42 MDL-32657: course dragdrop: define elements changes within the format
It allows to define M.course.format.swap_sections and
M.course.format.get_section_selector in the course format javascript file, so
that course dragdrop is aware about perculiar layout and changes that need to
be done when sections are swapped.
2012-04-27 15:01:02 +01:00
Ruslan Kabalin
15e2552f00 MDL-31216 Create dragdrop course module 2012-04-23 21:28:39 +01:00
Andrew Robert Nicols
ebaa29d107 MDL-31096 Convert course resource/section javascript to YUI3 Module
AMOS BEGIN
  MOV [hideweekfromothers,moodle],[hidefromothers,format_week]
  MOV [showweekfromothers,moodle],[showfromothers,format_week]
  MOV [hidetopicfromothers,moodle],[hidefromothers,format_topics]
  MOV [showtopicfromothers,moodle],[showfromothers,format_topics]
AMOS END
2012-04-23 21:28:39 +01:00