Webservice create group missing some settings

Bug #1708959 reported by Robert Lyon on 2017-08-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Unassigned
18.04
Medium
Unassigned
18.10
Medium
Unassigned

Bug Description

The mahara_group_create_groups function is missing some options

Including
- Hide group
- Hide membership
- Hide membership from members
- Participation report
- Comment notifications

Also the Shared page notifications option is boolean yet there are 4 valid states for this option.

Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/7921

Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/7946

Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
milestone: none → 17.10.0
Niranjan (niranjan528) wrote :

Bug description: Web service create group missing some settings

URL: https://bugs.launchpad.net/mahara/+bug/1708959

Environment to be Tested: Master branch
Browsers to be tested: Not applicable

Precondition:

1. An institution 'Institution A' should be existing
2.‘Internal’ and ‘Web services’ authentication plug-ins should already be set up for ‘Institution A’.
3.Site admin user ‘admin’ is set up.

*Steps to Reproduce:*

1. Login as Admin user.
2. Navigate to Administration menu > Web services > Configuration.
3. Select the 'Enable web service functionality' panel and set the switches for 'Web service provider master switch' and 'Rest' protocol to ‘Yes’.
4. Select 'Manage service groups' panel.
5. Enter ‘Test’ as name of the service and click the ‘Add’ button.
6. Click the ‘Edit’ button for the 'Test' service.
7. Set the ‘Service’ switch to ‘Yes’ under the 'Enable or disable the service' panel.
8. Switch ‘mahara_group_create_groups’to ‘Yes’ under 'Functions allocated against the service' panel.
9. Click the ‘Save’ button.
10. Click the ‘Back’ button.
11. Now click on 'Manage service access tokens' panel.
12. Enter the user name ‘admin’ and select the user name from the search results.
13. Click the 'Generate token' button.
14. Select the institution ‘Institution A’ and choose the service ‘Test’.
15. Click the ‘Save’ button.
16. Copy the ‘Token’ associated with ‘Admin’ user.
17. Navigate to Administration Menu > Web services > Test Client.
18. Select ‘REST from ‘Protocol’ drop down.
19. Select ‘Token’ from the 'Authentication type’ drop down.
20. Click the ‘Next’ button.
21. From the 'Service' drop down select the service ‘Test’.
22. Click the 'Next' button.
23. From the 'Functions' drop down select ‘mahara_group_create_groups’.
24. Click the 'Next' button.

Expected Result: The following description should be displayed for switches associated with it

“Switch” - “Description”

hidden - Hide group
hidemembers - Hide membership
hidemembersfrommembers - Hide membership
groupparticipationreports - Participation report
feedbacknotify - Comment notifications

And also For 'viewnotify', 4 options should be mentioned in the field description: 0 = None, 1 = All group members, 2 = Everyone except ordinary members, 3 = Group administrators.

25. Fill in the following required fields

"Field name" - "Description"

 name - Groupone
 description - Create a group
 grouptype - Standard
 members/username - admin
 members/role - admin
 and make sure to use the switches at step 24.

23. Paste the token that is copied at step 16.
24. Click the ‘Execute’ button.

Expected result: The group ‘Groupone’ is created with correct settings.
Actual result: The group 'Groupone' is created with correct settings.

Reviewed: https://reviews.mahara.org/7920
Committed: https://git.mahara.org/mahara/mahara/commit/a2c523e478764a2d574c21ccef7c79782dfeb553
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit a2c523e478764a2d574c21ccef7c79782dfeb553
Author: Robert Lyon <email address hidden>
Date: Mon Aug 7 08:45:54 2017 +1200

Bug 1708959: New group_create webservice options

Added some new group create options and fixing up others

behatnotneeded - test will be in child patch

Change-Id: I248bf6b017c0c675daa983e8c03b8f5a01852601
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7921
Committed: https://git.mahara.org/mahara/mahara/commit/df38a43eb90005aa0891353702a94b98294924e1
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit df38a43eb90005aa0891353702a94b98294924e1
Author: Robert Lyon <email address hidden>
Date: Mon Aug 7 10:34:57 2017 +1200

Bug 1708959: Fixing test client for testing group creation

There was a problem where one could pass in a valid integer of 0 but
it was getting ignored.

Previously all empty values were ignored

Now if parameter type is integer it will not ignore '0' as a value

