Commit Graph

587 Commits

Author SHA1 Message Date
moodler 7839870f41 Better error logging in mail when cron is run from command line
(use $FULLME instead of REQUEST_URI)
2004-12-12 06:46:49 +00:00
moodler b86e528be4 Added a new defined constant to moodlelib.php, to be used by scripts with
php extensions that should not be called directly.  See SC19

Constant:   MOODLE_INTERNAL
2004-12-12 04:30:57 +00:00
martinlanghoff 55f21d31e2 raise_memory() now uses get_real_size(), duplicate function return_bytes() removed.
Issue discussed in 2202 (http://moodle.org/bugs/bug.php?op=show&bugid=2202).
Also seen as arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-424
2004-11-24 03:56:09 +00:00
moodler c69232269c Robustness in function with empty input 2004-11-23 10:25:35 +00:00
mjollnir_ 7e8c56795a No need to sort the courses when counting the number of courses using a scale 2004-11-22 05:16:31 +00:00
mjollnir_ 9e903136b6 Optimisation for scales page - cache array of courses for site_scale_used -- Fixed 2004-11-22 05:12:10 +00:00
mjollnir_ 3644b6dca1 Optimisation for scales page - cache array of courses for site_scale_used 2004-11-22 05:05:30 +00:00
martinlanghoff e3da2769b8 Fixed bug in external auth.
Added truncate_userinfo() which ensures data from external auth fits in moodle database fields. Before, user records that did not fit would be dropped silently.

This is a merge from arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-172
2004-11-22 03:43:08 +00:00
martinlanghoff 4b8980fc83 Fixing handling of empty memory_limit for PHP without memory_limit (mostly Windows binaries)- fixed typo 2004-11-20 10:37:03 +00:00
skodak 175885e3ff updated parameter cleaning, preparation for new file.php SC#5 2004-11-19 21:23:07 +00:00
martinlanghoff 726f4ca317 moodle--eduforge--1.3.3--patch-335 Now memory_limit can be overriden by higher config settings from php.ini, commandline, httpd.conf, .htaccess 2004-11-18 02:54:35 +00:00
stronk7 4a69819405 Strip control chars when unzipping. 2004-10-17 23:42:48 +00:00
stronk7 6ee3b260cb Included some filename transformations to work like info-zip.
Directory traversal protection added.

Working under Win32, MacOS X and BSD (and rest of Unix, I hope).

Patch file from Petr. Thanks!
2004-10-17 22:26:45 +00:00
stronk7 20b53a7ba2 Added the optional showstatus parameter to unzip_file() to avoid
sending any output if desired.
2004-10-16 16:29:57 +00:00
stronk7 27974c8587 Latest patches from skodak included in param functions.
Simple and double quotes are out now.
Full paths in unzip are now hidden too.

Please test it. It could have some pending changes yet!
2004-10-16 11:30:14 +00:00
paca70 a67dd90008 Prevent auth_iscreator from overriding users course creation status 2004-10-13 07:27:34 +00:00
stronk7 176d456ed9 Under Win32, we need backslashes in paths. Now it works!! 2004-10-10 23:24:15 +00:00
stronk7 4f64ed9405 Added some nedded strings 2004-10-10 22:45:00 +00:00
stronk7 54ce5e46c8 Delete some debug output... 2004-10-10 21:57:58 +00:00
stronk7 ed124087d7 vim is in again... :-) 2004-10-10 21:47:29 +00:00
stronk7 0954d514b8 Central unzip_file() function included:
- Supports both internal and external zip execution.
    - Displays the results of the execution.
    - All Petr's patched added.
    - External zip execution in Win32 supported.
Please TEST, TEST, TEST.
2004-10-10 21:33:46 +00:00
stronk7 2b26825cb2 Now the zip_files() function is working better:
- More checks are done
- Non existing files are out
- Both internal an external are supported and protected
- All Petr's patchs applied
- Included support to Win32 external zip.

TODO: Create a paralel unzip_file() function
      Use this functions in all the FileManager scripts

THOUGHT: External zip seems to work always adding files to
      zip file if it exists, where PclZip resets the file.
      Perhaps a rm (or delete) should be included in the
      command chain. Analyse it!!
