Commit graph

2684 commits

Author SHA1 Message Date
David Monllao
15791dffac Merge branch 'MDL-9070' of git://github.com/aolley/moodle 2015-09-30 09:29:55 +08:00
Adam Olley
05f1455b35 MDL-9070 forum: Show timed post display period
This adds the following changes when viewing a list of discussions and
forum_enabletimedposts is turned on.

* Discussions a student wouldnt see right now are dimmed (timestart in
  future or timeend in the past).
* A icon appears next to the discussion subject, the tooltip for this
  icon displays the display start and/or end time. This only appears for
  the user that made the discussion or has permission to
  viewhiddentimedposts.

These two changes achieve a couple of important things, namely, teachers
will not mistakenly think their students can see a discussion when
viewing the list if they've later forgot that they set a time limit on
it (or indeed if someone else put it on their discussion without them
realising). Additionally it makes it easy to see from the list when
different discussions are set to be released without having to go in and
edit them to find out.

Change-Id: Ia1818b33c00adae0dad72df8e170a078fb66cd76
2015-09-30 09:18:31 +09:30
Dan Poltawski
158cc03737 Merge branch 'MDL-50109-master-blogsort' of https://github.com/mudrd8mz/moodle 2015-09-28 10:44:47 +01:00
rajesh Taneja
5ecf8e8f21 MDL-51266 unittest: replaced low level phpunit_util calls 2015-09-23 15:42:48 +08:00
Juan Leyva
ea5b910b3a MDL-51413 forum: Return additional field in get_forums_by_courses WS 2015-09-18 17:27:14 +02:00
David Monllao
742548e251 Merge branch 'wip-mdl-51101' of git://github.com/rajeshtaneja/moodle 2015-09-14 16:18:01 +08:00
Andrew Nicols
7267daa8d0 MDL-50994 mod_forum: Correct docs for discussion WS 2015-09-14 15:43:26 +08:00
Andrew Nicols
08a4dbfe10 Merge branch 'MDL-50994-master' of git://github.com/jleyva/moodle 2015-09-14 15:40:05 +08:00
David Monllao
14face570f Merge branch 'MDL-51253_forum_urls' of git://github.com/BenKelada/moodle 2015-09-14 13:06:38 +08:00
Ben Kelada
3d8d8a8ca6 MDL-51253 forum: fix urls for exceptions and redirects 2015-09-14 14:18:50 +10:00
Juan Leyva
7ab43ac84a MDL-50994 mod_forum: New Web Service mod_forum_add_discussion 2015-09-11 13:31:36 +02:00
Rajesh Taneja
1a5a476b03 MDL-51101 behat: Fixed wrong hover step usage
Hover step was being mis-used for checking activity completion
This is replaced with proper step which check for img element
2015-09-10 14:46:12 +08:00
Juan Leyva
43ff833def MDL-50995 mod_forum: Fix WS to not rely in the DB ordering defaults 2015-09-09 12:59:53 +02:00
Andrew Nicols
d3d8f81caa MDL-50995 mod_forum: Coding style fixes 2015-09-09 16:16:43 +08:00
Andrew Nicols
edf84ada39 Merge branch 'MDL-50995-master' of git://github.com/jleyva/moodle 2015-09-09 16:03:05 +08:00
Ankit Agarwal
731c2712e7 MDL-50173 ratings: Use proper checks to ensure ratings are viewable.
Mainly to verify groups visibility this new callback has been created.

Note this was originally 3 commits but for amending purposes they have
been squashed.
2015-09-09 04:07:21 +02:00
rajesh Taneja
5d38a5cd33 MDL-51285 mod_forum: Discussion post should not have same time stamp
Discussion post are sorted by timemodified
if they have same timemodified then results
will be random
2015-09-03 15:33:23 +08:00
Juan Leyva
50a2031712 MDL-50995 mod_forum: New WS mod_forum_add_discussion_post 2015-09-02 12:20:06 +02:00
Dan Poltawski
522c7fd350 Merge branch 'MDL-45841' of git://github.com/timhunt/moodle 2015-09-01 10:14:45 +01:00
David Mudrák
3920ad93e2 MDL-50109 forum: Add behat tests for posts ordering 2015-08-31 09:55:02 +02:00
David Mudrák
8d960707c4 MDL-50109 forum: Add unit tests for the forum_get_discussion_neighbours
The added tests are variants of existing tests for blog-like forums.
2015-08-31 09:55:02 +02:00
David Mudrák
9e381efd1f MDL-50109 forum: Respect chronological order of blog posts in prev/next
The function forum_get_discussion_neighbours() is used to generate links
to neighbour discussions. I had to change the signature of the function
to have access to the forum's type without the need to re-read it from
the database in additional query.

The SQL query for blogs is a variant of the existing query, just using
the first post's creation time instead of the discussion's timemodified
time.
2015-08-31 09:55:02 +02:00
David Mudrák
8d032f59f4 MDL-50109 forum: Display blog posts in reverse chronological order 2015-08-31 09:55:01 +02:00
Tim Hunt
924db7109c MDL-45841 forum: show unread posts on blog-style forum front page 2015-08-24 21:44:56 +01:00
Andrew Nicols
bff7570e87 MDL-50714 mod_forum: Add tests for all groupmodes 2015-08-21 08:19:29 +08:00
Andrew Nicols
344e126378 MDL-50714 mod_forum: Correct use of movedicussions cap when posting
The ability to view the group dropdown was too closely related to the
movediscussions capability when posting, or editing a forum post.

