Commit graph

199 commits

Author SHA1 Message Date
Dan Poltawski
c7bba4e5af Merge branch 'MDL-52165-master' of git://github.com/jleyva/moodle 2015-12-08 08:51:34 +00:00
Juan Leyva
04cd8ae3c0 MDL-52165 mod_forum: New Web Service mod_forum_can_add_discussion 2015-12-04 15:30:16 +01:00
Dan Poltawski
aa306e7bc8 MDL-52219 behat: remove steps which turn on avaibility/completion
Now its the default, we can reduce test time by relying on the default
state rather than going around turning it on
2015-11-26 14:07:17 +00:00
Eloy Lafuente (stronk7)
9dbbdcb40a MDL-52126 forum: Verify forum mailout contents
New unit test able to verify mail contents
configured by provider do match all expectations defined.
2015-11-15 13:29:31 +01:00
John Okely
616dd1b594 MDL-52054 forum: Prevent error when clicking move without a destination 2015-11-10 16:43:19 +08:00
John Okely
d7f95392ac MDL-52054 forum: Revert MDL-46321. Add the "move" button back.
This reverts commit 5a699f25a2.
2015-11-10 10:46:37 +08:00
John Okely
cb658a4d04 MDL-52063 forum: Display message when moving forum 2015-11-10 10:24:06 +08:00
Eloy Lafuente (stronk7)
1f0f002e1d MDL-51939 mod_forum: all participants discussions are viewed by students
Added scenario to verify that "all participants" discussions, under
separate-groups mode are, by default, visible for students.
2015-10-29 21:10:20 +08:00
Mark Nelson
e7be37b1c2 MDL-51782 mod_forum: fixed unit test failing on certain DBs 2015-10-20 14:44:58 +08:00
Andrew Nicols
579b72a227 Merge branch 'MDL-51782_master' of git://github.com/markn86/moodle 2015-10-20 11:50:57 +08:00
Adam Olley
1e36665719 MDL-50993 forum: Display timed posts/discussions in a logical order
Users that don't have permission to view timed posts outside of the release
time frame will have discussions that have entered the visible frame appear
in an odd order from their point of view on the discussion list.

Example:
Discussion 1, modified 2015-01-01, hidden till 2015-01-03
Discussion 2, modified 2015-01-02, not hidden

The standard 'modified descending' order means that D2 is listed at the top
even after D1 becomes visible. When scanning the list of discussions for new
posts, the user could be tricked into thinking they'd already read it.

This fix instead takes into account the release time of the discussion when
timed forum posts are enabled.

I opted to use CASE statements to handle this instead of GREATEST as the
latter is not supported by MSSQL.
2015-10-19 04:04:58 +00:00
Mark Nelson
fcb30f64f9 MDL-51782 mod_forum: altered unit tests for the post_deleted event
This was done to ensure we are actually testing the API, and not
just creating and triggering the event manually.
2015-10-14 18:54:29 -07:00
Juan Leyva
4f3a2d2103 MDL-51637 forum: Make forum_get_discussions_paginated return group post 2015-10-12 10:08:17 +02:00
Adam Olley
a7d95e4e65 MDL-51285 mod_forum: Posts all need to have different stamps 2015-10-08 12:21:36 +08:00
David Monllao
de27cf6a3f Merge branch 'wip-mdl-51285' of git://github.com/rajeshtaneja/moodle 2015-10-07 11:22:56 +08:00
Eloy Lafuente (stronk7)
cb171682ff Merge branch 'MDL-49823-master' of git://github.com/jleyva/moodle 2015-10-07 01:08:52 +02:00
Juan Leyva
d85bedf796 MDL-49823 webservice: Support gravatar profile images 2015-10-01 09:36:31 +02:00
Eloy Lafuente (stronk7)
9fb434a618 Merge branch 'wip-mdl-51266' of https://github.com/rajeshtaneja/moodle 2015-09-30 20:34:33 +02:00
David Monllao
8e31c017f2 MDL-9070 mod_forum: Reducing it to a single scenario 2015-09-30 10:09:03 +08:00
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
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
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
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
Andrew Nicols
bff7570e87 MDL-50714 mod_forum: Add tests for all groupmodes 2015-08-21 08:19:29 +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
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
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
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
Juan Leyva
b1aa7dfac3 MDL-50493 forum: Handle correctly qanda forums in get_discussion_posts 2015-06-06 00:00:56 +02:00
Dan Poltawski
825be82b8a MDL-50322 forum: add basic split post behat coverage
Also bump version for autoloading new class.
2015-06-01 14:59:06 +01:00
David Monllao
119ff65c0e Merge branch 'MDL-49954-master' of git://github.com/jleyva/moodle 2015-05-04 15:16:01 +08:00