2004-10-10 01:01:02 +00:00
stronk7 913f744325 Changes to the zip, unzip, listzip and restore sections of the file:
- Added a new function in lib/moodlelib.php
- Uses the new version of pclzip.php library.
- Petr patches applied.
- Some minor changes to hide full paths under Win32.
- Tested in MacOS X and Win32 (not linux).
- New function zip_files() in moodlelib.php. Not used, but a good start.

Please test it!!
2004-10-07 14:04:37 +00:00
moodler dcbe5864f6 Damn, typo 2004-10-06 14:19:06 +00:00
moodler 028f222c2a Changed the error logging format in error_log to make it
- more standard
   - better for multi-site servers
2004-10-06 13:53:55 +00:00
moodler 1721518730 More options for parameter handling ... 2004-10-02 16:11:46 +00:00
moodler 98cda81fcf Better check for integer when cleaning parameter 2004-10-01 15:04:21 +00:00
moodler edfa37ae27 Added a new sesskey variable to perform better checks of identity
for some scripts.

Thanks to Petr for finding the exploit!
2004-10-01 14:09:30 +00:00
moodler ed6804bf75 New functions to check parameters:
required_param()
   optional_param()

Putting them in stable to aid backward compatibility later
2004-10-01 08:40:41 +00:00
moodler be35eacfb3 Added new function parameter(). Eventually this will replace all the
optional_variable and require_variable calls anyway, but it's needed
in STABLE to fix some security issues.

See bug 1865.
2004-09-28 15:27:08 +00:00
moodler 69a791b831 Do safety check on $auth pathname before doing include. Thanks, Petr Skoda! 2004-09-27 12:50:23 +00:00
moodler e335cc7193 EVeryone can login to the site all the time 2004-09-25 15:21:31 +00:00
moodler f8ab1daa7c Merged forum post headers feature from HEAD into 1.4.x so that we
can use this on moodle.org posts (among other sites ;-)).
2004-09-18 08:18:02 +00:00
mchurch 5ec9237d2b Fixed remove_teacher, so that a removed teacher is also removed from any
groups they belong to.
2004-09-14 23:41:27 +00:00
moodler 7d8e444763 Improved enrol_student so it can update older records 2004-09-09 09:26:29 +00:00
moodler a50ded84ea Adding this (optional) feature to 1.4 stable because it seems quite
a few people really need it.
2004-09-07 02:50:03 +00:00
moodler 36d0082229 FIxed up recent problems with external authentication
http://moodle.org/mod/forum/discuss.php?d=11723#57001
2004-08-31 12:23:24 +00:00
gustav_delius d31cdc0ee9 isteacher() with no arguments now does the expected 2004-08-30 20:54:42 +00:00
gustav_delius 129af65665 fixed the isstudent function 2004-08-30 19:09:36 +00:00
moodler a8db8bdc3e Fixed an unquoted string 2004-08-30 17:45:51 +00:00
gustav_delius 30bc2fa671 This now implements the new rule on who is a site student, see http://moodle.org/mod/forum/discuss.php?d=8452#56743 2004-08-30 16:42:32 +00:00
gustav_delius eb4f1a380a course teachers are also site students. 2004-08-30 08:13:14 +00:00
moodler fda51b8d69 Fixes to authentication logic to help upgraders (ie admin and guest accounts) 2004-08-29 05:42:11 +00:00
moodler 72fe9309f3 Fixed an echo -> mtrace 2004-08-24 14:23:01 +00:00
gustav_delius 0420e8715d removed empty bullet point 2004-08-23 20:34:52 +00:00
moodler 2a0f66b4f2 Fix bug in performance_info on IIS http://moodle.org/mod/forum/discuss.php?d=22013 2005-04-16 17:02:05 +00:00
moodler d6bf473ec2 Added file_get_contents for PHP before 4.3.0 2005-04-16 12:22:24 +00:00
moodler c70fa20146 New function shorten_text to truncate text neatly 2005-04-14 17:03:11 +00:00
defacer 4f2dbde9f8 Fix for bug 2916, silly silly named constant mistake.
Since we 're at it, fixed another bug: automatic recalculation of DST table
without having to logout if the user changes his timezone now works correctly.
2005-04-14 12:20:09 +00:00
moodler 4febb58f71 Slightly more correct version ;-) 2005-04-14 02:13:47 +00:00