Commit Graph

51 Commits

Author SHA1 Message Date
moodler 2ef9d19a51 Added skip links to all course formats to main content MDL-7878 2007-01-03 15:37:07 +00:00
vyshane ea003a2338 Merged from 1.7. 2006-10-24 09:42:06 +00:00
moodler 3a52e764e4 New "Switch Role" functionality to replace the old "Student view".
It's not well-tested yet and probably doesn't quite work.  I will keep debugging this tonight from home.
2006-09-21 09:16:41 +00:00
skodak d847bb32fd fixed non-working edit button on course page for teachers, added explanation comments 2006-09-17 17:32:45 +00:00
moodler ea82d6b638 CHanged a lot of CFG->debug stuff to use the new debuggin() function 2006-09-13 09:45:07 +00:00
toyomoyo 17d6a25e5c adding capabilitiies 2006-09-13 09:08:14 +00:00
skodak 2b156ffbf3 old admin block not added into frontpage during installation anymore, it is not removed during upgrade. 2006-09-11 20:05:31 +00:00
toyomoyo 51792df056 adding capabilities 2006-09-08 08:46:26 +00:00
skodak b1631fef28 add admin_tree to front page during install and upgrade 2006-09-03 18:37:41 +00:00
moodler 4d2401d524 Removed student view 2006-09-03 08:46:30 +00:00
skodak ad0f9c828e Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE 2006-07-19 08:13:25 +00:00
moodler f870b674a1 Take the course listing out of the default site page
because the default setting on site.php is to have it
in the middle of the page.
2006-04-10 15:38:34 +00:00
mjollnir_ aa898e41c1 Stickyblocks: fool pagelib into thinking it is course-view when it needs to be, rather than admin-stickyblocks 2006-03-17 03:17:44 +00:00
stronk7 ec6bee0f8e Prevent a warning when params is empty. Bug 4328.
(http://moodle.org/bugs/bug.php?op=show&bugid=4328)
2005-11-21 13:13:23 +00:00
mjollnir_ 1217708363 My moodle sticky block config now generic, can be used for any pagetype.
Currently implemented: course-view (and my moodle, of course)
2005-10-16 22:34:25 +00:00
mjollnir_ 4374ee2ca9 Fixing warnings in my moodle/ blocks /pagelib, plus moved page->edit_always to base class 2005-08-23 04:48:34 +00:00
thepurpleblob 367b841305 Added 'studentview' button functionality. 2005-08-15 12:53:57 +00:00
defacer e15e02bf98 Merging from STABLE:
Fix for bug 3637:

Certain obscure cases of using PHP accelerators (probably has to do with
OS and PHP version as well, but it's not certain) caused an error to be
displayed when importing data from "local pagelib" files with "debug" turned
on. The error was bogus, but error() stopped the page from being displayed.

Thanks to James P. Dugal the from University of Louisiana at Lafayette for
identifying and helping to solve the problem!
2005-07-20 17:23:07 +00:00
defacer eee5cf8f64 Removing the "dirty compatibility hack", it surely has done what it was
meant to do all this time (keep Moodle working for people who had already
upgraded to early versions of 1.5).

This fixes bug 2965, thanks Penny for reminding!
2005-04-19 12:40:15 +00:00
defacer 262771e08f page_import_types($path) doesn't care if $path has a trailing slash or not 2005-03-02 03:43:41 +00:00
defacer b5e9682173 Adding caching to page_import_types. Actually the caching is REQUIRED for the
function to work, because otherwise it would barf on duplicate class declaration
the second time it was called with the same arguments.
2005-02-28 04:16:41 +00:00
defacer 3f6aba0c42 Library function which returns the page types used for a specific directory
in the Moodle distro structure. As generic as it gets.
2005-02-28 04:01:30 +00:00
moodler fd5b9188bd removed explicit style-adding for user login string 2005-02-25 06:23:46 +00:00
defacer 4f0d565da6 Bringing Quiz in line with Martin's "make Chat into a showcase for pages" idea. 2005-02-10 01:59:11 +00:00
moodler 6744033797 Removed CHAT further 2005-02-09 16:47:41 +00:00
moodler 37dfb27974 Moved chat PAGE stuff out of core as an example 2005-02-09 16:44:35 +00:00
defacer 0ab589983e New class that models the behavior of a chat activity!
Isn't it so small and cute? ;-)
2005-02-09 15:39:07 +00:00
defacer b83eee7daa Putting all things that are common among activities into a new class
page_generic_activity. Then we can inherit almost all of the desired
behavior and just override a couple of functions to get going with page
support in a new activity.
2005-02-09 15:22:16 +00:00
defacer 55815b288d Streamlining class page_quiz, fixing things, removing needless comments. 2005-02-09 15:05:14 +00:00
defacer 8a47e075b3 Changing the way that applicable formats for each block are defined:
The format for each page is now the same as the id attribute of the
BODY tag, which in turn is a simple function of the script's relative path:

The format for e.g. a quiz view page is "mod-quiz-view". The format for the
site index is "site-index". Exception: the format for courses is not just
"course-view", but "course-view-weeks" etc.

Obviously the applicable_formats() override for each block should now take
this into account. The matching rules now are:

* You can specify the full format, e.g. "mod-quiz-view" => true
  will allow the block to be added in quizzes
* Prefixes match the full page format, e.g. "mod" matches ALL activities
* You can use "*" as a wildcard, e.g. "mod-*-view" matches just the view.php
  page of all activities
* These rules interoperate, thus "mod-*" is the same as "mod"
* "all" remains as a catch-all situation
2005-02-08 02:59:44 +00:00
defacer 246c206420 Fix for bug 2492: Notices thrown by pagelib.php.
It was an oversight on my part. Thanks Gustav!
2005-02-04 20:27:54 +00:00
defacer 7c6c051326 Utilizing page_id_and_class(), make a factory function page_create_instance()
that does not need the page type as an argument (autodetects from the URL).
2005-02-02 02:32:40 +00:00
defacer 8bd3fad303 I need those constants a bit more easily accessible. 2005-02-01 07:39:21 +00:00
defacer 7221d319be Fixing all the details in the block instance configuration screen.
That wasn't so hard!
2005-02-01 07:34:17 +00:00
defacer cadc69c64c Added a new class page_quiz, modelling the behavior of a quiz view page.
Not everything is quite right now, a few details (e.g. correct breadcrumbs)
have been ignored but most of the functionality is there.

Blocks in quizzes, here we come!
2005-02-01 07:12:39 +00:00
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