1628 Commits

Author SHA1 Message Date
moodler
b56ccdd9d0 Reformatting some spaces to coding guidelines 2005-02-13 17:38:40 +00:00
gustav_delius
4bd2e69a51 When course is hidden a student trying to enter gets the new message "This course is currently unavailable to students", see bug 2511 2005-02-13 11:43:05 +00:00
moodler
56766f8592 More fixes to make custom themes work as expected.
I think it's pretty much perfect now.
2005-02-13 09:02:43 +00:00
moodler
9c4e6e2177 Really big cleanup of how "forced" themes were implemented.
Course themes now work better.

theme/xxxx/styles.php is now really short because all the logic
is in weblib.php.
2005-02-13 08:34:10 +00:00
gustav_delius
48e535bc35 Activities can now be hidden/shown from the activity editing page. Also for modules that know about groups the groupmode can be set from there. See bug 2533. This required adding to the mod.html files calls to new functions print_visible_setting() and print_groupmode_setting() which are combined in print_standard_coursemodule_settings().
The visibility of coursemodules is now always set through the function set_coursemodule_visible() in order to make sure that the associated events get updated in the calendar appropriately.

If moving a coursemodule to a hidden section then the module is set to hidden as well and its events are hidden in the calendar.

If deleting a coursemodule its events are deleted from the calendar.

The function choose_from_menu() has an extra optional argument $disabled which, when set to true, will disable the menu.

For the sake of consistency the function set_groupmode_for_module has been renamed to set_coursemodule_groupmode and the functions show_course_module() and hide_course_module() have been combined to set_coursemodule_visible().
2005-02-12 21:41:22 +00:00
julmis
2fd4148763 Re-enabling reading for link attributes whats been commented out.
(HTMLArea.prototype._createLink) These lines were commented out for
bug 1455 but it created another bug #2504.
2005-02-12 21:06:09 +00:00
julmis
b17a603812 Better fix for IE's too long statusbar text. Thanks Gustav ;-) 2005-02-12 16:05:59 +00:00
moodler
c93f852dbc Some tidying up to remove notices and format code to guidelines :-) 2005-02-12 04:12:24 +00:00
julmis
30a6aad981 Fixing Bug #2521 Focusing editor removes too long status bar line from IE. 2005-02-11 21:20:33 +00:00
defacer
9ecf051d4c Styles and markup improvements. 2005-02-11 05:27:19 +00:00
defacer
5bbbe0be91 Changing the matching function that decides if a block is applicable for
display in a page. Previously it returned the FIRST match; now it returns
the BEST match.

This allows things like

 array('all' => true, 'mod' => false, 'mod-quiz' => true)

to work correctly regardless of the order the array elements appear in.

Also, encapsulated the check into a function (it has definitely become
non-trivial).
2005-02-10 18:43:18 +00:00
moodler
c2145e7845 Use a convert_high_ascii() function to make filenames friendlier. 2005-02-10 13:26:41 +00:00
moodler
32e2b30209 This more or less completes the PHP side of the 1.5 themes
Added $user->theme and $course->theme choices, controlled by admin
variables on the main config variables page.

By default this is all turned off, since multiple themes can be
a little disorienting.

