274 Commits

Author SHA1 Message Date
moodler
0e2585ac0f Reject Opera when it is pretending to be IE 2004-02-10 14:20:44 +00:00
moodler
e11dc9b682 Another little hack to complete the course-level forcelanguage 2004-02-10 08:10:04 +00:00
moodler
0cc6fa6a1f Emails can take on course language as well 2004-02-09 08:49:54 +00:00
moodler
b3153e4b7d Small hack to force a particular language within a course.
No interface on course/edit.php ... I want to try this on
moodle.org for a while to try and stop the encoding problems
2004-02-09 07:31:04 +00:00
moodler
9b591be622 Better error messages for restricted users 2004-02-04 12:59:05 +00:00
stronk7
0180f73f48 Now, this function can be called twice from the same page.
In participants list, when showing teaches, the country of
the students was not showed.
Please, check. I haven't found problems with this, but...
2004-02-01 12:07:36 +00:00
moodler
5ea64f4b2f Error message for restricted users 2004-01-30 09:55:57 +00:00
moodler
cb98d3120c New function to restrict defined users 2004-01-30 08:25:49 +00:00
moodler
9fa6280580 When unenrolling students, remove them from groups too 2004-01-30 06:44:02 +00:00
moodler
bb8c36313c When adding a teacher, remove them as a student. 2004-01-30 05:59:33 +00:00
moodler
066af654c2 Bugfixes to set_user_preference 2004-01-28 14:47:39 +00:00
moodler
70812e39a0 Added new table called "user preferences" which can be used for
storing arbitrary preferences for each user.

Thanks to Jon Papaioannou for the first draft of this code
which I modified.
2004-01-28 14:14:19 +00:00
moodler
8a2c90768f Clarification to some group logic 2004-01-26 09:12:52 +00:00
moodler
0609562b64 New function guest_user to create a guest user record and return it 2004-01-25 09:35:45 +00:00
moodler
ca952b033d In remove_course_contents() look for a module function called
module_delete_course and run it as well.  This is mainly for
quizzes at the moment but basically it runs cleanup stuff
whenever a course is being emptied
2004-01-21 16:15:03 +00:00
moodler
5fba04fba0 EARLY SUPPORT FOR CALENDARS AND EVENTS
--------------------------------------

New functions and tables, based on work from Gustav Delius
(see http://moodle.org/mod/forum/discuss.php?d=4466)

This forms the core of a new system to store, track and utilise
event information in all modules, as well as allowing external
calendars to be synchronised with new information.
2004-01-17 09:47:45 +00:00
moodler
0d67c51458 Work done on group functions 2004-01-11 17:44:46 +00:00
stronk7
e9f3e715dd Add one more eregi_replace, because the 'alnum' allows the
comma char and it can cause some problems in filenames.

Off-topic: This is my 1st commit with my new eMac !! My old iMac screen
died two days ago... :-( but I've recovered everything :-)
2004-01-03 20:53:25 +00:00
moodler
0da33e07b9 Need to change table name! It was tougher than I thought to work around
the reserved word "group"
2003-12-30 18:07:09 +00:00
moodler
f374fb1006 This is the first check-in of support for groups.
It's very early (it doesn't actually do anything yet!) but you can
define groups and get an idea of how the interface is shaping up.
I also wanted to show that I have actually done something on this! :-)

From here my plan is to add group support to the modules, one by one
(forums first), then go back and clean up some of the central interfaces,
graphics etc.

Finally, test, test, test and get 1.2 out well before the end of February.
2003-12-30 17:18:06 +00:00
moodler
316ebf78a3 Take post_max_size into account when calculating maximum sizes. 2003-12-02 14:34:24 +00:00
moodler
b5cbb64dc5 Final pieces to allow site-wide configuration of name display.
Site variable can override order of "firstname lastname" or it
can leave it up to the language packs.
2003-11-30 14:02:01 +00:00
moodler
627407365c Tiny hack for Qmail - I've come across one system which REQUIRED the IsQmail
method of phpmailer to be used.

