177 Commits

Author SHA1 Message Date
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
Petr Skoda
b85b25ebb8 MDL-31006 fix various notices in PHP54
PHP54 compatibility
2012-01-18 01:03:20 +01:00
Andrew Robert Nicols
75cd9d2ab6 MDL-30362 Change icon class for editsection icons in course formats 2011-12-07 14:58:10 +00:00
Petr Skoda
cd2f3c17f9 MDL-30538 add missing course format versions and fix email filter file name typo 2011-12-03 08:40:53 +01:00
Sam Hemelryk
113b970e62 MDL-29188 course_formats Fixed up formatting of section name within navigation 2011-09-14 11:39:48 +12:00
Sam Hemelryk
71e0b3b5c7 MDL-29188 multilang Reviewed the uses of section name and ensured things were being formatted consistently 2011-09-08 09:27:38 +12:00
Sam Hemelryk
ad4700977a MDL-26477 Added a setting to display course sections as links within the navigation 2011-08-02 15:24:59 +02:00
Dongsheng Cai
b1627a92e5 MDL-26105 Block settings should contains less options, and be more user friendly
AMOS BEGIN
    MOV [page-blog-index, pagetype], [page-blog-index, blog]
    MOV [page-blog-x, pagetype], [page-blog-x, blog]
    MOV [page-tag-x, pagetype], [page-tag-x, tag]
    MOV [page-course-view-weeks, pagetype], [page-course-view-weeks, format_weeks]
    MOV [page-course-view-weeks-x, pagetype], [page-course-view-weeks-x, format_weeks]
    MOV [page-course-view-topics, pagetype], [page-course-view-topics, format_topics]
    MOV [page-course-view-topics-x, pagetype], [page-course-view-topics-x, format_topics]
AMOS END
2011-06-09 13:51:14 +08:00
Eloy Lafuente (stronk7)
162bbbe2f4 MDL-27140 weeks course format - incorrect roll of dates on hidden sections
Credit goes to Nikhil Gupta, big thanks!
2011-05-09 18:15:10 +02:00
Petr Skoda
431ac39634 MDL-26623 fix file permissions
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Aparup Banerjee
13801a49a2 MDL-23939 lazy load course_display with new course_get_display()
This change speeds up user login and makes the session smaller.
2011-02-12 22:45:17 +01:00
Petr Skoda
4bbcdcec0d Merge branch 'wip-MDL-25927' of git://github.com/sammarshallou/moodle 2011-01-10 15:16:22 +01:00
sam marshall
563e97b8b9 completion MDL-25927 Change print_help_icon to display_help_icon (returns html instead of printing) 2011-01-10 13:04:54 +00:00
Dan Poltawski
7de9bfad15 course-format-weeks MDL-24742 dont redefine maincontent
It was breaking XHTML validation due to duplicate id
2011-01-09 20:02:21 +00:00
Petr Skoda
516c5eca68 MDL-24698 hopefully fixed all completion_info problems 2010-11-17 06:23:56 +00:00
David Mudrak
c0b5d9252b MDL-25072 Stop abusing $CFG->ajaxcapable and $CFG->ajaxtestedbrowsers 2010-11-09 11:54:58 +00:00
Sam Hemelryk
367a75fae4 themes lib MDL-24895 Multiple fixes to better handle overflow.
Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
2010-11-05 02:53:47 +00:00
Petr Skoda
36b1c872a3 MDL-24927 fixed orphaned activities regression when single topic selected 2010-10-29 20:01:21 +00:00
Rossiani Wijaya
4756795bf7 MDL-22528: fixed AJAX Course editing in Chrome and Safari. 2010-10-28 07:13:56 +00:00
Petr Skoda
46b2346b57 MDL-24316 new lang string, improved visualisation 2010-10-14 10:20:30 +00:00
Petr Skoda
04cc7da3e4 MDL-20366 removing the ability to add new activities to invisible sections, I do not think we should encourage this kind of tricks 2010-10-14 10:02:32 +00:00
Petr Skoda
4cac68ab13 MDL-24316 adding support for stealth sections on course edit page - work in progress, we need to decide how to visualise it and what lang strings to use 2010-10-13 20:17:56 +00:00
Petr Skoda
fbaea88faa MDL-24321 switching to stdClass in /c*/ 2010-09-21 08:13:11 +00:00
Sam Hemelryk
47e75d04b8 course MDL-23996 section names now used in jump to menu 2010-08-30 01:32:45 +00:00