100 Commits

Author SHA1 Message Date
moodler
489b291962 When searching users don't use "LIKE" for all databases. 2003-09-19 08:33:27 +00:00
moodler
160e811553 Don't grab unconfirmed users in user listing 2003-09-18 11:51:05 +00:00
moodler
7a1ade1b78 Make get_course_students backward compatible 2003-09-18 04:50:22 +00:00
moodler
4969ad7400 First attempt at proper paging for the user page.
Still needs some work ...
2003-09-18 04:46:34 +00:00
moodler
30222590f7 When adding a new column, set all the default values manually 2003-09-14 17:39:18 +00:00
moodler
18a97fd84d Some early phpdoc-style documentation (thanks to Russell Jungwirth!)
Fixes for use of MySQL-only CONCAT function on other databases
2003-09-14 04:04:15 +00:00
moodler
88487dea6d One GROUP BY -> DISTINCT 2003-09-10 13:28:27 +00:00
moodler
0db8b2e2b7 Some fixes for PostgreSQL (use DISTINCT) 2003-09-10 13:17:13 +00:00
moodler
f1c1b17ab5 Some small fixes to the category display:
- small numbers of courses (less than 8) are displayed in full,
    unless the creator or admin is editing.

  - course counts are now accurate when all courses are removed from
    a category
2003-09-03 14:05:31 +00:00
moodler
3af6e1dbb8 Allow Course creators to see all hidden categories and courses 2003-09-03 08:29:05 +00:00
moodler
5b6a1dd3ad Invisible courses get put last on the My Courses listing 2003-09-03 08:10:02 +00:00
moodler
2962233937 Fixed a little typo on PostgreSQL code 2003-09-03 08:02:01 +00:00
moodler
de9cbba690 Minor change to make user searches a bit better
Next time I'll put proper paging in
2003-08-27 13:36:22 +00:00
moodler
7f12f9cdd9 'Extras' in cached course modinfo activities is now returned.
This means that Resources can now employ them on the index listing.

Specifically, Resources that are popup now popup from there too.
2003-08-26 13:47:46 +00:00
moodler
1a5ab4490f Improvements to logs when looking at site logs.
Also, improvements to get_site_users (slower but it works now!)
2003-08-23 06:19:05 +00:00
moodler
7a7ac154a4 Some small fixes when deleting a category 2003-08-22 12:49:37 +00:00
moodler
519d369f60 Added full paging to all displays of logs! :-) 2003-08-22 06:07:18 +00:00
moodler
2f3499b70d Fixed up get_my_courses().
It's not a tidy SQL statement any more but it's MUCH MUCH faster
with large data sets.
2003-08-21 17:24:40 +00:00
moodler
8130b77b40 Split get-courses_page from get-courses so they can specialise 2003-08-21 14:04:04 +00:00
moodler
53b67df521 Fixed the SQL for teachers and students 2003-08-21 12:19:09 +00:00
moodler
f68e5995e5 Fix for non-logged-in person 2003-08-21 09:39:07 +00:00
moodler
8ef9cb5618 Some fixes to handle very very big categories.
- paging
  - more efficient SQL
2003-08-21 09:33:07 +00:00
moodler
356fea4a64 Slightly better 2003-08-21 08:20:20 +00:00
moodler
5640353876 Course search shouldn't find the "site" course. 2003-08-21 08:19:28 +00:00
moodler
9936fe81ea The number of courses in the categories is now cached in the
the category, and only updated when courses are moved/added/deleted etc
or the admin looks at the category listing
2003-08-19 09:26:36 +00:00
moodler
a8b5671697 Improvements to course searching
- can search for full words or non words with +word -word
 - no longer groups by category, sorts by full name
 - prints paging as well as total number
 - search help