Change-Id: I64201db2dbe560ed1dddceadc24b85bdfa72b97b
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2017-09-17
Changed in mahara:
status: In Progress → Fix Committed
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7946
Committed: https://git.mahara.org/mahara/mahara/commit/0e8c05300a40a23a74d7af5b95fba0b15746012d
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 0e8c05300a40a23a74d7af5b95fba0b15746012d
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 09:06:39 2017 +1200

Bug 1708959: Fixing 'submitpages' vs 'submittableto' for group

In webservices / csv upload we deal with the variable 'submitpages' in
relation to if one can submit pages to group. But the group
create/update functions and db table expect 'submittableto'.

The csv upload function converts this as expected but the webservices
didn't.

Have made adjustemets to webservices to suit

behatnotneeded

Change-Id: Ia2a593705a85fec88debed63dd55277c8f1acc37
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2017-09-17
Changed in mahara:
status: Fix Committed → In Progress
Robert Lyon (robertl-9) on 2017-09-25
Changed in mahara:
status: In Progress → Fix Committed
Mahara Bot (dev-mahara) wrote :

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/8154

Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8155

Reviewed: https://reviews.mahara.org/8154
Committed: https://git.mahara.org/mahara/mahara/commit/0432740fd5081283f378055f15510d5a5c4d4352
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 0432740fd5081283f378055f15510d5a5c4d4352
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 09:06:39 2017 +1200

Bug 1708959: Fixing 'submitpages' vs 'submittableto' for group

In webservices / csv upload we deal with the variable 'submitpages' in
relation to if one can submit pages to group. But the group
create/update functions and db table expect 'submittableto'.

The csv upload function converts this as expected but the webservices
didn't.

Have made adjustemets to webservices to suit

behatnotneeded

Change-Id: Ia2a593705a85fec88debed63dd55277c8f1acc37
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8155
Committed: https://git.mahara.org/mahara/mahara/commit/f1363be56c8a299a4946b09bca93af32105b7b94
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit f1363be56c8a299a4946b09bca93af32105b7b94
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 09:06:39 2017 +1200

Bug 1708959: Fixing 'submitpages' vs 'submittableto' for group

In webservices / csv upload we deal with the variable 'submitpages' in
relation to if one can submit pages to group. But the group
create/update functions and db table expect 'submittableto'.

The csv upload function converts this as expected but the webservices
didn't.

Have made adjustemets to webservices to suit

behatnotneeded

Change-Id: Ia2a593705a85fec88debed63dd55277c8f1acc37
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8153
Committed: https://git.mahara.org/mahara/mahara/commit/b7462ea46d4c462eb705d06dd7a7b5509388230c
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit b7462ea46d4c462eb705d06dd7a7b5509388230c
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 09:06:39 2017 +1200

Bug 1708959: Fixing 'submitpages' vs 'submittableto' for group

In webservices / csv upload we deal with the variable 'submitpages' in
relation to if one can submit pages to group. But the group
create/update functions and db table expect 'submittableto'.

The csv upload function converts this as expected but the webservices
didn't.

Have made adjustemets to webservices to suit

behatnotneeded

Change-Id: Ia2a593705a85fec88debed63dd55277c8f1acc37
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) wrote :

See also Bug 1716474 for the backporting / more info

Robert Lyon (robertl-9) on 2017-10-30
Changed in mahara:
status: Fix Committed → Fix Released
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7949
Committed: https://git.mahara.org/mahara/mahara/commit/416d477a1b6eda21e1f1d8f586d335cd05513586
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 416d477a1b6eda21e1f1d8f586d335cd05513586
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 16:29:05 2017 +1200

Bug 1708959: mahara_user_get_users() function to accept params

The params being offset limit sortdir

And return offset, limit, totalcount, and array of users

behatnotneeded

Change-Id: I08f7fbfa59c4c129fb8efcc380f69738f4da624d
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/8672
Committed: https://git.mahara.org/mahara/mahara/commit/16808ebdb0191639e2ec2d64b5e397652e8b918d
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit 16808ebdb0191639e2ec2d64b5e397652e8b918d
Author: Robert Lyon <email address hidden>
Date: Fri Aug 25 16:29:05 2017 +1200

Bug 1708959: mahara_user_get_users() function to accept params

The params being offset limit sortdir

And return offset, limit, totalcount, and array of users

behatnotneeded

Change-Id: I08f7fbfa59c4c129fb8efcc380f69738f4da624d
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 416d477a1b6eda21e1f1d8f586d335cd05513586)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers