108 Commits

Author SHA1 Message Date
martinlanghoff
c633af7a5a course/edit: mark the course contextpath as dirty to force a reload
Combined with the path creation in create_context() we can now create
a course, enter and edit it immediately. Amazing.

Like - 21st century technology.
2007-09-19 07:13:20 +00:00
nicolasconnault
73c24ef80b MDL-10870 All files updated to new build_navigation() method. 2007-08-16 15:01:25 +00:00
moodler
76655d6ff1 Make course themes work on course settings page MDL-10833 2007-08-13 13:35:29 +00:00
toyomoyo
e513826187 MDL-9983, adding triggers for certain events, no handler implemented 2007-07-09 06:43:33 +00:00
skodak
1898ccac4c MDL-9929 we need some other name for password field in course edit page 2007-06-10 20:43:43 +00:00
moodler
bfefa87eab Moved create_course and update_course into course/lib.php and cleaned them up to be more useful in general MDL-9015 2007-03-23 02:29:05 +00:00
toyomoyo
0150c561c5 fix for MDL-8966, customizable role names 2007-03-22 08:11:30 +00:00
skodak
5e992f564b MDL-8867 Add setting to define role that is assigned to creators in new courses
MDL-8868 Set only minimal permissions for creator role

+ improved accesslib to handle changes of context levels in capability definitions

merged from MOODLE_18_STABLE
2007-03-14 21:42:38 +00:00
moodler
6ba65fa08d Merged Nicolas' changes from MDL-8582 into HEAD. 2007-02-28 06:25:22 +00:00
vyshane
2585a68d54 Merged from 1.8. 2007-02-16 08:46:55 +00:00
skodak
beac4717de MDL-8166 rename in/out methods in formslib - HQ consensus 2007-01-12 18:52:09 +00:00
jamiesensei
ccbef0e2b7 moved set_defaults to main script out of definition method. 2007-01-12 05:07:22 +00:00
jamiesensei
a23f0aaf95 * Added setAdvanced functionality see http://docs.moodle.org/en/Development:lib/formslib.php_setAdvanced
* Added MoodleQuickForm method closeHeaderBefore($elementName); http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#Use_Fieldsets_to_group_Form_Elements
* Added moodleform method add_action_buttons(); see http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#add_action_buttons.28.24cancel_.3D_true.2C_.24revert_.3D_true.2C_.24submitlabel.3Dnull.29.3B
* is_cancelled method added to moodleform http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
* added hidden labels to elements within groups such as the date_selector select boxes and other elements in 'groups'
* quiz/mod.html migrated to formslib
* glossary/edit.html migrated to formslib
* extended registerNoSubmitButton() functionality to automatically add js to onclick to bypass client side js input validation.
* added no_submit_button_pressed() function that can be used in a similar way to is_cancelled() as a test in the main script to see if some button in the page has been pressed that is a submit button that is used for some dynamic functionality within the form and not to submit the data for the whole form.
* added new condition for disabledIf which allows to disable another form element if no options are selected from within a select element.
* added default 'action' for moodleform  - strip_querystring(qualified_me()) http://docs.moodle.org/en/Development:lib/formslib.php_Usage#Basic_Usage_in_A_Normal_Page
2006-12-19 07:03:08 +00:00
skodak
396254981f coding style fixes MDL-6949 2006-11-09 22:08:30 +00:00
skodak
2378265e51 course/edit.php now uses new forms lib, the old one is gone; please report any problems in MDL-6949 2006-11-09 21:29:31 +00:00
skodak
a81bf9c3ce refactored course/edit2.php and edit_form MDL-6914 ; set $CFG->use_new_forms=1; in config.php if you want to test it ;-) 2006-10-13 09:58:53 +00:00
skodak
6124048972 major whitespace cleanup - fixed tabs 2006-09-20 20:31:09 +00:00
toyomoyo
9c37662f22 replacing deprecated funciton calls with capability calls 2006-09-19 09:16:24 +00:00
skodak
b79da3ac68 moodle/course:managemetacourse is now singular 2006-09-19 06:35:52 +00:00
skodak
339dc4e28f metacourse fixes for course editting 2006-09-18 09:37:51 +00:00
toyomoyo
24671bd8b4 validation should not watch out for teacher and students string anymore 2006-09-18 09:16:49 +00:00
toyomoyo
65becbc3ef if the user has no capability, after creating a course we add him to the first role with legacy:edittingteacher, to make him a legacy editting teacher 2006-09-18 09:10:03 +00:00
moodler
88af238ccb $CFG->defaultcourseroleid defines a site default for the role given to
people who enrol in the course.

$course->defaultrole defines the value for each course for what role
should be used in the same case.   Naturally it defaults to the site config
(when it is zero).

This role is retained even when the person editing the course settings
doesn't actually have that role in their list of assignable rights (however
they are prevented from actually switching to any such role themselves).

Note that enrol plugins are free to ignore these values and use whatever
roles they like.  Generally, though, they should respect these settings.
2006-09-17 09:22:33 +00:00
toyomoyo
41d7209c7f some (mainly admin realated) capabilities 2006-08-25 08:27:27 +00:00
moodler
0468976c9a SWEEPING CLEANUP
The API was changed slightly so that has_capability now takes the
whole $context object (we almost always have it anyway)

The $kill thing was removed.   If you want to assert a capability
then use:

    require_capability('capname', $context);

with optional variables to modify the error message