2003-08-19 05:32:20 +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
94d782eb93 Don't show feedback when running SQL 2003-08-17 01:55:03 +00:00
moodler
64cbb55c2e Make sure it's THIS course that the student is currently enrolled in 2003-08-17 01:49:15 +00:00
moodler
0a08581d61 New function get_recent_enrolments() to more efficiently get recent enrolments 2003-08-17 01:45:26 +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
df4f06706a Added get_courses_search() etc 2003-08-14 11:49:57 +00:00
moodler
4e56c82dab get rid of signed parameter when upgrading columns to varchar or text 2003-08-10 14:38:47 +00:00
moodler
d2b6ba704e Another big checkin.
This includes some significant cleanups to the new course categories
system.  The basic idea is that the categories/course browser is now
unified under one system, and admin features related to that have
all been moved into the browser (as little icons).

I'm much happier with this as a foundation that can scale and be
built upon.

Still to go:

  - searching
  - paging
  - polishing

Also in here are a lot of little cleanups around the place, such as
the initial setup process.
2003-08-07 16:01:31 +00:00
moodler
688d06f442 Added mailformat to user data returned in class listings.
This fixes a bug where students were getting plain mail only
on forums that were force-subscribed.
2003-08-04 05:48:39 +00:00
stronk7
74a0363f0c LIMIT is now working properly. 2003-08-03 21:49:19 +00:00
moodler
0eeac484f3 Extended get_records so it can deal with LIMITs now 2003-07-31 12:18:22 +00:00
moodler
7e1a999c10 Moved fix_category_courses to datalib.php so it's more accessible 2003-07-31 12:09:17 +00:00
moodler
c2cb45451f COURSE DISPLAY REVAMP
OK, some big changes here to the front end, particularly in
course categories and course display.

Course categories can now be nested (to any level).

Courses and course categories can now be manually sorted
any way required.

There is a groovy front end for managing these, and a better
range of options for formatting the front page.

It all still needs some polishing, which I'll be doing over
the next couple of days, including better auto-sorting.

I would not use this on production systems just yet.
2003-07-30 13:02:45 +00:00
moodler
da0c90c313 Fixed user graphs for site-level, all logs 2003-07-25 13:23:28 +00:00
moodler
7e4a64888b When displaying a user's logs for the current day, make the graph
display ALL courses (ie to match the logs printed below).
2003-07-24 01:54:06 +00:00
moodler
7618a8eb92 More debugging/checking on get_record_sql 2003-07-23 06:30:26 +00:00
moodler
4d7a373539 Added some additional error checking of get_record_sql when in debug mode 2003-07-23 04:33:40 +00:00
moodler
a6d82c3f49 New course parameter "visible" which makes the course available to
students.  Defaults to 1 (on).  Teacher can control this from settings page.
2003-07-21 07:31:01 +00:00
moodler
cccb016ae4 When displaying index lists of a particular module's activities,
ensure that the order they are displayed in is always the same as the
order they have been defined in.   See bug 553.

This involved API changes to the function get_all_instances_in_course()
2003-07-12 05:19:18 +00:00
moodler
dc7e8cb582 Add LIMIT of 1 to get_record functions ... the behaviour of returning false
when there were more than one record returned was sometimes causing
problems if the data was unclean due to a bug somewhere.

For example, if there are two copies of a section, then Moodle keeps
creating new ones because it can't find ONE.  This fix prevents that.
2003-06-19 02:18:51 +00:00
moodler
353d033843 get_course_users now calls get_site_users if the course is a site.
There is something wrong with this SQL still though ... it mostly works
but I'm still getting wierd behaviour with small numbers of users.

Need some help here ...  for example just look at get_site_users()
on your test site.

It's supposed to return a list of users who are admins, creators,
teachers or students
2003-05-20 09:33:30 +00:00
moodler
bbf9b1624d Improved get_site_users a bit for efficiency 2003-05-17 06:10:20 +00:00
moodler
a53cef7e80 Removed obsolete get_users_search function 2003-05-14 16:29:26 +00:00