16 Commits

Author SHA1 Message Date
defacer
7542a4e574 Dropping the use of MOODLE_PAGE_COURSE <gasp>!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.

On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.
2005-01-31 02:18:15 +00:00
moodler
93dcb13ed9 Only show page errors when debugging is on (in case we can recover) 2005-01-28 17:03:57 +00:00
defacer
bbcbc3f85e Removing the extra debug info now that bug 2431 was fixed.
I can't believe that this insignificant workaround actually solved the
problem. This is most probably a bug with PHP and static initialization
of array variables.
2005-01-28 05:42:19 +00:00
defacer
0d7e0e8ada A small change for the static initialization in page_map_class,
and more debug added just before init is done.
2005-01-28 03:52:56 +00:00
defacer
e355a2d304 Bugfix: when configuring a block in the site index, the site name was
being displayed twice in the breadcrumbs.
2005-01-27 23:56:46 +00:00
defacer
eaba9c8510 Adding that nifty BODY id and class detection code to pages... I have the
feeling that this is the way to go, as more Moodle things will be converted
to use $PAGE in the future.
2005-01-26 15:33:50 +00:00
defacer
6bc5558ce6 Adding some extra debug output when a specific error() occurs to help track
down a problem which has been reported in the forums (it is NOT a bug though).

THIS SHOULD BE REMOVED BEFORE 1.5 IS RELEASED!
2005-01-25 19:13:09 +00:00
defacer
0f256abc0c Fix for bug 2336:
I accidentally removed the editing button from courses when fixing bug 2328.
Fortunately, Gustav was on the lookout.
2005-01-04 19:43:09 +00:00
defacer
edb42f0924 Fix for bug 2328:
* When configuring a block instance, "Turn editing off" button is not
  shown anymore.

* When configuring a block instance, the breadcrumbs are now better,
  providing a link to the course page. This could be done in a much
  better way if we had a comprehensive template system but it will
  suffice for now.
2005-01-02 15:20:15 +00:00
dhawes
5809683fba fixed a comment whose details had been left behind in the recent api change 2004-11-29 04:38:07 +00:00
defacer
9b12850043 Fix for bug 2241:
I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(

Also moved the only two functions of the API outside the page_base class.
2004-11-29 04:19:05 +00:00
defacer
99110470ba Somehow I forgot to commit these and the whole page setup wasn't working
after renaming MoodlePage => page_base.
2004-11-25 17:23:57 +00:00
defacer
0fa6d31143 Removed a useless space :) 2004-11-20 19:44:28 +00:00
defacer
c8e0b57900 Pages/blocks code updates:
NEW: The code now supports dynamically plugging your own Pages and block position
identifiers into Moodle without messing with the main libraries at all.

UPDATE: Many functions in blocklib now use pass-by-reference for speed.

UPDATE: Class MoodlePage has been made more presentable and robust.
2004-11-12 18:39:25 +00:00
dhawes
e0134f842c added comments and some spacing cleanup 2004-11-10 16:43:57 +00:00
defacer
f032aa7a5f MAJOR CHANGES:
--------------

Brand-new pagelib.php at your disposal! It slices, it dices, it makes your coffee.
It still doesn't understand women... Read the comments in pagelib.php for a first
impression. Feedback highly encouraged!

Blocks code has undergone significant changes to work with Pages. Flexibility is its
middle name, since I think (without having tried it) that adding e.g. a third
placeholder for "center" blocks in courses, with full support for moving around etc,
will now take about 15 lines of new or edited code. If you are not impressed yet, I
suggest watching a documentary on solar physics. :P

MINOR CHANGES:
--------------

Added instance_allow_config() in the blocks class hierarchy to supplement per-instance
configuration options. You can override it to return true and thus get configuration
amenities without allowing multiple instances.

Minor polishing to comments and documentation (whatever caught my eye was game).

Tightened up some code here and there by utilizing all the new features.

BUGFIXES:
---------

A bug in restore_execute.html caused hidden blocks to not be restored at all.
2004-11-08 19:36:07 +00:00