128 Commits

Author SHA1 Message Date
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
moodler
5a74165523 FIxed up function get_user() which now takes lots of parameters and
can be used all over the place.

Also, related fixes to "add admin" (MUCH better performance) and the user listings

More to come for "add teacher" and "add creator"
2003-05-14 15:19:04 +00:00
paca70
a918234e91 Postgres limit fix 2003-05-05 16:13:45 +00:00
paca70
8a230a7d96 Better postgresql support for column creation 2003-05-04 16:03:45 +00:00
moodler
9d6f5d42eb Only retrieve records that are needed (eg description never is used) 2003-04-29 03:16:32 +00:00
paca70
28ba0d55cc ...And now it works 2003-04-28 15:24:13 +00:00
moodler
b86fc0e2a6 New feature replacing the old zoom function.
Now these are saved in a new table called course_display,
each user and each course can have independent settings.

I'm intending to expand this table later for all the other
course display stuff (like hidden topics etc)
2003-04-28 13:29:26 +00:00
paca70
9655b654a5 Now postgres works as it should, returned primarykeys are correct. 2003-04-28 12:51:19 +00:00
paca70
6492992616 I did't test previous change well, have take changes back. 2003-04-28 12:02:29 +00:00
paca70
e9ececbb1e $db->Insert_ID seems to work with postgresql too 2003-04-27 16:03:01 +00:00
moodler
30f89d6833 New delete_records_select() function 2003-04-27 06:18:03 +00:00
moodler
ec2a28a607 Extended number of select fields allowed for get_field() and set_field() from 1 to 3 2003-04-26 12:38:04 +00:00
stronk7
86e6076b3b Modified the instance_is_visible function. It has a bug, having
the "forum" table harcoded. Simplify a bit. Now seems to work
fine with every mod.
2003-04-26 09:34:11 +00:00
moodler
580f2fbc07 New function to detect visibility of a single module, and
use of this function when displaying list of forums
2003-04-25 05:24:29 +00:00
stronk7
7cfb83477c Modified to obtain the visible property too. To use it when showing the list
of instances of every mod (bug #364)
2003-04-24 15:17:43 +00:00
moodler
7acaa63d09 Tidy up a bit 2003-04-23 16:57:35 +00:00
stronk7
00d26a208b Changed the get_course_mods function to obtain the visible property too. 2003-04-23 16:09:56 +00:00
paca70
cefc7e817e Fix for postgresql column adding( $oldfield is always '"$oldfield"') 2003-04-18 20:50:42 +00:00
moodler
1acfbce5b6 Hide/show individual activities in any section
Code submitted by Eloy Lafuente (thanks!) for 1.0.8 ... I hand-merged it
into 1.0.9.
2003-04-14 15:11:09 +00:00
moodler
2d0b30a028 What was I thinking? This is much cleaner (and no duplicates). 2003-03-29 04:08:51 +00:00
moodler
adaf39283c Changes to activate the "force subscribe" option on the Site News forum.
By default it is OFF, but if it is turned on, then site news is emailed
to ALL enrolled students and ALL current teachers.
2003-03-29 03:39:56 +00:00
moodler
e384fb7b73 Can now count a search of users 2003-03-21 10:10:21 +00:00
moodler
c750592ac4 Added a search form to the "edit users" admin page yay! 2003-03-21 09:42:42 +00:00