Forums | Mahara Community
Support
/
Moodle Mahara Submission plugin URL issues
17 November 2014, 17:51
Hi All,
Had a report today from a student who had submitted their Mahara collection to Moodle via the unified Mahara submission plugin (Mahara 1.9.0 to Moodle 2.6). However the way the URL is generated is leading to some inconsistency in the behaviour.
The url generated (via $maharasubmission->viewurl) is view/view.php?id=9542&mt=U1Cjmhs49TFrEnqSaOoQ
The problem is that some users are reporting that they are taken to a completely different page when using the link. The student's collection has an id of 9542 but some are being taken to a different student's page/view - that has an id of 9542.
My question is how is the access key (the &mt part of the URL) generated and how does it work? The student is concerned their submission didn't work properly.
Thanks,
Scott
19 November 2014, 18:48
Hi Scott,
Yeah, this looks like a bug. I believe it should be generating a URL that only has the "mt=" on it.
The "mt" part is an MNet access token, which acts a lot like a "Secret URL" token, except that it only works if you're logged in via MNet.
The behavior of view/view.php right now is actually kind of buggy now that I look at it. If there is an "mt" on the URL, and you're logged in via MNet, it will ignore any "id=" part of the URL and only show you the page (or collection) referred to by that token.
On the other hand, if you're not logged in via MNet, it will ignore the "mt" and, if there's an "id" portion of the URL, it'll take you there instead.
So this makes it entirely possible to generate a URL that will take you to a different page depending on whether you're logged in to Mnet or not. We should really fix that, so that if you load a URL with a MNet access token on it, you must be logged in to MNet to view it.
And we should also fix the assignment submission plugin, which is, as you say, apparently putting the collection ID on the URL instead of the ID of the first page in the collection.
Cheers,
Aaron
19 November 2014, 19:17
Hi again Scott,
I tried it now, and I wasn't able to replicate the type of URL that you're describing. I created a collection in Mahara, and submitted it to Moodle, and the generated "mt" URL only had an "mt" on it, not an "id". Looking at the underlying code, it's pretty clear too:
'url' => '/view/view.php?mt=' . $access->token,
Is this a collection that was submitted before you upgraded to the merged plugin? It could be a bug in the upgrade script if that's the case.
Cheers,
Aaron
19 November 2014, 23:07
Hi,
Apologies for jumping in here. We have the new assignment plug-ins installed too within Moodle 2.6.6 and Mahara 1.9.3 version.
The new plug-ins are looking great Aaron but here are our current problems which we have encountered:
- Student copies Mahara collection from lecturer with around six pages contained within the collection, save as their own but the collection or the pages do not appear within the Moodle assignment.
- Student copies a single page from lecturer, saves as their own and the page appears within the Moodle assignment. Student also creates a new page, which appears within the Moodle assignment.
- Student creates a new collection, adds pages to the collection and these pages disappear from the Moodle assignment. The new collection also does not appear within the Moodle assignment.
Turned debugging on within Moodle:
Notice: Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: submittedtime in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 178 Notice:
Undefined index: collections in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 188 Warning:
Invalid argument supplied for foreach() in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 188 Notice:
Undefined index: collections in /u0/webroot/virtual/moodle.sruc.ac.uk/www/mod/assign/submission/mahara/locallib.php on line 236
Hope the above is clear and very cool plug-ins which will help us in many areas of assessing the students with using Mahara
Cheers
Ali
20 November 2014, 10:57
Hi Ali,
Bug reports are appreciated! There are so many different ways to use this plugin, it has been rather challenging for me to test it. You can also report them on the bug tracker for the plugin, here: https://github.com/MaharaProject/moodle-assignsubmission-mahara/issues
Can you tell me what version of the plugin you're using? i.e., what value is $plugin->version in mod/assign/submission/mahara/version.php
Cheers,
Aaron
20 November 2014, 23:15
Thanks Aaron
Just reported this to the bug tracker with your question on the version of the plugin, which is assignsubmission_mahara v2014082000.
Yeah, it's looking pretty good and I know we will be using the plugins pretty heavily in the near future. Thanks for the hard work on this
Cheers
Ali
20 November 2014, 10:59
Hi Aaron,
Thanks for clearing that up - having a look at the dates involved it is a bit of an older one.
Cheers,
Scott
26 November 2014, 13:12
Thanks, I'll try running some tests of the upgrade script and see if I can replicate the problem that way.
Did you upgrade from the Portland U version of the plugin, or the Lancaster version of the plugin?
Cheers,
Aaron
27 November 2014, 11:34
I initially downloaded the one Ruslan linked in this thread: https://mahara.org/interaction/forum/topic.php?id=5300&offset=0 in May of this year before upgrading in July. Not sure which University he's from :)