Commit graph

2665 commits

Author SHA1 Message Date
mjollnir_
bd905b4568 Backing out type checking in choose_from_menu and choose_from_menu nested. Perhaps will add casting to string on both sides later 2006-01-16 09:05:23 +00:00
moodler
5d7a2722d5 more bugs 2006-01-16 07:57:56 +00:00
martinlanghoff
18147bc254 lib/datalib.php - fixed missing return and global $CFG
Tidyup after merging Tim Hunt's patches.
2006-01-16 06:35:58 +00:00
martinlanghoff
d53c5dfc63 lib/datalib.php: Fixed a problem that get_recordset() does not return results
Author: Patrick Li <patrick@catalyst.net.nz>
2006-01-16 06:26:47 +00:00
martinlanghoff
eb856e3b4d lib/datalib.php [5/6] Make other methods that obtain a record set use the
appropriate get_recordset* function, instead of duplicating
code.

Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:24:53 +00:00
martinlanghoff
26c0a58702 lib/datalib.php [5/6] Make the get_records*_menu family of functions use the
get_recordset* functions, instead of duplicating code.


Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:23:17 +00:00
martinlanghoff
9b277c0d80 lib/datalib.php [4/6] Make the get_records* family of functions use the
get_recordset* functions, instead of duplicating code.

Note: I've replaced the @deprecated tokens in phpdoc with an indication
that the get_records* calls are valid as convenience calls. The
get_recordset*() calls should be considered for performance and memory
footprint, but are not mandatory.

In a sense, deprecating get_records*() would mean a commitment to remove
them within X number of versions, which I am not sure we will do. Now,
if phpdoc has a @discouraged token, I'd like to hear about it ;-)

Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:17:38 +00:00
martinlanghoff
1184063286 lib/datalib.php [3/6] Move all instances of code that processes the
(..., $field1, $value1, $field2, $value2, $field3, $value3, ...)
part of argument lists to a common method, and improve the
comments relating to those arguments on calling methods.

Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:07:57 +00:00
martinlanghoff
0934b9def8 lib/datalib.php [2/6] Version of Martin Langhoff's patch to add the get_recordset_*
family of methods.

