MNet method "get_views_for_user()" returns full urls for collections when it should return partial

Bug #1514299 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Aaron Wells
1.10
Fix Released
Medium
Aaron Wells
15.04
Fix Released
Medium
Aaron Wells
15.10
Fix Released
Medium
Aaron Wells

Bug Description

See also https://github.com/MaharaProject/moodle-assignsubmission_mahara/issues/15

When a student is picking a collection in the Mahara assignment submission plugin for Moodle, the URLs for collections (both the preview URL and the navigation URL) are incorrect. This is because the get_views_for_user() method on the Mahara side returns an absolute URL for the collection['url'] field, while it returns a relative-to-wwwroot URL for the view['url'] field.

I'm tackling this by putting workaround code in the submission plugin, and by patching Mahara to return the same ['url'] values for views & collections.

And then eventually (when there are no more of the old, bad Mahara instances around) we can drop the workaround code from the Moodle plugin. Although I guess hopefully by then we won't be using MNet for the plugin anymore, anyway. :)

Aaron Wells (u-aaronw)
tags: added: mnet no-behat-needed
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

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

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5679
Committed: https://git.mahara.org/mahara/mahara/commit/905ea6f1af04ff6eafc2d0b86f69d83521951fbb
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 905ea6f1af04ff6eafc2d0b86f69d83521951fbb
Author: Aaron Wells <email address hidden>
Date: Mon Nov 9 17:42:09 2015 +1300

Make Mnet return collection URLs in same format as view URLs (Bug 1514299)

Change-Id: Ic8cb9115654106f669b544f5f8b060d443a0a9f0
behatnotneeded: Can't yet test MNet methods in Behat.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/5700

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5701

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/5702

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5700
Committed: https://git.mahara.org/mahara/mahara/commit/8a03b3d0c43b02dc6de8d0b736dae2f29cbd2708
Submitter: Aaron Wells (<email address hidden>)
Branch: 15.10_STABLE

commit 8a03b3d0c43b02dc6de8d0b736dae2f29cbd2708
Author: Aaron Wells <email address hidden>
Date: Mon Nov 9 17:42:09 2015 +1300

Make Mnet return collection URLs in same format as view URLs (Bug 1514299)

Change-Id: Ic8cb9115654106f669b544f5f8b060d443a0a9f0
behatnotneeded: Can't yet test MNet methods in Behat.
(cherry picked from commit 905ea6f1af04ff6eafc2d0b86f69d83521951fbb)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5701
Committed: https://git.mahara.org/mahara/mahara/commit/de152f87f15374418ff72610979767492d4b1361
Submitter: Aaron Wells (<email address hidden>)
Branch: 15.04_STABLE

commit de152f87f15374418ff72610979767492d4b1361
Author: Aaron Wells <email address hidden>
Date: Mon Nov 9 17:42:09 2015 +1300

Make Mnet return collection URLs in same format as view URLs (Bug 1514299)

Change-Id: Ic8cb9115654106f669b544f5f8b060d443a0a9f0
behatnotneeded: Can't yet test MNet methods in Behat.
(cherry picked from commit 905ea6f1af04ff6eafc2d0b86f69d83521951fbb)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5702
Committed: https://git.mahara.org/mahara/mahara/commit/2e2899b948e2b52372f001a52c874211d83d30d6
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.10_STABLE

commit 2e2899b948e2b52372f001a52c874211d83d30d6
Author: Aaron Wells <email address hidden>
Date: Mon Nov 9 17:42:09 2015 +1300

Make Mnet return collection URLs in same format as view URLs (Bug 1514299)

Change-Id: Ic8cb9115654106f669b544f5f8b060d443a0a9f0
behatnotneeded: Can't yet test MNet methods in Behat.
(cherry picked from commit 905ea6f1af04ff6eafc2d0b86f69d83521951fbb)

no longer affects: mahara/16.04
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.