338 Commits

Author SHA1 Message Date
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
Dan Poltawski
f4e9103a95 Merge branch 'MDL-32744-master-3' of git://git.luns.net.uk/moodle 2012-05-22 12:28:37 +08:00
Dan Poltawski
c1e1560843 Merge branch 'wip-mdl-33027' of git://github.com/rajeshtaneja/moodle 2012-05-22 11:54:30 +08:00
Rajesh Taneja
bcf7175f4e MDL-33027 theme: Hidden section link will be displayed dimmed in section navigation 2012-05-22 11:31:35 +08:00
Rajesh Taneja
c129f430bb MDL-33027 themes: Modified heading to be displayed for section in all themes 2012-05-22 11:31:34 +08:00
Sam Hemelryk
0b02faa076 Merge branch 'MDL-33051' of git://github.com/danpoltawski/moodle 2012-05-22 14:40:31 +12: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
sam marshall
57a42a24ad MDL-33126 Fix error on first view of new course page 2012-05-21 12:05:30 +01:00
Dan Poltawski
78de004483 MDL-33051 - topics format: remove section number from section column
We don't think its necessary anymore
2012-05-21 12:12:44 +08:00
Dan Poltawski
5316007e08 MDL-24419 section availability: display availability info to teachers 2012-05-18 14:56:00 +08:00
Dan Poltawski
6e0d176934 Merge branch 'MDL-24419-master' of git://github.com/sammarshallou/moodle 2012-05-17 20:45:37 +08:00
sam marshall
52f1406101 MDL-24419 Fix bug with section creation for new courses 2012-05-17 13:37:33 +01:00
Eloy Lafuente (stronk7)
dd420abadf Merge branch 'MDL-24419-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/db/upgrade.php
	lib/phpunit/lib.php
	version.php

Fixed:
    lib/db/upgrade.php - duplicate course->sectioncache add code
    lib/db/install.xml - cleanup needed because xmldb editor was not used
    lib/phpunit/classes/util.php - cleanup $GROUPLIB_CACHE on test reset
2012-05-16 23:53:47 +02:00
Aparup Banerjee
154128a50f Merge branch 'wip-mdl-32770' of git://github.com/rajeshtaneja/moodle 2012-05-15 16:41:54 +08:00
sam marshall
ce4dfd2703 MDL-24419 (4): Add conditional availability support to sections; section cache
Credit: original version done by Kirill Astashov of NetSpot (netspot.com.au),
finished and tweaked by sam.

This change adds conditional availability support for sections analagous to
that already available for activities. (Backend, UI, backup/restore.)

In order that this feature does not reduce performance, section cacheing has
also been added using a new course 'sectioncache' field analagous to modinfo.

The new feature integrates with activity availability so that activities
inside sections which are not available are automatically not available
themselves (meaning it works to restrict access).
2012-05-14 11:19:25 +01:00
Dan Poltawski
8715472b1d Merge branch 'MDL-32742-master-1' of git://git.luns.net.uk/moodle 2012-05-14 14:21:57 +08:00
Rajesh Taneja
36be7e1453 MDL-32770 course: fixed section title and footer 2012-05-10 16:23:17 +08:00
Sam Hemelryk
78ed2ec79f Merge branch 'MDL-32857' of git://github.com/danpoltawski/moodle 2012-05-10 12:15:50 +12: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
7cb8bfdb5c MDL-32857 course: single topic summary rewriting pluginfile urls 2012-05-09 10:06:40 +08:00
Andrew Robert Nicols
0c053c5368 MDL-32508 Add error when trying to access an unknown course section 2012-05-04 13:41:59 +08:00
Sam Hemelryk
3df72f8ce7 MDL-32508 Trivial whitespace cleanup 2012-05-04 17:13:36 +12:00
Andrew Robert Nicols
575826c730 MDL-32508 Close the topic/week ul before showing the add section link 2012-05-04 10:53:06 +08: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
2db66a9319 MDL-32505 course_formats: introduce upgrade.txt 2012-05-04 10:53:05 +08:00
Dan Poltawski
96e1285162 MDL-32508 course_format: fix up some minor style issues
Noticed whilst reviewing again
2012-05-04 10:53:05 +08:00
Dan Poltawski
243b7003e3 MDL-32508 course/format: Display general section above title 2012-05-04 10:53:03 +08:00
Dan Poltawski
803e36e105 MDL-32508 course/format: Hide 'format outline' titles
It is now hidden for for accessibility only
2012-05-04 10:53:02 +08:00
Dan Poltawski
a830d86673 MDL-32508 course/format: Only display topic number in topic format 2012-05-04 10:53:02 +08:00
Dan Poltawski
1abf12532d MDL-32508 course: Add basic 'add a section' button at the bottom of the course page
With thanks to LUNS who provided this code from when I did it working
there.
2012-05-04 10:53:01 +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
Sam Hemelryk
b34e00c197 Merge branch 'MDL-32771-2' of git://github.com/danpoltawski/moodle 2012-05-09 09:14:20 +12: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
Dan Poltawski
a60cc6e174 MDL-32777 format_topics/weeks: section-summary CSS
Ensure there isn't list-style like bullets
2012-05-05 10:37:38 +08:00
Ruslan Kabalin
d95b77bdb7 MDL-32657: Add format.js for topics format and remove default
Using topics format as default is not a great idea, as we can end up
half-working dragdrop for some formats. With the current soiution, drag-drop
will not work for format, unless required js functions have been created in
format.js
2012-05-02 09:42:06 +01: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
Eloy Lafuente (stronk7)
bb77ead0a4 Merge branch 'MDL-31255-master-3' of git://git.luns.net.uk/moodle 2012-03-07 00:18:27 +01:00
Ruslan Kabalin
93d46f4802 MDL-31255 Fix move of highlighted section when JS is off 2012-02-29 09:08:58 +00:00
Eloy Lafuente (stronk7)
5f67e1f395 Merge branch 'MDL-31245-master-1' of git://git.luns.net.uk/moodle 2012-01-24 18:45:29 +01:00
Andrew Robert Nicols
7aefaa91c9 MDL-31245 Add missing 'icon' class to highlight button in topics format 2012-01-18 14:12:09 +00:00