40 Commits

Author SHA1 Message Date
skodak
6bb0816313 MDL-14679 towards course conversion 2008-06-02 08:13:24 +00:00
skodak
579d45b434 MDL-14679 converted some get courses 2008-06-01 18:12:24 +00:00
skodak
f400841b23 MDL-14679 converted some get courses 2008-06-01 17:59:13 +00:00
dongsheng
7ade55ad96 "MDL-14668, fix course full in activity reports (upgrade course module version)" 2008-05-16 02:15:23 +00:00
dongsheng
f581f8d64b "MDL-14129, fix print_error" 2008-05-01 05:44:41 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
skodak
76b570d602 MDL-12938, MDL-12937 - unenrol fixes - can not unenrol if can not unassign all users roles in course, do not show self unenrol if enrolment comes from parent context, fixed rturn value from get_user_roles; based on patch by Eric Merrill; merged from MOODLE_19_STABLE 2008-02-05 12:59:28 +00:00
poltawski
6972c07a61 MDL-10241 - unenrolling self wasn't working properly from user profile
because unenrol.php was doing wrong capability check when $userid set.o
Also improves the lanaguage used when unenrolling self.
merged from MOODLE_18_STABLE
2007-12-23 16:18:25 +00:00
skodak
128f098418 MDL-11640
* improved handling of dirty contexts in general - caching, switching in cron, marking, loading, etc.
* role_assing() and role_unassign() now marks dirty contexts because we use has_capability() in this function - we can not do it later outside to speedup bulk operations
* fixed some inline docs
* fixed notice from rs closing
* removed cached $CONTEXT from has_capability() - $context is now required parameter; this was hiding serious bugs when context did not exist or ppl passed false as parameter
* removed some ===, we can not use these on function parameters - we must support ints, strings, '', nulls, etc. - this could be a source of really dangerous bugs in future
* some other improvements and fixes - documented inline
2007-10-09 12:49:54 +00:00
martinlanghoff
57770b87d0 Interactive enrolment/unenrolments: make sure we unset mycourses 2007-09-19 07:17:23 +00:00
martinlanghoff
0e801c6c9d course/unenrol: check $USER->access[rsw] for role switches 2007-09-19 07:15:38 +00:00
martinlanghoff
3d3def3a4e course/unenrol codepaths mark the context dirty - bugfix
Oops. one if() branch was missing the mark_context_dirty(). Fixed.
2007-09-19 07:12:43 +00:00
martinlanghoff
a9d4ea7849 All interactive enrol/unenrol codepaths mark the context dirty
Manually enrolling and unenrolling self, and other users should
transparently set the context dirty. So walk all callers to
role_assign() and role_unassign() and mark the context dirty
where appropriate.

OTOH, most automated-backend enrol/unenrol mechanisms should not.
The backend lookups that happen when you login are well covered
by the login/enrolment process, and don't need to be marked dirty.
2007-09-19 07:11:42 +00:00
nicolasconnault
0be6f67819 MDL-10870 All files updated to new build_navigation() method. Most are untested, because they are not easily accessible within a moodle site. 2007-08-17 19:09:11 +00:00
moodler
a6f39157c6 Merged unenrol fixes from stable MDL-6964 MDL-7123 2006-10-23 03:12:37 +00:00
moodler
8d73640e7f Unenrol fixed to support other users too and better workflow 2006-09-28 08:55:04 +00:00
moodler
8cb5bc2b26 People under switched roles should not be able to unenrol 2006-09-21 16:11:31 +00:00
tjhunt
43e3febb23 Delete what I assume is a bogus line. 2006-09-13 13:25:00 +00:00
moodler
761a15574c Fixed up this script so that self-unenrolment works as expected 2006-09-13 06:41:58 +00:00
skodak
f2a365b976 general cleanup of xxx_parameter() functions 2006-04-12 16:59:51 +00:00
patrickslee
9edf8e04e5 More restrictions on enrol/unenrol of meta courses. Thanks to Bug #4057
Merged from MOODLE_15_STABLE
2005-11-15 21:55:13 +00:00
thepurpleblob
59518de11e require_variable() and optional_variable() replaced with required_param() &
optinal_param() plus other tweeks to suit. Improve security.
2005-06-15 09:39:26 +00:00
gustav_delius
cd8d4471c8 Print course in footer 2005-03-17 15:12:07 +00:00
stronk7
967cd1164b course/unenrol.php is using sesskey.
Merged from MOODLE_14_STABLE
2004-10-09 19:08:01 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
gustav_delius
24f2b65a4d towards XHTML compliance 2004-09-12 12:21:27 +00:00
gustav_delius
f7f2ff6dba Only editing teachers are allowed to unenrol students 2004-05-30 20:54:58 +00:00
moodler
d7e1bae056 Use fullname function to display names 2003-11-28 10:41:06 +00:00
moodler
5204d8316a A new configuration parameter 'allowunenroll' will enable/disable the
"unenrol me" buttons on user pages and course pages.
2003-10-12 18:03:50 +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
7a361c8b55 Removed save_session() - no longer needed. 2003-02-27 02:46:37 +00:00
moodler
b0e3a92523 Clean sweep through all the important changing all include(), include_once()
and require() to require_once()
2003-01-05 14:19:20 +00:00
martin
45aa6d563c Fixes to unenrolling students, and unenrol_student() and remove_teacher()
now remove forum_subscriptions correctly
2002-09-22 14:33:21 +00:00
martin
d578afc883 Major cleanup of user administration and display, including sortable listings,
confirmation on deletions, removing deleted user from all student lists,
teacher lists and subscription lists and freeing up their username and
email to be used again.
2002-09-22 14:06:38 +00:00
martin
97c270e9a8 Changes related to language support ... get_string()
Minor little interface cleanups along the way
2002-08-11 15:41:54 +00:00
martin
8223d27193 Widespread changes throughout Moodle to make sure it works on
servers that have register_globals turned off (this is the
default setting on newer version of PHP).

In fact it's partly a hack that globalises all GET, POST, FILES
AND COOKIE variables.  Unfortunately though the SESSION and
USER global session variables are only available as $_SESSION["USER"]
and $_SESSION["SESSION"], which is cumbersome to use.

So, for every request I now make a copy of these two session variables
into $USER and $SESSION.  Whenever I update them thoughout Moodle I
now have to call save_session("USER") which copies them back to the
session variable.  This seems to be working well now.

Because I'm using $_SESSION etc now this will raise
the required minimum version of PHP to 4.1.0
2002-08-06 17:23:45 +00:00
martin
f93f848ab3 Mass change related to separating forum from discuss and making it a
separate module (again).  This frees up forums for some interesting
developments.  Note that database tables have moved around.
2002-06-20 15:15:22 +00:00
martin
7dc1ea300a Modifications to unenrol. Now a teacher can unenrol students from the course. 2002-06-19 15:42:49 +00:00
martin
20695824e5 Remember to remove subscriptions when unenrolling. 2002-06-05 16:39:45 +00:00
martin
e13607280e Cleaned up enrol and unenrol process a bit 2002-06-04 06:30:51 +00:00