Commit graph

3233 commits

Author SHA1 Message Date
Andrew Nicols
3ffbde1214 MDL-64652 forum: Use an inner join when fetching ratings 2019-03-05 10:12:22 +08:00
Andrew Nicols
ab45aa735c MDL-64652 mod_forum: Performance improvement for provider
There are possibly some further improvements that can be made to:
- export_discussion_data
- export_all_posts
2019-03-05 10:12:22 +08:00
Eloy Lafuente (stronk7)
daf358f0cd Merge branch 'MDL-64878-master' of git://github.com/damyon/moodle 2019-02-27 18:58:26 +01:00
Damyon Wiese
40fe153816 MDL-64878 grades: Update delete_instance
When grades are deleted, it needs to know the context so any files
in the gradebook can be deleted. This means module delete_instance
functions must delete the grade_item before they delete the module record.
2019-02-27 10:37:54 +08:00
Mathew May
c53a22c434 MDL-58428 theme: Move templates from mod/forum 2019-02-26 12:56:14 +01:00
Jun Pataleta
28785ee630 Merge branch 'MDL-63892-master-rework' of git://github.com/mickhawkins/moodle 2019-02-13 21:01:32 +08:00
Michael Hawkins
0753bb4238 MDL-63892 mod_forum: Behat update for post order 2019-02-13 17:32:24 +08:00
Andrew Nicols
d1570a6f52 Merge branch 'MDL-63977-beforemerge' of https://github.com/sammarshallou/moodle 2019-02-13 13:21:15 +08:00
Andrew Nicols
fc9694d1e5 Merge branch 'MDL-63892-master-rework' of git://github.com/mickhawkins/moodle 2019-02-13 10:18:25 +08:00
sam marshall
079eae376c MDL-63977 Behat: Make standard login step work for app as well 2019-02-11 16:20:43 +00:00
sam marshall
e0564a3264 MDL-63977 Behat: Upgrade mobile tests to work with 3.6 app version 2019-02-11 16:20:42 +00:00
sam marshall
1959e16412 MDL-63977 Behat: Allow Behat testing of the Moodle mobile app
This change allows you to write and run Behat tests that cover the
mobile app. These should have the @app tag. They will be run in the
Chrome browser using an Ionic server on the local machine.

See config-dist.php for configuration settings, or full docs here:
https://docs.moodle.org/dev/Acceptance_testing_for_the_mobile_app
2019-02-11 16:20:42 +00:00
Sara Arjona
67d490b629 Merge branch 'MDL-48338-master' of git://github.com/andrewnicols/moodle 2019-02-11 10:41:03 +01:00
Anthony Ales
428db95dfb MDL-48338 forum: Missing #unread in discussion post url
When a user user selects the unread messages link from the forum
discussion page, the link does not include '#unread' in the url.
This patch appends '#unread' to the url by changing the appropriate
value in the reference link assigned to $out within the function
forum_cm_info_view() of the 'lib.php'file.

A similar change is on the forum index.
2019-02-07 15:16:13 +08:00
Marcus Fabriczy
f5d1dbb37f MDL-62893 mod: Grade visibility bug in the Outline/Complete reports
Grades that have been hidden will appear in the outline/complete
report - even if the user is a student.

The modules that have been fixed are:
* mod_assign
* mod_data
* mod_forum
* mod_glossary
* mod_lesson
* mod_scorm
* mod_workshop
2019-02-05 20:01:32 +10:30
Eloy Lafuente (stronk7)
4e77949bc3 MDL-46881 forum: whitespace fix (and related phpdocs completed) 2019-01-30 11:24:00 +01:00
Andrew Nicols
cd029f936d MDL-46881 forum: Only skip post, not discussion 2019-01-30 10:55:48 +08:00
Andrew Nicols
ba1a8ef782 MDL-46881 forum: Adjust limits for tasks 2019-01-30 10:55:48 +08:00
Andrew Nicols
b51b696927 MDL-46881 core: Allow adhoc tasks to be rescheduled 2019-01-30 10:55:48 +08:00
Andrew Nicols
4129d898f7 MDL-46881 forum: Tidy up trace variables 2019-01-30 10:55:48 +08:00
Andrew Nicols
0dc54176dd MDL-46881 forum: Mark posts as ready properly 2019-01-30 07:48:38 +08:00
Andrew Nicols
af48d8bdd6 MDL-46881 forum: Defer post visibility check to send time 2019-01-30 07:48:38 +08:00
Andrew Nicols
c0284ccbc6 MDL-46881 forum: Ensure that there are posts to remove 2019-01-30 07:48:38 +08:00
Andrew Nicols
b231aabb2d MDL-46881 mod_forum: Remove unused functions
Note: I have not applied the deprecation policy to these functions as
they are extremely core to the cron functionality and were never
intended to be used outside of cron.
2019-01-30 07:48:38 +08:00
Andrew Nicols
4459ad290d MDL-46881 mod_forum: Move cron around 2019-01-30 07:48:38 +08:00
Eloy Lafuente (stronk7)
caa0383ae5 Merge branch 'MDL-64240-master' of git://github.com/mickhawkins/moodle 2019-01-24 00:56:42 +01:00
Michael Hawkins
c41d36fa6b MDL-63892 mod_forum: Updating lib unit test 2019-01-22 13:50:47 +08:00
Michael Hawkins
014fe0ad0f MDL-63892 mod_forum: Fix last post details in forum view 2019-01-21 16:40:04 +08:00
Michael Hawkins
6cab66bbe3 MDL-63892 mod_forum: Correction to timestamp added to edit strings 2019-01-21 16:40:04 +08:00
Eloy Lafuente (stronk7)
644d0e2d97 MDL-24951 mod_forum: Apply new string to related scenarios
Plus amend an scenario name that was clearly incorrect.
2019-01-08 16:51:36 +01:00
Eloy Lafuente (stronk7)
2c4463bf0f Merge branch 'MDL-64509-master-enfix' of git://github.com/mudrd8mz/moodle 2019-01-08 16:17:06 +01:00
Andrew Nicols
f0b09fe329 Merge branch 'MDL-24951-master' of git://github.com/Chocolate-lightning/moodle 2019-01-08 13:46:11 +08:00
Andrew Nicols
8feef7308a Merge branch 'MDL-64400-master' of git://github.com/aanabit/moodle 2019-01-08 08:27:06 +08:00
Andrew Nicols
792267c3b4 Merge branch 'MDL-63276' of https://github.com/stronk7/moodle 2019-01-08 06:55:37 +08:00
Helen Foster
65d70aa81b MDL-64509 lang: Import fixed English strings (en_fix)
Significant string change: enablerunnow_desc,tool_task - including
mention of pathtophp requirement
2019-01-07 14:40:34 +01:00
Eloy Lafuente (stronk7)
a12207be25 MDL-63276 upgrade: clean < 3.2.0 upgrade steps
3.7 (min PHP 7.1) requires 3.2 (first version supporting PHP 7.1)