The movedicussions capability should only be considered for some parts of
this logic. Users should be able to select the group to post to when
writing message, as long as they have access to that group.
2015-08-21 08:18:46 +08:00
David Monllao
5e8a03b429 Merge branch 'MDL-51088-master' of git://github.com/andrewnicols/moodle 2015-08-17 09:24:55 +08:00
David Monllao
fd76204a8b Merge branch 'MDL-51100-master' of git://github.com/andrewnicols/moodle 2015-08-17 08:50:49 +08:00
Andrew Nicols
711b1d6b3e MDL-51100 behat: Remove javascript tag from usermenu steps
These tests only needed the javascript tag because of the user menu.
Now that issue has been resolved, they do not need it.

Note: Some were also not using the singleselect feature, so would fail
without changes to use this too as they were not handling proper selection
of the singleselect element.
2015-08-14 08:52:29 +08:00
Andrew Nicols
2e782e5142 MDL-51088 mod_forum: Improve mod_forum behat performance 2015-08-14 07:58:13 +08:00
David Monllao
819ab257f7 Merge branch 'MDL-46321-master' of git://github.com/tonyjbutler/moodle 2015-08-12 08:49:14 +08:00
Eloy Lafuente (stronk7)
4da133199f Merge branch 'MDL-50430' of https://github.com/danielneis/moodle 2015-08-12 00:48:07 +02:00
Daniel Neis Araujo
54cf94390b MDL-50430 forum: Add number of subscribers to forum subscriber list 2015-08-10 14:17:10 -03:00
Tony Butler
5a699f25a2 MDL-46321 mod_forum: Remove move button to force destination selection 2015-08-10 11:00:00 +01:00
Marina Glancy
7f0c7f01c0 MDL-51062 behat: permission steps should work without js 2015-08-09 20:33:27 +08:00
Eloy Lafuente (stronk7)
ad9a7604f9 MDL-35027 mod_forum: verify forced subscriptions cannot be edited
This commit adds a new scenario to verify that the option
to turn edition of subscribers is not available anymore
for forced-subscription activities.

It also gets rid of the @javascript tag in a just introduced
scenario not needing it.
2015-08-05 02:05:37 +02:00
Eloy Lafuente (stronk7)
caf6577e7f Merge branch 'MDL-35027-B' of https://github.com/bostelm/moodle 2015-08-05 01:15:59 +02:00
Andrew Nicols
259ca15a2d Merge branch 'MDL-43709-master' of https://github.com/pauln/moodle 2015-08-04 12:26:12 +08:00
Andrew Nicols
45f8f3e372 MDL-50493 mod_forum: Correct style issues 2015-08-04 11:53:04 +08:00
Andrew Nicols
b9e4972c7a Merge branch 'MDL-50493-master' of git://github.com/jleyva/moodle 2015-08-04 11:46:14 +08:00
Henning Bostelmann
e143918f9e MDL-35027 mod_forum: Fix subscriber list in hidden forums
If the forum is force-subscribed and hidden, only subscribers that can
view hidden activities will be shown in the subscriber list.
2015-08-03 12:12:56 +01:00
Simey Lameze
dcee0b9447 MDL-49360 core_lib: add new method get_local_referer()
This commit also replace all usages of $_SERVER['HTTP_REFERER'] and get_referer().
2015-07-27 11:11:24 +08:00
Andrew Nicols
83bd7fcc89 Merge branch 'MDL-49618-master' of https://github.com/marinaglancy/moodle 2015-07-21 12:14:53 +08:00
Juan Leyva
1c2b788256 MDL-49796 webservices: Fix the functions description 2015-07-14 11:31:57 +02:00
Paul Nicholls
8ff7531ed7 MDL-43709 Forum: Reset forums not working with multiple forum types
The SQL being generated from the selected forum types on the course reset
form was using AND, resulting in never matching anything if more than one
forum type was selected for resetting (as each forum can only have one
type).  This should use $DB->get_in_or_equal() to generate sensible SQL.
2015-07-13 16:19:08 +12:00
Marina Glancy
fc62987c84 MDL-49618 forum: apply format_string 2015-07-09 08:24:08 +08:00
Eloy Lafuente (stronk7)
17d47fa5aa Merge branch 'MDL-50489-master' of git://github.com/jleyva/moodle 2015-07-07 19:12:12 +02:00
Juan Leyva
039c81f098 MDL-50489 forum: Handle qanda forums in get_forum_discussions_paginated
I removed the last qanda checks in forum_user_can_see_discussion because they are not necessary and
they make the external function fail.

A user in a qanda forum can always see a discussion (he needs to see the discussion to be able to reply).
What he cannot see are the other user posts unless he has replied to the discussion once and the edition period
(usually 30 minutes) has ended.

Note also that forum_user_can_see_discussion was originally only used when displaying forums in blog format
in order to display the button show more or not, this is the reason this wasn't detected before.
2015-07-02 10:55:40 +02:00
Mark Nelson
eabbc98c78 MDL-50220 mod_forum: added missing capability check 2015-06-29 18:43:09 +02:00
Juan Leyva
b1aa7dfac3 MDL-50493 forum: Handle correctly qanda forums in get_discussion_posts 2015-06-06 00:00:56 +02:00