250 Commits

Author SHA1 Message Date
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
moodler
3ee236820a Some fixes for check_gd_version -- please test this for me on every server you have! 2003-05-19 03:27:13 +00:00
moodler
c39c66a5e8 Using new ini_get_bool function to work around a bug with ini_get where
the result is different for items set in htaccess
2003-05-17 02:05:10 +00:00
moodler
5c219ea46d Added hyphen (-) to the list of allowed characters in a filename 2003-05-16 06:08:42 +00:00
moodler
581d7b4959 Fixes for isadmin() 2003-05-05 11:38:54 +00:00
moodler
eb347b6b68 Fixes to improve the password recovery process. There is now a
confirmation step required before the password is changed and sent.

Also, many of the email texts have been cleaned up.

TRANSLATORS:  check your texts in moodle.php starting with "email.."
2003-05-04 03:00:52 +00:00
moodler
984a8bf349 Two new language variables implemented.
langmenu  - turns the language menu on and off
langlist  - allows the admin to restrict and/or re-order the available language choices
2003-05-03 06:50:29 +00:00
stronk7
61ae5d36ca Modified the userdate() function. No changes needed when invoking it.
Added a new parameter (fixday->default true->old behavior) to avoid
formatting days when invoked with false value.
2003-05-02 09:37:41 +00:00
gregb_cc
aa0959690c fixed isadmin so that it checks once on each page view if the user is an admin
fixed check_gd_version to properly identify bundled gd versions (old
check_gd_version was returning 0 instead of 2 for bundled gd).
2003-05-01 23:12:05 +00:00
moodler
f5e82bc7f4 Moved microtime_diff() to moodlelib 2003-04-27 08:13:45 +00:00
paca70
1e22bc9c04 Conver usernames to lowercase for internal use. This prevent duplicate users
when using external authentication and posgresql.
2003-04-24 20:06:40 +00:00
paca70
dbe0be0059 Added missing $ 2003-04-24 17:21:54 +00:00