658 Commits

Author SHA1 Message Date
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
David Monllao
fd2b5d5c63 MDL-59599 navigation: Respect previous activity-level navigation
The original patch was overwriting grading methods navigation.

All credit goes to Andrew Nicols.
2018-07-11 12:01:08 +02:00
David Monllao
6af4e08333 MDL-59599 navigation: Strict zero-position comparision 2018-07-09 12:27:25 +02:00
Kathrin Osswald
f37c3ec832 MDL-59599 navigation: Improve activity status for nav nodes. 2018-07-04 19:57:10 +02:00
Mihail Geshoski
5b97c08412 MDL-58063 blocks: Cannot access manage files in HTML block in clean 2018-06-08 08:25:53 +08:00
Kathrin Osswald
45ae297f7a MDL-61298 theme Boost: Nav drawer icon improvements - fixes. 2018-04-12 13:28:37 +02:00
Kathrin Osswald
64448e1ea9 MDL-61298 theme Boost: Nav drawer icon improvements. 2018-04-10 15:31:12 +02:00
Farhan Karmali
c0aca8f3c7 MDL-59813 navigation: Changed 'more..' link to point to dashboard
In the navigation menu , the 'more' option was previously taking the user to all course page
This patch fixes that behavior and takes the user to the dashboard
2017-12-29 15:10:56 +05:30
David Monllao
73aa231f83 Merge branch 'MDL-60653-master' of git://github.com/rezaies/moodle 2017-12-18 17:59:32 +01:00
Tyler Bannister
e53a38c666 MDL-60653 Navigation: Fixed loose string comparison.
The previous comparison would sometimes evaluate to true when the
navigation key was not a string.
2017-12-12 12:32:27 +08:00
David Mudrák
04985346a2 MDL-57564 enrol: Make use of the new default sort parameter
Now when enrol_get_my_courses(), enrol_get_users_courses() and
enrol_get_all_users_courses() methods automatically reflect the
navsortmycoursessort setting by default, we do not need to manually
compose the sorting any more.
2017-12-06 23:15:17 +01:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Damyon Wiese
a5327e449d MDL-59973 calendar: Admin calendar course lists
Consolidate the logic for the list of courses an admin will see in the calendar.

They will see all courses if calendar_admincanseeall is enabled.

They will see only courses they are enrolled in of calendar_admincanseeall is not enabled.

They will also see the current course, if they are admin and it is not already in the list.

This applies to the course selector and the create and update event forms.

The calendar link in the navigation block has also been changed to link to the current course calendar instead of the global
one.
2017-10-26 13:28:00 +08:00
Eloy Lafuente (stronk7)
c1321a9a02 Merge branch 'wip-MDL-60314-master' of git://github.com/marinaglancy/moodle 2017-10-19 23:17:26 +02:00
David Mudrák
2e86fdb0a2 MDL-60449 lang: Properly replace the generic string with a specific one
The general string 'Publish' has been used in sense of publishing a
course on a hub - as such, it is better to keep that string together
with other related strings in the core_hub component. All these are
being reworded to 'Share'.

As this has been the only meaning of the string in the core, I am
deprecating it now. Third party plugins should better come with their
own variant of the string, should they need it.
2017-10-19 17:35:06 +02:00
Marina Glancy
78da366b56 MDL-60281 general: various strict corrections for PHP7.2
- count() can only be called on arrays or Countable, it can not be called on null
- recordset is neither so iterator_count() should be used
- instanceof or get_class() can not be applied to non-objects
- class methods must have the same arguments as methods in parent class
2017-10-16 09:37:20 +08:00
Marina Glancy
0b844a8322 MDL-60314 navigation: fix overriding variable value 2017-10-09 10:18:00 +08:00
Jake Dallimore
5d0cc05b20 MDL-59277 navigation: add support for container type in get_css_type() 2017-09-18 09:03:51 +08:00
David Monllao
fb6ff3c553 Merge branch 'MDL-59879-master' of https://github.com/abias/moodle 2017-09-12 07:04:34 +02:00
Mark Nelson
93b47710ac MDL-59977 core: do not directly check 'viewparticipant' capability 2017-09-11 12:44:27 +08:00
Juan Leyva
35b9bca0ca MDL-58762 core: Get full course objects on navigation
The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
2017-09-07 10:53:33 +02:00
Alexander Bias
f592063fb5 MDL-59879 navigation: Add node key to competencies navigation node 2017-08-21 10:59:49 +02:00
Jake Dallimore
012555492e MDL-56565 navigation: fix for cap checks in nav and context header
Fix to:
- Make sure we properly check both user and course contexts in
the load_for_user function in navigation lib and user the
user_can_view_profile function for same-course access checks.
- Use user_can_view_profile in the renderer's context_header to
properly decide whether a user can view another user's picture
and messaging options in the page header.
2017-07-04 10:11:34 +08:00
Jake Dallimore
02e5a9d766 MDL-56565 navigation: fix user details disclosure in nav tree
Fixes a bug in which a user's full name might be disclosed via the
nav tree. Nav generation now checks the current user's access to the
user before adding the node, else adds a dummy node.
2017-07-04 10:11:34 +08:00
Mark Nelson
6d721cab9e MDL-59362 core: ensure we use 'new' when throwing exceptions 2017-06-26 13:08:05 +08:00
Mark Nelson
3dabb083ad MDL-59140 core: apply limit only on courses to be shown in specific nav
There can be a different number of courses displayed in the
'Navigation' block and in the 'Flat' navigation. This patch
decides what courses we want to display on each, then
applies the 'navcourselimit' setting individually.
2017-06-15 13:10:14 +08:00
Mark Nelson
fa238237a0 MDL-59140 core: limit the number of courses shown in the navigation
If the user is enrolled in more courses than the limit then a 'More...'
link is displayed which takes the user to the course/index.php page.
2017-06-14 12:32:04 +01:00
Damyon Wiese
c561297d26 MDL-58136 navigation: Ensure we have all course fields
To properly classify courses we need the start/end dates etc.
2017-06-13 10:07:54 +08:00
Damyon Wiese
d07373f289 MDL-58136 boost: Limit courses in flatnav
Only show "in-progress" courses in the boost flat navigation (as per the myoverview block).
2017-06-13 10:02:14 +08:00
Alexander Bias
27456a6422 MDL-58165 navigation: Add node key to private files navigation node 2017-05-23 07:20:27 +02:00
Jake Dallimore
b17ee68202 MDL-58138 completion: Assorted linting fixes.
Part of MDL-58138 epic
2017-04-19 08:56:11 +08:00
Marina Glancy
a64a9f9ce4 MDL-58267 completion: style and capabilities cleanup
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Marina Glancy
0cbc248dd3 MDL-58140 completion: access control refinements
Part of MDL-58138 epic
2017-04-19 08:52:57 +08:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Dan Poltawski
5445df2957 Merge branch 'MDL-57373-master' of git://github.com/ankitagarwal/moodle 2017-01-09 09:42:27 +00:00
Dan Poltawski
79be02bf8d Merge branch 'MDL-57417-master' of https://github.com/snake/moodle 2016-12-28 21:19:00 +00:00
Ankit Agarwal
cd65ea6d60 MDL-57373 navigation: Fix course names in flat nav 2016-12-27 11:57:45 +05:30
Jake Dallimore
c41883f0bb MDL-57417 navigation: fix legacy_activity_onclick_handler callback scope 2016-12-23 08:40:17 +08:00
Adrian Greeve
920edec857 MDL-57251 navigation: Correct permission shows site admin
If the user does not have the moodle/site:configview
capability then do not show them the site administration
link.
2016-12-20 12:51:51 +08:00
Jun Pataleta
8aedc03754 MDL-57213 navigation: Load all my course categories into navigation tree
* Load all of the relevant course categories of the courses that a user
  is enrolled in.
2016-12-13 11:42:11 +08:00
Jun Pataleta
8ace7b6c34 MDL-57072 theme_boost: Render action menu for category management 2016-11-30 09:11:32 +08:00
Dan Poltawski
304e8a8d0c Merge branch 'wip-MDL-56586-master-2' of git://github.com/marinaglancy/moodle 2016-11-24 09:30:29 +00:00
David Monllao
4de871f4ca Merge branch 'MDL-57001-master' of git://github.com/damyon/moodle 2016-11-24 15:29:04 +08:00
Damyon Wiese
70b03eff02 MDL-57001 switchroles: Move to user menu
Take this out of the navigation and force it in the user menu.
2016-11-24 15:11:19 +08:00
Damyon Wiese
be2247fb24 MDL-56586 blocks: Do the addblock in a modal 2016-11-24 14:24:59 +08:00
Marina Glancy
b11916d3e7 MDL-56586 blocks: allow theme to manage "Add a block" select 2016-11-24 14:24:56 +08:00
Damyon Wiese
ea5084f7f1 MDL-56993 boost: Fix navigation for singleactivity format
The single activity course format has no course front page, so we need
to make a special case for it so it's possible to get to the course
admin menu and put the course nodes in the flat navigation.
2016-11-23 15:31:27 +08:00
David Monllao
57c01bca0e MDL-56612 navigation: Remove redundant load_courses_enrolled call 2016-11-21 12:42:09 +08:00
Mark Nelson
af5765b3fb MDL-56139 core_message: removed unused constants 2016-11-16 10:22:52 +08:00
Dan Poltawski
6b8c8f4bc2 Merge branch 'MDL-56711-master' of git://github.com/damyon/moodle 2016-11-14 08:21:14 +00:00