Author: Martin Langhoff <martin@catalyst.net.nz> && Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:05:43 +00:00
martinlanghoff
d4c54cd6a6 lib/datalib.php [1/6] Remove unreachable code (break statements after returns in switches).
Author: Tim Hunt <T.J.Hunt@open.ac.uk>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2006-01-16 06:04:09 +00:00
moodler
e746e4dd99 added missing semicolon in &nbsp (bug#4592) 2006-01-16 04:29:41 +00:00
martinlanghoff
2037106308 Merged from MOODLE_15_STABLE - readfile_chunked() - do not timeout on slow (dial up) clients, and flush buffers explicitly to avoid hogging memory when ob is on 2006-01-16 04:02:28 +00:00
martinlanghoff
061fb2e7c3 datalib: teach moodle to pull an array from a column
the new get_fieldset_sql() gets around the nastiness in get_recordset()
that treats the first column as the unique key of the recordset. You can
now request a column from a table, or a set of values as a set of 1 field
records.
2006-01-16 03:07:23 +00:00
martinlanghoff
99a14a54e8 setnew_password_and_mail() gives users a tmp passwords and emails a notice. 2006-01-16 02:51:02 +00:00
defacer
ce432524ee Changing the naming scheme for auto-generated HTML ids here; due to copy/paste
this might have resulted in non-unique ids in the same page.

REALLY small print issue... isn't it unbelievable what you might find when
digging into CVS for a completely unrelated reason? :-)
2006-01-15 02:32:04 +00:00
defacer
85e0be2aaa Seems I got the only remaining instance of set_default(),
so it's time to draw the curtains.
2006-01-15 01:52:07 +00:00
defacer
f3b6ac1539 Incoming: Bennu library to be used for iCal imports/exports. 2006-01-13 15:06:25 +00:00
stronk7
5eedb21ee1 Always search for languages in both directories, else, one could
be stroking the other.
2006-01-13 14:43:51 +00:00
stronk7
2c76ad371b This was causing some disruption in tests because "SET CHARSET" changes
conection charset to default DB charset and not to the specified 'utf8'.
2006-01-13 14:26:53 +00:00
toyomoyo
e8f7b20f9a more bug fixes =( 2006-01-13 07:24:43 +00:00
mjollnir_
fbcbd77c85 Fixing bug # 4567: warning in get_my_courses 2006-01-12 02:55:59 +00:00
toyomoyo
7c5406967d some bug fixes 2006-01-12 02:39:13 +00:00
toyomoyo
7098681423 adding new fields in xml, and bug fixes 2006-01-11 03:04:57 +00:00
mjollnir_
82c859921b Added selectall/deselectall to files/index.php 2006-01-11 02:26:26 +00:00
mjollnir_
1404079794 added useful function array_is_nested to moodlelib;
added choose_from_menu_nested which takes a nested array and prints
<optgroup> for first level of array and then <option> under that
2006-01-11 02:22:16 +00:00
mjollnir_
d0d272e758 A few changes to weblib - print_checkbox can now return and have script elements, choose_from_menu does type comparisons when testing for selected, added print_textfield function 2006-01-11 02:14:37 +00:00
mjollnir_
79a1029455 Merged from MOODLE_15_STABLE: Metacourse unenrolling: fixes bug #4541 2006-01-10 01:19:44 +00:00
toyomoyo
fb7b685530 adding utf8 support scripts 2006-01-09 06:12:18 +00:00
patrickslee
bbbb201364 Wrong default data for $CFG->changepassword
Merged from MOODLE_15_STABLE
2006-01-09 03:54:11 +00:00
stronk7
dee5beecd7 If both mbstring and iconv are not present, use recode
as last resort to perform charset conversions before using
internal libraries.
2006-01-07 17:15:47 +00:00
stronk7
2412b5ab1b Avoid one notice if the dataroot/lang dir doesn't exist. 2006-01-07 10:00:49 +00:00
stronk7
46115724f5 New current_charset() function added.
Merged from MOODLE_16_UTF8. Abandoning the branch.
2006-01-05 16:04:26 +00:00
stronk7
0dd23062c9 Adding new defaults for email encoding.
Merged from MOODLE_16_UTF8. Abandoning the branch.
2006-01-05 15:59:16 +00:00
stronk7
7124cc16e7 Now rss_unhtmlentities() is not used anymore!
Merged from MOODLE_16_UTF8. Abandoning the branch.
2006-01-05 13:13:06 +00:00
moodler
d3f9f1f85d Moving some functions to setuplib.php so they are first 2006-01-05 07:08:10 +00:00
toyomoyo
f66a6ab716 language list file to keep in /lib, in case user can't use fopen, this list is read to get a list of possible languages to download from download.moodle.org 2006-01-05 06:53:05 +00:00
moodler
fb5928bddd Temporarily restored rss_unhtmlentities that was recently removed by Eloy.
Eloy, you may want to check this... The RSS client block was using this function.
2006-01-05 06:51:46 +00:00
moodler
6aaa17c7cc Merging language-pack-related updates from Eloy's MOODLE_16_UTF8 branch.
Do not use that branch any more!!
2006-01-04 08:23:42 +00:00
martinlanghoff
e2e6b166df Merged from MOODLE_15_STABLE - AdoDB tests cleanup after Secunia Advisory SA18267 2006-01-03 20:53:15 +00:00
martinlanghoff
ed5cc66d5d Merged from MOODLE_15_STABLE: Fix for Secunia Advisory SA18267 - plus logging of suspicious activity 2006-01-03 20:42:39 +00:00
skodak
c59733ef80 improved comments for parameter types (PARAM_XXX) 2005-12-30 15:54:19 +00:00
skodak
16303ee905 fixed session fixation prevention that was broken after cookieless patch SC#205 2005-12-28 19:05:46 +00:00
toyomoyo
33c3578684 changed get_list_of_languages, now checking *_local lang folders, also getting $string['thislanguage'] string from langconfig.php for 1.6 unicode packs 2005-12-21 02:06:25 +00:00
mjollnir_
ddf1935f30 For pinned blocks (that don't have a pageid), make one up on the fly (Fixes bug #4497) 2005-12-20 20:55:37 +00:00
toyomoyo
0afb2f2fb4 merged, bug fix for 4490 2005-12-19 02:12:49 +00:00
defacer
1130633117 NEW FEATURE:
Per-block access controls for creating and editing block instances. Defaults
behave the same as before, and the framework has final say as before.

See relevant discussion at http://moodle.org/mod/forum/discuss.php?d=36444



Other minor changes: Converted "continue" to "break" inside switch statements
(more to the point, although equivalent), change erroneous (but harmless)
"return false" to "break" on failed addition of block instance, removed some
inline comments from block_base (they were duplicated in PHPdoc)
2005-12-17 04:37:55 +00:00
defacer
a9033ad5f8 Faster block_method_result(), my back-of-the-envelope benchmarks say that
call_user_func is about 3 times faster than eval(). Which is no surpise. ;-)

Faster block_load_class() by checking if the block class is already present
instead of relying on require_once() and include_once() which have include
paths and other nasties to take into account.
2005-12-17 03:09:13 +00:00
dhawes
9420ae5bc2 updating magpie to version 0.72 2005-12-14 01:07:54 +00:00
dhawes
9273dc56c1 upgraded Snoopy to version 1.2.3 - see http://www.sec-consult.com/216.html 2005-12-13 23:38:47 +00:00
dhawes
68d2d83622 moving Snoopy references to moodle/lib/snoopy/Snoopy.class.inc 2005-12-13 23:35:54 +00:00