Commit graph

1511 commits

Author SHA1 Message Date
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
moodler
4d312bbe0f Don't enrol student if they are already enrolled. 2003-08-17 05:48:05 +00:00
moodler
73047f2f76 OK, this is a new scheme to allow some teachers to edit and others to not
that is much better than the proposal to change the role of course creators.

There is a new field in user_teachers called "editall", which is
ON BY DEFAULT, and allows teachers to edit courses.  It can be modified
on the teacher editing screen (formerly assign teachers).

The value is cached in the session.

To test for it, there is a new function isteacheredit($course->id)
which works much like isteacher did.

I'm going through now and applying this new function wherever
it is needed.
2003-08-16 05:19:24 +00:00
moodler
02ebf404c8 WARNING: BIG CHANGES!
OK, this is a big check-in with some big changes, and needs work still.

It seems relatively stable, but I need help identifying the rough patches.

1) First grading scales support.  There is a now a new table called "scale"
   that contains grading scales.  There can be site scales (course=0) and
   custom course scales.  These can be used in modules - I've only done
   forums for now but that was the hard one.  Scales can be edited via
   the new item in the course admin menu.

   There is one default scale - the connected/separate knowing one that used
   to be in forum.  To build this I pull data from the language packs
   to create one during the upgrade, or anytime a scales menu is called
   and no scales are found.

2) New roles for course creator and teachers.  I've fixed up the course
   menus and some other things but there's a lot left to do on this to
   make it all smooth.  The idea is that teachers no longer can edit courses
   unless they are also course creators.  The interface for this needs to
   be smoothed out a fair bit and I need help with this.

   The upgrade will upgrade all teachers to be creators, but will default
   the new site config "creatornewcourses" to "no", so that effectively
   these new teachers have the same privileges.

3) Simplified teacher management.  There is no longer an "assign teachers"
   and a "teacher roles" page - it's all on one page in course/teacher.html.


Phew ... time for a shower and then back into it.
2003-08-15 13:59:24 +00:00
moodler
ee23f384bf Some declarations just in case (for the included files). 2003-08-08 11:29:33 +00:00
moodler
125898afd2 Use the "correct" way of encoding HTML (quoted-printable) instead of
warapping it like text (which was working, but...).
2003-08-08 03:39:25 +00:00
moodler
07aeb7b0bf Move the code for clearing out a course into a new function:
remove_course_contents()
2003-08-02 11:32:59 +00:00
moodler
2b97bd71e3 Use the admin user as the envelope sender (to catch bounces etc) 2003-07-27 13:14:00 +00:00
moodler
1efa27fdbb Close loophole for invisible courses by re-enrolment 2003-07-21 07:50:59 +00:00
moodler
7977cffdb0 Arbitrary moving of activities (aka cut and paste)
Some of this code was sent by Howard Miller, but I rewrote most of it
to make it shorter and to fit in better with current code.
2003-07-14 13:08:38 +00:00
moodler
2b32bdddb9 Keep strings cached in memory during a single page to improve performance
on slow filesystems or bad file caching.   (experimental)
2003-07-03 12:19:54 +00:00
moodler
db356340d8 Use parentlanguage when printing documentation 2003-06-12 11:55:29 +00:00
moodler
b947c69a71 Cleaned up get_string for language strings - slicker now
Added new feature: if a string "parentlanguage" exists then that
language will be tried before defaulting to English.

Useful for dialects or other languages that are similar.

For example, all the Spanish translations can default to "es"
2003-06-12 03:27:24 +00:00
moodler
bb515027b5 The single quotes caused problem on the rare occasions that these
unset strings were being written to the database
2003-05-24 02:34:29 +00:00