This just deletes all the upgrade steps previous to 3.2.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2016120500 (v3.2.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase. (note there isn't any this time).
2019-01-03 01:17:17 +01:00
Amaia Anabitarte
0f38e62970 MDL-64400 core_messages: Mark notifications sent via email as read 2018-12-27 09:15:53 +01:00
Amaia Anabitarte
57afd82ab0 MDL-64400 core_messages: Allow cron to delete unread notifications too 2018-12-27 09:15:53 +01:00
Mathew
0dbe9025b5 MDL-24951 mod_forum: Check user capability to know what message to show.
If the user has the following capabilty: mod/forum:canposttomygroups then show them
the more technical of the strings. Otherwise we use something a bit easier for them to ask their
tutor or teacher about.
2018-12-24 09:15:34 +08:00
Mathew
299dc536aa MDL-49651 mod_forum: Respect course visibility in cron
This checks the courses' current visibility and the users permissions.
If they have the permission to view the course when it is hidden they'll get messages.

We already have checks for the users enrolled & subscription status.
2018-12-24 09:11:15 +08:00
Michael Hawkins
418831e096 MDL-64240 mod_forum: Clean forum post text before storing
Previously only edited messages were cleaned, so longer strings could
be stored in the database, which would never be displayed.
This update takes into account trusted text before cleaning (as editing does).
2018-12-18 14:10:43 +08:00
Michael Hawkins
b6995c29ec MDL-64240 mod_forum: Update word count to use current message length
Previously this used the length of the message stored in the database,
before scripts etc are cleaned to display the content. That resulted
in cases where the count would seem much larger than the message size.
2018-12-18 14:10:43 +08:00
Tim Hunt
939218c2b6 MDL-46783 permissions: let some moodle/ caps be overriden in all mods
The capabilities changed ('contextlevel' => CONTEXT_COURSE changed to
'contextlevel' => CONTEXT_MODULE) are:

* moodle/site:accessallgroups
* moodle/site:viewfullnames
* moodle/site:trustcontent
* moodle/site:viewuseridentity

This list came from reviewing the _get_extra_capabilities functions in
all core activities. They were all somewhat inconsistent, but I think it
makes sense that these capabilities are consistently overridable in all
activities. E.g. moodle/site:accessallgroups affects conditional
availability even if there is no other user of groups, and
moodle/site:viewuseridentity and moodle/site:viewfullnames affect the
logs report, if nothing else.

As a result of this, several _get_extra_capabilities functions are no
longer needed, and all the rest have been simplified.
2018-12-05 16:44:25 +00:00
Eloy Lafuente (stronk7)
f47c8f3525 MDL-64300 upgrade: add 3.6.0 separation line to all upgrade scripts 2018-12-02 18:36:40 +01:00
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Andrew Nicols
4ba4bc9acd MDL-53566 mod_forum: Correct captype for writeable capabilities 2018-11-13 21:17:40 +08:00
Eloy Lafuente (stronk7)
bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
Helen Foster
0c19b2c8fa MDL-63730 lang: Merge English strings from the en_fix language pack
Significant string changes:

* withselectedusers_help, core - removing mention of 'Add a common note'
  as the option no longer exists
* considereddigitalminor and digitalminor_desc, core - more
  child-friendly wording
* configmessagingallusers, core_admin - clearer explanation
* auth_dbtype, auth_db - fixed broken link
2018-10-26 12:48:40 +02:00
David Monllao
72e72dd93f Merge branch 'MDL-61391-master' of git://github.com/damyon/moodle 2018-10-22 16:50:47 +02:00
David Monllao
64a00dffbd Merge branch 'MDL-61388-master' of git://github.com/damyon/moodle 2018-10-22 16:48:56 +02:00