242 Commits

Author SHA1 Message Date
skodak
d1aa1e4855 MDL-17758 fixed hardcoded /admin/ links 2009-01-01 14:25:29 +00:00
dongsheng
771dc7b298 "MDL-14129, fix error() in moodle2" 2008-12-12 05:45:43 +00:00
tjhunt
92f008465c admin tree: MDL-10047 and MDL-13104 weird things happen when you turn editing on and off.
That was becuase not enough information was being passed in for the blocks editing controls to construct the right URL to reload the page.

It is also now possible for admin external pages to add some UI next to the turn blocks editing on/off button. For example, when you are editing the list of course catgories, the turn editing off button is now in the right place.
2008-12-11 09:21:41 +00:00
tjhunt
a90d7cf93d roles ui: Fix notices and XHTML strict. 2008-12-11 09:08:20 +00:00
tjhunt
e33025db6a roles / profile: MDL-14937 remove reference to ra.active column until MDL-13240 is done. 2008-11-26 14:49:19 +00:00
tjhunt
759adfffa9 user's role / capabiltiy report: sort the context tree. 2008-11-25 07:29:14 +00:00
tjhunt
e494fbf171 override roles: MDL-8313 followup - don't show capabilities you can't change the override of in basic mode. 2008-11-24 08:19:33 +00:00
tjhunt
ff493b6b24 roles / profile: MDL-14937 A the user's roles report from contrib to core. Finish. 2008-11-24 06:33:35 +00:00
tjhunt
abfc0304e1 role assign: Don't get duplicate records in potential_assignees_below_course user selector 2008-11-24 04:55:57 +00:00
tjhunt
74f6cf8037 roles / profile: MDL-14937 A the user's roles report from contrib to core.
This is work in progress. I have integrated it into the profile tabs. Now I just need to make it work again.
2008-11-21 08:23:57 +00:00
tjhunt
e6a3587c59 role assign: MDL-17323 Show users from parent contexts ... Refine group labels again. 2008-11-21 06:26:42 +00:00
tjhunt
490740d6cb role assign: MDL-17323 Show users from parent contexts ... Refine group labels. 2008-11-21 06:19:52 +00:00
tjhunt
a792ac1d7a define roles: MDL-16966 etc. more UI polishing
* Remove inconistently placed and unnecessary heading, moving help icon.
2008-11-21 06:19:01 +00:00
tjhunt
698ae7eb24 role assign: MDL-17323 Show users with the role in a parent context as disabled opitons in the existing users box 2008-11-21 05:46:45 +00:00
tjhunt
bed9cec80b define roles: MDL-16966 etc. polishing the new roles UI following a meeting with Martin.
* Move the show/hide advanced button a bit down the page.
* Improve save button caption when creating a role.
* Don't show defaults on the basic define roles screen.
* Explain the background shading on the advanced roels screen.
* Fix the problem with the risks link to Moodle docs.
* Help icon by the permissions column heading.
* Tables with rotated <th>s, make them vertical-align: bottom.
* Rename explain.php and explainhascapability.php to check.php and explain.php
* Tool tips on the number headers in the explain table.
* Explain table - role names were missing.
* Allow link_to_popup_window to work with full URLs.
2008-11-20 09:57:20 +00:00
tjhunt
0c90f98788 formslib: MDL-13210 - partial - try to make validation errores less annoying.
I have made them float right, and reduced the padding on the red box, so they don't cuause the height of the form to change so much, if the error fits to the right of the form control. I realise that some people may not like this, which I why I have done this in head only for now. I will revert this if told to.
2008-11-20 08:30:35 +00:00
tjhunt
587a1ea358 manage roles: MDL-8313 face lift allow override/assign, add labels and tooltips to the checkboxes for usability and accessibility. 2008-11-18 10:33:38 +00:00
tjhunt
ad5616a934 manage roles: MDL-8313 face lift allow override/assign, and add securtiy checks! 2008-11-18 10:18:00 +00:00
tjhunt
4659454ac6 manage roles: MDL-8313 fix bugs with safe overrides. 2008-11-18 08:08:18 +00:00
tjhunt
a7476c6bbd manage roles: MDL-8313 improve wording. 2008-11-18 07:53:26 +00:00
tjhunt
bbdb7070ca manage roles: MDL-8313 Provide a basic mode for the manage roles page.
* New basic define roles mode, with just an Allow checkbox for each capability.
* Button to toggle this form to/from advanced mode.
* Also, a separate mode for viewing a role definition, rather than just showing disabled checkboxes.
* Now duplicating a role just takes to you a pre-populated add role form, so you can double-check things before saving the new role.
* Deleting a role is now logged.
* Role reordering code cleaned up.
* You can now no longer delete the last role that has admin permissions.
* This includes a general refactor of manage.php, which eliminates manage.html, and splits of define.php.
2008-11-18 07:10:00 +00:00
tjhunt
e9abdd1b84 Fix typo. 2008-11-14 11:48:29 +00:00
tjhunt
f4acee5d78 role manage ui: MDL-8313 First version of the basic/advanced role define page.
This is being separated from manage.php. This code is only partly working. It displays (most) of a role definition, but does not yet let you save changes. However, I wanted to commit it before going home on Friday night. Since this is new code, it won't break anything.
2008-11-14 11:46:01 +00:00
tjhunt
a4df1cbbe5 role manage ui: MDL-8313 Refactoring and clean-up prior to basic/adv manage page. 2008-11-14 10:38:06 +00:00
tjhunt
8aee9bcc27 role override ui: MDL-8313 basic mode + toggle + usability improvements
* Basic mode just hides the prohobit column. Sadly that is all we can do.
* Button to toggle in and out of advanced mode, with user_perference.
* The permission you are selected is now on the page as a label, rather than just being in a tool-tip. (Not pretty, but helpful, I think. I may change my mind on this.)
* You can click anywhere in the table cell, rather than having to hit the radio button exactly.
* Brief instructions at the top of the page.
* Submit buttons both top and bottom of the page.
2008-11-14 05:46:27 +00:00
tjhunt
c6505f1eaa role override ui: MDL-8313 refactor the page in preparation for making an non-advanced mode. 2008-11-14 03:28:15 +00:00
tjhunt
1e8e46879c roles interface: Code reorganisation and adding boilerplate comments.
I have collected code that used to be in lib/adminlib.php, lib/accesslib.php and user/selector/lib.php into a new admin/roles/lib.php file.