This is now possible just by specifying "qmail" in the smtphosts field.
2003-11-28 10:57:58 +00:00
moodler
0b4c582298 Some changes to use fullname function for names 2003-11-28 10:53:07 +00:00
moodler
e2cd50652b This function is just a stub to stand in for a while until I have more
time ... Following this I'll be converting all the other files around
the place to use this function.
2003-11-19 15:59:45 +00:00
moodler
f8dbffb1c0 Check for string before sorting it 2003-11-17 02:19:13 +00:00
moodler
82196932b0 Forgot to check this in ... has a new function 2003-11-07 15:11:34 +00:00
moodler
47037513fe Goodbye Richtext editor!
This does not affect any of the existing modules - I've kept some
stub functions to retain backward compatibility.
2003-11-03 15:17:21 +00:00
moodler
4c46c425db Changes to integrate the new HTML editor into Moodle in an optional way
until it's stable enough to replace Richtext

To enable the new editor, add this line into config.php:

  $CFG->useneweditor = true;
2003-10-29 08:06:11 +00:00
moodler
9788367bb9 Sometimes you really want to know if they are a teacher 2003-10-28 14:44:39 +00:00
moodler
57ef348040 If debugging is on, then make SMTP print debugging info 2003-10-28 14:35:00 +00:00
moodler
482b6e6e38 Same as Eloy's fix, just a few less lines of code. ;-) 2003-10-17 12:30:17 +00:00
stronk7
23f6216b92 Do some isset() checkings with $CFG->sessioncookie.
Previously when debug turned on, login was impossible
due to some notices sent before writing http headers.
2003-10-17 09:54:41 +00:00
moodler
6de85459d2 Use $CFG->sessioncookie on MOODLEID cookie as well 2003-10-16 13:23:53 +00:00
moodler
266a416e16 get_real_size can now pick up 900k 2003-10-13 03:16:25 +00:00
moodler
4909e17632 These changes implement some better controls for controlling uploads.
1) There is a new site-wide configuration variable called maxbytes,
   which provides an upper filesize limit for all (student) uploads.

2) There is a new course-level variable called maxbytes, which further
   limits uploads within a course.

3) There is a new maxbytes field for forums, which further restricts
   the size allowed in a particular forum.  There is also a new config
   variable in the module configuration to specify a default size
   to use when defining a new forum.

4) Assignments already had a limit, but this is now aware of the other
   limits, and like forums there is now a settable default value.

5) Finally, the sizes of files (Gb, Mb, Kb, bytes) is now translatable
   in the language packs.
2003-10-06 18:02:35 +00:00
moodler
aa3eb05096 When getting a list of countries, check the parent language if necessary. 2003-09-26 08:21:11 +00:00
moodler
5833a6c8eb The list of countries has finally been moved into the language packs
so it can be translated.

There is now a new function get_list_of_countries() which will return a
sorted array of countries in the best current language.

get_string("AU", "countries")   will also work if needed
2003-09-26 08:04:48 +00:00
moodler
ba7166c377 Added is_internal_auth() function to quickly identify internal authentication 2003-09-22 13:58:20 +00:00
moodler
bb9cf93d21 Frontpage directories to ignore are called _vti_cnf .. not vti_cnf 2003-09-13 08:19:42 +00:00
moodler
757a0abd94 Corrected the stamp I just added and added a separate version field instead 2003-08-23 14:18:44 +00:00
moodler
1ccc73ac3b Use gmdate instead 2003-08-23 12:25:50 +00:00
moodler
280faf9ff7 Added a new function to make a unique ID code, to be used in quiz
questions and elsewhere

It's based on the hostname, time, random string and a supplied version string.
These are packed using '+ separators so they can easily be unpacked if
necessary.

function make_unique_id_code($version=1)
2003-08-23 12:22:27 +00:00
moodler
42282810f8 Better set_config (give immediate results) 2003-08-18 17:41:06 +00:00
moodler
62ca135d98 More cleanups and separation of printing the grades menu into a new function 2003-08-18 05:28:30 +00:00
moodler
fdc47ee6c9 New function make_grades_menu() for easily making an array of grades 2003-08-18 05:10:35 +00:00
moodler
12407705af Check for existence of directory as well to avoid PHP warnings 2003-08-17 14:16:08 +00:00
moodler
487c1711fe There's no point in printing the notice - if there's no directory
there's no files ... pretty simple.
2003-08-17 14:14:12 +00:00
moodler
3041b0f88a More robust teacher adding/removing 2003-08-17 08:51:55 +00:00
moodler
6815044f28 Exclude vti_cnf directories if they are found 2003-08-17 05:50:47 +00:00