218 Commits

Author SHA1 Message Date
moodler
a8f6842661 Fixing some of the standard notice functions, adding styles and buttons 2005-02-08 17:09:41 +00:00
martinlanghoff
d6a49dab9f Merged from MOODLE_14_STABLE - fix_course_sortorder() bug #2509 - Should fix overlaps when moving categories with large gaps -- affects only mysql. Prevent from landing even near the newly assigned range during the temporary shift. 2005-02-08 03:42:20 +00:00
mjollnir_
ffed6bf316 Better fix for 2479. This time I'm 99.999999% positive it's fixed ;) 2005-02-07 09:32:24 +00:00
mjollnir_
835c8061b6 Removing db ids (found their way in from copying sql - bad) from last patch 2005-02-07 09:27:03 +00:00
mjollnir_
178ccd11c0 Fixing bug 2479. Can't figure out a way to do it with a left join at this stage but the query doesn't look too bad. Anyone who thinks they can figure out a more elegant way for it is welcome\! 2005-02-07 09:22:07 +00:00
mjollnir_
e5cf5750cf Modification for datalib (modify_database) to ignore lines that start with -- as well as # (postgres) 2005-02-01 20:45:46 +00:00
mjollnir_
bf60471bc8 Fix for metacourses. Courses with course->metacourse shouldn't be offered in the courses to add dropdown 2005-02-01 04:51:28 +00:00
martinlanghoff
94afadb360 Merged from MOODLE_14_HEAD - Better behaviour of fix_course_sortorder() -- related to bug #2334 2005-02-01 01:37:14 +00:00
mjollnir_
d20f58e7e8 Fixing column_type for postgres (WHERE 0 is not valid so using LIMIT 0 instead) 2005-02-01 00:28:02 +00:00
defacer
7c81cc29b9 Added a new function, column_type(), based on ADOdb's MetaType().
Attempting to make ALTER TABLE for Postgres really smart... this is
the solution to bug 2460 if it works correctly.
2005-01-31 23:24:43 +00:00
mjollnir_
e3a232138a Fix for add_to_log to stop notification of invalid call to isteacher. Some actions aren't associated with a course and therefore isteacher shouldn't get called 2005-01-27 02:29:53 +00:00
martinlanghoff
758b9a4d80 Merged from MOODLE_14_STABLE - Fixing bug 2334 - where fix_coursesortorder() sometimes leaves overlapping sortorder values across categories 2005-01-25 05:27:41 +00:00
mjollnir_
5f37b628ae Update for meta courses. New table renamed from meta_course to course_meta (and upgrade script provided in mysql.php and postgres7.php) and new field in course table renamed from meta_course to metacourse. Associated changes in code. Please test me! 2005-01-25 04:33:02 +00:00
mjollnir_
b61efafba5 Initial checkin for new meta courses feature. Please test!
See http://moodle.org/mod/forum/discuss.php?d=17269 for description.
2005-01-24 22:21:28 +00:00
defacer
9407d4563f According to the final comments in SC#65:
Made isteacher() require that the first parameter (course id) be
specified and non-empty. If it is empty, [i.e., 0, which was used to
simulate what has now become isteacherinanycourse()], then the return
value IS correct but a warning is printed on screen. This should allow
us to track down any such calls in legacy modules without breaking Moodle.

The correct way to check for teacher status in ANY course is now to
call isteacherinanycourse().
2005-01-23 21:38:01 +00:00
martinlanghoff
39f6559530 Fix bug #2334 - New unique undes in course table causes course move to fail
There were several issues in fix_coursesortorder() that were fixed. Mainly:
 - the recursive calls dropped the $safe parameter
 - we did not even try to maintain uniqueness in the sortorder field across categories

http://moodle.org/bugs/bug.php?op=show&bugid=2334
2005-01-13 02:34:45 +00:00
fiedorow
51b0e824d2 Fixed missing / separator 2004-12-31 15:41:23 +00:00
dhawes
2502395fae fixing an instance of hardcoded /admin/ as per Zbigniew Fiedorowicz's fix (in 1.4.3+?) 2004-12-30 19:10:44 +00:00
moodler
114176a25e add_to_log now always updates user->lastaccess 2004-12-28 14:59:29 +00:00
gustav_delius
b63c0ee521 Fixes a bug with user events created by an activity module.
The old code assumed that the courseid would always be set but that is only the case for course events, not for user or group events. (See http://moodle.org/mod/forum/discuss.php?d=4466#20827 for a discussion about the meaning of the courseid field in the event table)
I also made the $courseid argument to get_coursemodule_from_instance() optional. It is not needed and in some cases it will not be know, as for example for non-course events created by activity modules.
2004-12-26 13:58:07 +00:00
mjollnir_
0044147e10 Merged from MOODLE_14_STABLE: Added empty rather than just testing variable, added trim to search string in get_users and get_users_listing 2004-12-22 23:11:27 +00:00
martinlanghoff
301045e472 Merged from MOODLE_14_STABLE
Fixed upgrade bug that could show up in cases where:

- installations with large numbers of courses in a category AND 'hidden' courses in those categories
- where the database upgrade was performed while NOT in a logged-in-admin session
fix_course_sortorder() would fail to guarantee the uniqueness of course,sortorder and the new unique index on that column would fail  to be created.

Sigh.
2004-12-22 22:47:28 +00:00
moodler
2d2da684c6 Merged changes from stable (notice fix) 2004-12-15 13:24:19 +00:00
mjollnir_
a2ddd957f2 Merged from MOODLE_14_STABLE: In get logs don't join on the user table for just counting the records 2004-11-25 21:56:32 +00:00
mjollnir_
6b7f8df2ec Merged from MOODLE_14_STABLE: Fixing use of UCASE and LCASE in glossary which are not postgres friendly - two new functions in datalib, db_uppercase and db_lowercase which return the database-correct functions to use. Some were already fixed in HEAD - those have been left as they were 2004-11-23 23:05:06 +00:00
mjollnir_
1604a0fc2b Merged from MOODLE_14_STABLE: More small sql tweaks to avoid invalid postgres sql 2004-11-23 02:05:47 +00:00
mjollnir_
b565bbdfe2 Merged from MOODLE_14_STABLE: Fixes in datalib and backuplib for postgres invalid sql 2004-11-22 04:24:30 +00:00
mjollnir_
a967637614 Merged from MOODLE_14_STABLE: modify_database function change - if no ; in single line sql strings, add it 2004-11-22 04:11:07 +00:00
moodler
1734f08ea4 In execute_sql, if feedback is not required then don't even show the
ADOdb feedback.  Makes those careful DROPs look less frightening!  :-)
2004-11-18 03:36:52 +00:00
martinlanghoff
2b49ae96a6 Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-305 - Postgres SQL bugfix for instance_is_visible() 2004-11-18 02:37:52 +00:00
martinlanghoff
6315b1c8b6 Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-222 - SQL improvements\n Better SQL performance for get_courses() and get_courses_page() calls, specially from the categories page. This gives much better performance when browsing existing courses 2004-11-18 02:31:53 +00:00
mjollnir_
ba87a4daf5 Merged from MOODLE_14_STABLE:
Fixes to fix_course_sortorder() and course/category.php pages. (martinlanghoff)

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-160
  Minor fix: moodle would crash on high number of courses when doing course creation -- should be more scalable now

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-164
Fix a bug I have introduced in fix_course_sortorder() - v2

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-210
  Fixed nested transaction in fix_course_sortorder()

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-215
  Performance and memory usage fixes for re-sort courses function

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-268
  Major performance and correctness improvements in the functions that move courses up and down, reorder by name, and in fix_course_sortorder(). All now assume course-sortorder is unique (this is enforced at the DB)

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-332
  fix_coursesortorder() bugfixes and logic simplification

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-333
  courses listing enhancements: bugfix on re-ordering, keep the right page on actions
2004-11-17 06:57:28 +00:00
mjollnir_
1ed5abc877 Merge from MOODLE_14_STABLE: moodle--eduforge--1.3.3--patch-207(partial) + moodle--eduforge--1.3.3--patch-408 - added begin_sql() and commit_sql() (martinlanghoff) 2004-11-17 05:31:21 +00:00
moodler
169fc66a15 Merged small speed improvements from STABLE 2004-10-18 06:00:26 +00:00
dhawes
2f87145ba2 Further documented new *SECS contants where they are declared as well as in each function that uses them 2004-09-29 18:56:50 +00:00
moodler
6159ce6582 Fixed typo from recent addition of all the DAYSECS etc ... 2004-09-29 09:12:55 +00:00
mjollnir_
ea09b04bbd Postgres bufix 2004-09-29 00:45:06 +00:00
paca70
7a5672c90c Replaced time related "magic numbers" with constants, what are hopefully
more easier to read.
2004-09-28 05:53:08 +00:00
moodler
d0d56205f4 Fixed some of Daryls typos 2004-09-26 02:10:38 +00:00
moodler
f6f319f852 Merged fox for bug 1991 to head 2004-09-25 15:19:40 +00:00
dhawes
89dcb99da2 More phpdoc work 2004-09-25 05:29:21 +00:00
dhawes
c6d15803f6 Additional phpdoc compatible comments added. 2004-09-25 01:29:37 +00:00
dhawes
fbc21ae8c9 More phpdoc comments added and updated. Also a few double quote string to single quote literal changes. 2004-09-24 21:28:22 +00:00
moodler
c7fe5c6fdc Merged new functions for get_courses and get_courses_page from STABLE 2004-09-23 07:46:41 +00:00
moodler
ae01b52a70 One line I changed 2004-09-23 02:59:12 +00:00
dhawes
7cf1c7bd2b Additional phpdoc comments and fixes for bugs 1981 and 1984 2004-09-23 02:48:41 +00:00
dhawes
d4419d55a2 Conversion of double quoted string to single quoted literals. Also added some extra spacing around concatenated strings for easier reading. 2004-09-22 16:15:23 +00:00
gustav_delius
8f0cd6ef0f Resolved problems with previous replacement of
& to & and fixed redirect() to entity encode the
inut where needed.
Julian Sedding
2004-09-21 11:41:58 +00:00
gustav_delius
dcb1bd3c9a towards XHTML compliance 2004-09-12 13:21:01 +00:00
moodler
09f275ce55 Merged from stable 2004-09-10 06:05:29 +00:00