And I added standard GPL and Moodle comments to all the files in admin/roles.
2008-11-13 04:07:01 +00:00
tjhunt
dc191af610 roles explanation: MDL-13538 further interface improvements. 2008-11-13 01:44:29 +00:00
tjhunt
f0016b3f44 role override: Fix regression caused by MDL-17070. 2008-11-12 14:17:23 +00:00
tjhunt
7554a120c2 XHTML strict typo. 2008-11-12 14:00:59 +00:00
tjhunt
8a8272b0f4 roles explanation: MDL-13538 Integrate into the roles tab bar, and improve wording a bit.
Also, commit the lang strings I missed last time.
2008-11-12 10:13:43 +00:00
tjhunt
c04d79503e Reproduce MDL-17210 in this code, until it is fixed. 2008-11-12 08:28:52 +00:00
tjhunt
a6e7237adc roles explanation: MDL-13538 Make a table showing the result of has_capability for every capabiltiy in a context.
This implements the page showing the table. It is not yet integrated into the tab bar. To try this, go to an Assign roles page (one with URL .../admin/roles/assign.php?contextid=...) and change the 'assign' to 'explain'.
2008-11-12 07:55:09 +00:00
tjhunt
ad6324b338 Minor coding clean-ups. 2008-11-12 07:43:58 +00:00
tjhunt
7906379c9a role assign: MDL-13325 when assigning roles inside front page activites, list all users as potential users. 2008-11-11 07:23:25 +00:00
tjhunt
01a80f51e5 role assign: MDL-8312 Restrict which roles can be assigned at which contextlevels.
* New table role_context_levels
* Populate table with defaults on install
* Populate table on upgrade with the same defaults, plus any additional ones needed to ensure all the role assignments already in the database are allowed.
* Change get_assignable_roles to respect these settings.
* UI for these settings on the add/edit role form.
* Save these settings when a role definition is saved.
* If in a context, there are no roles you can assign, display a polite message.
* Back up these settings.
* Restore these settings. When resotring a <=1.9.x backup file, any newly imported roles are set to be assignable at all contextlevels.