A hidden feature is session themes ... you can change the theme
on any page by passing theme=xxxx as a parameter.  By default this
requires sesskey (so that people don't change theme on each other),
but this security can be switched off using a hidden variable
$CFG->allowthemechangeonurl = true;   Good for quick tests.
2005-02-10 10:28:27 +00:00
mjollnir_
303d0af144 In email processing, change sitesecret (non existant) to (already used) siteidentifier 2005-02-10 07:53:52 +00:00
moodler
915602ea79 Adding theme fields for courses, users and groups 2005-02-10 07:46:20 +00:00
moodler
16fd89aa23 POintless README 2005-02-10 07:37:33 +00:00
moodler
527a293769 Removed unused files. Someday maybe we'll try XML schema again, maybe Moodle 2.0 2005-02-10 07:36:46 +00:00
moodler
1695b68032 New feature: maintenance mode.
Admin can put a site on hold during an upgrade or theme changing etc

Controlled by a file in dataroot, so it can also be controlled via command line:

    touch moodledata/1/maintenance.html

    rm moodledata/1/maintenance.html
2005-02-10 05:11:34 +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
defacer
002ef48a50 Removing inline styles, adding a class. 2005-02-09 20:13:56 +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
moodler
4eac76f75a Prevent some notices from bad calls to print_side_block_end 2005-02-09 16:17:03 +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
023c4bb737 A new constant for chat pages. 2005-02-09 15:26:43 +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
moodler
26ecdc5b93 Removed some variables from a copy/paste 2005-02-09 14:38:42 +00:00
moodler
bfca00947a Improved styling of headings 2005-02-09 08:29:58 +00:00
defacer
d4f7a8152d Redoing the hide/show thingy for blocks purely through CSS.
Instance id's next time, Urs! ;-)
2005-02-09 01:23:06 +00:00
defacer
783453129b Fix for bug 2488:
Extending mdl_log column module to varchar(20).
It was already 20 chars in Postgres, so no changes there.
2005-02-08 20:29:17 +00:00
moodler
a8f6842661 Fixing some of the standard notice functions, adding styles and buttons 2005-02-08 17:09:41 +00:00
moodler
c7a9e29326 Just a robustness test 2005-02-08 17:07:31 +00:00
moodler
05049d161b Keep $THEME global in print_header for backward compatibility 2005-02-08 14:51:38 +00:00
moodler
fb830a1b60 Merged isteacher fix from stable 2005-02-08 07:45:53 +00:00
moodler
9c41fb8eb4 Merged from stable bug 2513 2005-02-08 06:22:04 +00:00
martinlanghoff
d6a49dab9f Merged from MOODLE_14_STABLE - fix_course_sortorder() bug #2509 - Should fix overlaps when moving categories with large gaps -- affects only mysql. Prevent from landing even near the newly assigned range during the temporary shift. 2005-02-08 03:42:20 +00:00
mjollnir_
0bedb18792 Removing mdl_ in sync_metacourse 2005-02-08 03:39:40 +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
mjollnir_
bb64b51aa3 First cut of email to module (or core) processing.
This patch contains:

* email_to_user will set the envelope sender to a special bounce processing address (based on $CFG settings)
* email_to_user will accept (and set) a reply-to header, to be generated by the module calling the function.

* new functions:

	* generate_email_processing_address - ALWAYS use this to generate the reply-to header. reply-to header will look like this:

	(LIMIT: 64 chars total)
	prefix - EXACTLY four chars
	encodeded, packed, moduleid (0 for core) (2 chars)
	up to 42 chars for the modules to put anything they want it (can contain userid (or, eg for forum, postids to reply to), or anything really. 42 chars is ABSOLUTE LIMIT)
	16 char hash (half an md5) of the first part of the address, together with a site "secret"

	* moodle_process_email - any non-module email processing goes here (currently used for processing bounces)

* bounce handling:

	* config settings for bounce threshold and ratio (and whether to handle bounces at all)
	* if too many bounces occur against any given user, user_not_fully_set_up will force an email address change
	* associated functions (over_bounce_threshold, set_send_count, set_bounce_count)

* handling emails to noreply address (see below)

* new script - admin/process_email.php

	This script needs to be called from your mail program for anything starting with the 4 char prefix described above (and optionally, the noreply address)
	It will bounce emails to the noreplyaddress, with a friendly "this is not a real email address" message

	It will break down and unencode the email address into moduleid and validate the half md5 hash, and call $modname_process_email (if it exists). Arguments to these functions are: $modargs (any part of the email address that isn't the prefix, modid or the hash) and the contents of the email (read from STDIN).

* associated string changes/additions

* changes in config-dist.php to give clues as to how to set this up.

MODULE WRITERS!

take a look at new functions moodle_process_email and generate_email_processing_address  in moodlelib.php for ideas about how to

	* encode and unencode the arguments your module needs to do the processing
	* how to deal with multiple "actions" for any given module.

Martin Langhoff <martin@catalyst.net.nz> will be writing up some PROPER documentation, containing amongst other things config settings for different mail servers (this was developed against Postfix).  Feel free to email me with any feedback on the code or design, penny@catalyst.net.nz.  Or post on the developer fourm.
2005-02-08 02:57:14 +00:00
defacer
86a956a42a Fixing this to not show notices if a block doesn't have an id attribute. 2005-02-08 00:53:55 +00:00
defacer
d49a3fc5a8 Removing the inline style, migrating to styles_layout.css 2005-02-08 00:22:37 +00:00
defacer
e1f76e76a9 Give an id attribute to the "Add Blocks" block so that the new hide/show
provisions in weblib don't print notices.
2005-02-08 00:00:21 +00:00
defacer
3524435159 The W3C valid way to write script tags is <script type="text/javascript">. 2005-02-07 23:56:54 +00:00
moodler
da17a899d7 Added class and id to print_table, and id to print_simple_box 2005-02-07 11:08:37 +00:00
mjollnir_
ffed6bf316 Better fix for 2479. This time I'm 99.999999% positive it's fixed ;) 2005-02-07 09:32:24 +00:00
mjollnir_
835c8061b6 Removing db ids (found their way in from copying sql - bad) from last patch 2005-02-07 09:27:03 +00:00
mjollnir_
178ccd11c0 Fixing bug 2479. Can't figure out a way to do it with a left join at this stage but the query doesn't look too bad. Anyone who thinks they can figure out a more elegant way for it is welcome\! 2005-02-07 09:22:07 +00:00
moodler
106137d877 Fixed PARAM_ALPHA 2005-02-07 02:13:18 +00:00
gustav_delius
2ce17a0d5a The html editor was inserting a paragraph with just a space in it which clearly created problems for fields that the user wanted to leave empty.
There was also a problem when switching to text mode and back again: the status bar showed Path: Path:. I have taken out the second one.
2005-02-06 21:04:10 +00:00