Misc bugs here and there also removed and code tidied
2006-08-14 05:55:40 +00:00
moodler
bade10e350 Removed all of the "Restricted users" hack because Roles can do it all better. 2006-08-13 07:01:57 +00:00
moodler
bbbf2d4015 ROLES AND PERMISSIONS - FIRST CHECK-IN
=======================================

WARNING:  DEV IS CURRENTLY VERY UNSTABLE.

This is a mega-checkin of the new Roles system.   A lot of changes have
been made in core and modules.

Currently there are a lot of rough edges and known problems.  We are
working hard on these .. .the reason for getting this into HEAD at this
stage is enable us to move faster (our branch was diverging from HEAD
too much).

Please keep an eye on http://docs.moodle.org/en/Roles for current status
and information for developers on how to use the new Roles system.
2006-08-08 05:13:06 +00:00
skodak
43d774a94f Bug #6120 - Course creation - loginproblem; merged from MOODLE_16_STABLE 2006-07-17 08:39:36 +00:00
urs_hunkler
8c75d90f8d bug #5347 - JS code after page end??? corrected 2006-04-26 15:00:22 +00:00
skodak
f8a5159a2b changes needed for new s() and p() - see bug #2338 2006-04-14 08:02:32 +00:00
martinlanghoff
f9667a5aea [multienrol]Initial commit for multi enrolment plugin feature 2006-03-09 02:48:29 +00:00
skodak
de9924ae0a parameter cleaup - round 8; short php tag in group-edit.html 2006-03-07 19:36:13 +00:00
skodak
8871ccdce4 cleaning of parameter, initialized variable SC#168; merged from MOODLE_15_STABLE 2005-10-29 16:18:18 +00:00
patrickslee
f89033b111 New feature: Course enrollable control with date range 2005-10-04 01:59:19 +00:00
mjollnir_
0705ff843b Course request feature. Allows normal users to 'request' courses they would like created,
and admins can approve or reject pending courses.

Also, contains the ability to restrict activity modules on a per course basic. Strict config options:
  enable restricting modules at ALL (for all courses, no courses, requested courses), what to do by default for newly created courses
  as well as what modules to enable for above category by default.

This feature was created for the aim of building a community side to moodle - for institutes that have strict courses and enrolments, allowing normal users to request interest courses is a good feature,
but some modules may be redundant (assignment, lesson, quiz etc)

  Please test!
2005-08-16 06:15:49 +00:00
moodler
3d2c41f4d3 Add currency to cost 2005-07-22 18:52:58 +00:00
thepurpleblob
7168423c82 Replaced require_variable(), optional_variable() with approproate
required_param(), optional_param() etc.
2005-06-14 09:21:09 +00:00
moodler
005d0078cb New courses are logged to the site log 2005-03-14 07:31:47 +00:00
martinlanghoff
b935c832ec Merged from MOODLE_14_STABLE - Provide an explicit sortorder for new courses in empty categories, and run fix_course_sortorder() after adding the course to make sure its in the appropriate range for the category. This mege adds fix specific to HEAD: it reverts an earlier bad fix. 2005-02-24 21:22:06 +00:00
martinlanghoff
008621712f Fixes for null sortorder on empty categories. 2005-02-22 03:23:41 +00:00
defacer
7542a4e574 Dropping the use of MOODLE_PAGE_COURSE <gasp>!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.

On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.
2005-01-31 02:18:15 +00:00
moodler
810393c804 Removed THEME from many course files 2005-01-25 14:03:43 +00:00
martinlanghoff
acba70d2db Merged from MOODLE_14_STABLE - Ensuring correct sortorder at the beginning of the category when creating courses. 2005-01-25 05:03:43 +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
martinlanghoff
1ad9d071c9 Merged from MOODLE_14_STABLE - Closing SC#66 2005-01-22 09:00:42 +00:00
defacer
9b12850043 Fix for bug 2241:
I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(

Also moved the only two functions of the API outside the page_base class.
2004-11-29 04:19:05 +00:00
defacer
f032aa7a5f MAJOR CHANGES:
--------------

Brand-new pagelib.php at your disposal! It slices, it dices, it makes your coffee.
It still doesn't understand women... Read the comments in pagelib.php for a first
impression. Feedback highly encouraged!

Blocks code has undergone significant changes to work with Pages. Flexibility is its
middle name, since I think (without having tried it) that adding e.g. a third
placeholder for "center" blocks in courses, with full support for moving around etc,
will now take about 15 lines of new or edited code. If you are not impressed yet, I
suggest watching a documentary on solar physics. :P

MINOR CHANGES:
--------------

Added instance_allow_config() in the blocks class hierarchy to supplement per-instance
configuration options. You can override it to return true and thus get configuration
amenities without allowing multiple instances.

Minor polishing to comments and documentation (whatever caught my eye was game).

Tightened up some code here and there by utilizing all the new features.

BUGFIXES:
---------

A bug in restore_execute.html caused hidden blocks to not be restored at all.
2004-11-08 19:36:07 +00:00
defacer
9b4b78fd6a Da monster-commit of blocks version 2!
Code based on the work of Daryl Hawes for the blog module. Thanks, Daryl!

Please test the hell out of it as it's sure to have issues that need to be
ironed out.
2004-10-19 21:04:28 +00:00
stronk7
38c8de9591 course/edit.php is using sesskey.
Merged from MOODLE_14_STABLE
2004-10-08 18:13:05 +00:00