Restore not tested because it is broken in HEAD.
2008-11-06 07:34:01 +00:00
tjhunt
fcaa214b6e user selector: MDL-16966 Properly preserce the enrolment start option through page reloads. 2008-11-06 05:54:46 +00:00
tjhunt
faf75fe715 role overrides: MDL-17070 Improve override roles page to match the recent usability improvements on the assign page.
Including:
MDL-11529 When assigning/overriding roles, the dropdown for switching to another role should have a number in brackets

MDL-16549 Should not be able to edit the permission associated with moodle/site:doanything on any role.
2008-11-05 08:17:30 +00:00
tjhunt
09c660e407 user selection: MDL-17072 Polishing the role assign page: Do processing before print_header in line with best practice. 2008-11-04 07:26:32 +00:00
tjhunt
c9f8e118c9 user selection: MDL-17072 Polishing the role assign page:
* Make the role being assigned clear in the title
* Make the options in the middle of the page be in a collapsable options section, collapsed by default.
* Put them in a smaller font too.
* Switch the date selectors here to use a shorter date format, and change 'Course start date' to 'Course start'.
2008-11-03 06:06:08 +00:00
tjhunt
6cab02ac52 user selection: MDL-16993 Convert the assign roles page to use the new components.
At the same time, I took the opportunity to try to work on some of the usability issues on this page. Note that I have not quite finished! So don't comment until tomorrow.

In the course of doing this, I also did: half of

MDL-11529 Show the number of assignees of each role in the change role dropdown on this page.
MDL-17067 Make it clear in the UI that admins are not allowed to unassign themselves.
2008-10-30 10:49:15 +00:00
tjhunt
96f1a7a265 roles admin: Improve the usability of the assign roles interface - this is the first half of the work. Part of MDL-16993.
To do this, I found a way to clean up the method signatures of a couple of accesslib methods, so I did, hence the fact that this seems to touch some unrelated files.

Also, there is a nice new method in accesslib get_context_url, which gives you the natural URL for a context, so the course view page, or the user profile, etc.
2008-10-30 06:26:18 +00:00
tjhunt
98bcd9d1ff roles interface: MDL-16965 make a view that explains the has_capability calculation for a given capability in a given context for a given user, like on http://docs.moodle.org/en/How_permissions_are_calculated. 2008-10-22 09:48:16 +00:00
nicolasconnault
7b2f3680a3 MDL-16892 Fixed bug in accesslib role_fix_names method. Merging from MOODLE_19_STABLE 2008-10-20 13:47:08 +00:00
tjhunt
1b63d34db7 MDL-16605 Add an ajaxy search box on the define/override roles screen to help find the capability you want 2008-09-26 06:50:31 +00:00
scyrma
2a68c5d9b9 MDL-16318: remove a few calls use_html_editor() (more to come) 2008-09-03 03:09:56 +00:00
skodak
bed7993115 MDL-15897 deprecated PARAM_CLEANFILE - we now support unicode everywhere 2008-07-31 23:03:50 +00:00
skodak
172dd12c63 MDL-14589 initial file storage implementation, temporary file manager, migration of course files; blog conversion MDL-15905; assignment conversion MDL-15904; fromslib related file improvements MDL-15906 2008-07-31 22:15:30 +00:00
skodak
3a0c6cca33 MDL-8521 new feature - safe overrides, see tracker for details; merged from MOODLE_19_STABLE 2008-07-23 16:10:06 +00:00
dongsheng
d3789c64dd MDL-14932, improve accessibility in group assigning and role assigning pages. 2008-07-11 03:48:49 +00:00