Git Product home page Git Product logo

moodle-assignsubmission_mahara's People

Contributors

agwells avatar anitsirk avatar danmarsden avatar dmitriim avatar kabalin avatar philcali avatar roperto avatar tonyjbutler avatar upats avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-assignsubmission_mahara's Issues

Remove preview icon

The preview icon is not working (and hasn't for quite some time) due to stricter iframe rules in Mahara. It would be good to remove it so people don't wonder why it's not working. The page can still be looked at before submission by clicking on it.

Moodle Assignment Collection broken link

Moodle assignment links to collection is broken. It opens up "https://teportfolios.domain.ca/https://teportfolios.domain.ca/view/view.php?id=2972".

How to reproduce:

  1. Create a Mahara submission assignment in Moodle.
  2. Create a collection in Mahara.
  3. Use a test student to submit a Mahara assignment in Moodle. In the submission page in Moodle, under "Collections by xxxxx", click on the collection link. It should open the portfolio collection. However, it displays the link below. (<-- This is what needs to be fixed.)
  4. However, if we submit the collection selected. The instructor is able to see the collection. It just doesn't display in preview.

Currently on Mahara 15.04.1 and Moodle 2.8.8.

Thanks.

Cannot "Submit for grading" where the user hasn't picked a collection

Hi there,

We have a situation where we'd like students to be able to choose between either making a file submission OR portfolio collection submission, however, submitting only a file submission without picking a collection results in seeing a "This assignment is not ready to submit" error"
Screenshot from 2021-07-14 11-51-00

Is this intended behaviour? There doesn't seem to be an option to choose whether or not a portfolio collection is required, would it be possible to make it an option whether it is required?

Let me know if you have any queries with what we're seeing or if we've missed something in the configuration of this.

Kind regards,

Sam

Problem found with upgrade step 2015021002

The code in question from db/upgrade.php:

foreach ($records as $record) {
    $DB->execute("UPDATE {assign_plugin_config} SET value = '2' WHERE plugin = 'mahara' AND subtype = 'assignsubmission' AND name = 'lock' AND value = '1'");
}

The SQL statement doesn't take into account $record - so it executes the same query over and over again. Most likely need to add AND assignment = ? to the SQL and pass [$record->assignment] as the query parameters.

Lack of MOODLE_INTERNAL checking

Hello,

First of all, thank you for your working on this plugin.

I just want to inform you we found the lack of MOODLE_INTERNAL checking in the plugin files:

mod/assign/submission/mahara/backup/moodle2/restore_assignsubmission_mahara_subplugin.class.php
mod/assign/submission/mahara/db/upgrade.php
mod/assign/submission/mahara/db/events.php
mod/assign/submission/mahara/settings.php
mod/assign/submission/mahara/mnetlib.php

Best regards,
Olena Tatarintseva.

Submit group page to a Mahara assignment in Moodle

See Launchpad Bug: https://bugs.launchpad.net/mahara/+bug/1395629

Hello
I'd like to submit a new feature request (asked by our teachers)
We have on our Moodle some courses with Mahara assignments.
For specific diploma, we ask our students to collaborate in groups, using groups in Mahara, and create collaborative pages.
Would it be possible to manage the Mahara assignement activity in Moodle by group, and then autorise the related group in Mahara to submit a group page ?
Thanks for taking this new feature request into account
BR
Emilie LENEL

Assignment grading page in 3.1 gives "invalidresponse" error

With Moodle 3.1.5 and latest version of plugin 1.2.1-mdl2.7+ (2015021006), when instructor goes to grading an assignment with the new grading page in Moodle 3.1, it displays an "invalid response" error message box and a loading page icon that never stops spinning.

Also noticed that in the Moodle assignment settings page, in the "Feedback types", Mahara feedback is no longer listed as an option.
mahara moodle assignment error

Multiple submissions of the same page to different assignments breaks previous secret URLs

I just noticed this--I am not sure if it's something that's existed the whole time or if it is just surfacing now.

When a student submits their mahara page to a moodle assignment, it generates the secret URL and everything is good.
If that student, in another course or the same course for a different assignment, submits the same page again, it breaks the secret URL that was previously generated.
It looks like in the DB, the mahara view_access table entry is being deleted but the Moodle database is still trying to use that old generated secret URL. This results in an "Access Denied" message when trying to view the less recently submitted page in Moodle.

The not-really-a-workaround workaround is to have the student resubmit their assignment that is giving the access denied message. This will refresh the stored secret URL and allow the teacher to view the page.

I can think of two potential solutions, though I'm sure there are more:

  1. Keep re-using the same secretly-generated secret URL for a given Mahara page whenever that page is submitted to any assignment in Moodle. This would keep Secret URL sprawl from happening, since we would just re-use the same URL.
  2. (probably the easier solution) Create a brand new secret URL for each Mahara page, every time it is submitted. This would obviously start filling up the view_access table in Mahara on big mahoodle sites, so it's probably not the ideal solution, unless there's some sort of expiration time.

This is using the newest v. of the plugins and on Moodle 2.8.7

Unhelpful error message on duplicate submission

Student sees, "The selected Mahara view or collection could not be submitted. Please choose another."

After a lot of digging, it turned out that the portfolio had already been submitted in a different Assignment. The comments for the code that check this are perfectly clear but it would have been much better if the error message says explicitly what the problem was.

No pages or collection found

1/ I have installed the new Mahara assignement plugin on a Moodle/Mahara couple already married. The authentication is made on Moodle and the users roams to Mahara without problems. The installation was made from the Install plugin page on Moodle (no download or git install)

2/ I have created a new Assignement with the Mahara type

3/ I logged as a student. This student can roam to Mahara from Moodle

4/ As the same student I open the assignment and try to submit a Mahara page

Attended behaviour --> A list of Collections / Pages to submit to Moodle
Actual behaviour --> Error message "ePortfolio Gymnyon
You have no available Mahara pages or collections. Please click here to visit "ePortfolio Gymnyon" and create a new one."

5/ Clicking on the link provided in the error message roams the student to Mahara and all the eP's pages and collections are visible and accessible.

-dajan

Mahara page preview doesn't work if Mahara & Moodle are at different domain names

Mahara serves up all its pages with a "X-Frame-Options: SAMEORIGIN" response header. This prevents Mahara pages from being displayed within an iframe on a page that is at a different domain name.

This is a security measure, to protect against "clickjacking", but it interferes with the preview functionality in this plugin, if your Mahara & Moodle sites are at different domains (e.g. mahara.example.com and moodle.example.com).

To replicate:

  1. Set up a Moodle site and a Mahara site at different domain names (you can use /etc/hosts to let both these domain names resolve to your local machine)
  2. Mnet them together.
  3. Set up a Mahara assignment.
    4a. As a student, click the magnifying glass icon next to a Mahara page, to preview it in an iframe.
    4b. As a teacher, go to the gradebook and click the magnifying glass icon next to a submitted Mahara page, to preview it in an iframe

Expected result: You should see the Mahara page in the iframe
Actual result: The iframe is empty

edit submission reload triggers user logout

There seems to be a bug with this plugin.
I can reproduce it in 2 sites with the following scenario:

  1. User is editing submissions
    /mod/assign/view.php?id=61&action=editsubmission

  2. clicks on a collection from mahara
    /auth/mnet/jump.php?hostid=3&wantsurl=view%2Fview.php%3Fid%3D62

  3. reload the edit submission page on moodle <<<--- this is what triggers the error

  4. click again on an collection from mahara

user is logged out. I cannot trace where the logout comes from.
Other jumps from moodle<->mahara work ok.
only edit submissions triggers the logout.

Cannot revert to draft if no portfolio submission

Related to #25

If the submission include files (or other types) but no portfolio, it cannot be reverted to draft.

Notice: Trying to get property of non-object in .../mod/assign/submission/mahara/locallib.php on line 748

Event handler doesn't unlock the assignment if it's graded 0

To replicate:

  1. Create a Moodle assignment with the Mahara submission plugin, setting the locking settings to unlock after grading.
  2. Student submits a Mahara page to Mahara assignment in Moodle
  3. Teacher grades assignment with a "0"

Expected result: The Mahara page should unlock (because it is now graded)
Actual result: The Mahara page remains locked

This is caused because the unlocking code checks for empty($grade->grade) to see whether the teacher graded the assignment, or submitted it with no grade. The PHP "empty()" method returns true on null, empty string, undefined variable, OR the numeral "0".

Master branch

Since there are no major version-specific changes in the plugin code between 2.7, 2.8 and 2.9, I suggest to start using master branch as a main plugin branch and use independent plugin versioning. There is no need to differentiate versions of the same codebase between branches, in fact it may introduce issues when same upgrade code is applied twice under different version numbers.

Impossible to remove submission

Student makes a submission and then changes their mind. They click 'Remove submission' and confirm the acknowledgment screen. Nothing happens - it returns to the previous screen.

I have run with debugging on and nothing is shown or logged.

Unlocking needs to use events rather that assignfeedback plugin.

As it has been stated in the corresponding bug in assignfeedback plugin, unlocking mechanism implementation using feedback plugin does not respect marking workflow states and unlock pages when they should remain locked. The reason is simple - feedback plugin is designed to capture feedback from grading teacher and being triggered on grading events only. Assign plugin events are believed suit better for purpose of unlocking pages and collections on Mahara, as they allow to track both grading and workflow states (and potentially other related events).

One thing that has been implemented in assignfeedback plugin, but is difficult to reach using events is passing over outcomes data along with unlocking. However, there are two things about outcomes - one is that outcomes are not enabled in Moodle by default, another is that on Mahara core those outcomes data is passed to artefacts, but no core artefacts are using it for anything. There is actually a third thing, the way how outcomes are retrieved in feedback plugin is hacky, plugin is trying to determine the updated outcomes state by looking at passed POST parameters as there are no relevant data objects are passed to feedback to use for outcomes retrieving.

Having discussed this in #mahara irc channel, the decision was to consider moving away from using feedback plugin for unlocking and rely entirely on events, which would allow to perform unlocking on various states, such as grading or releasing marks to student if workflow is in use. Outcomes needs to be considered as separate data, and, if needed, passing this data to Mahara needs to be implemented as a separate call (not as a part of unlocking).

PHP 7.1 compatibility: using $this in a static method

These lines contain a $this reference in a static context:

protected static function release_submitted_view($maharasubmissionplugin, $maharasubmission) {
// Relese submitted page, but provide no outcomes.
$maharasubmissionplugin->mnet_release_submitted_view(
$maharasubmission->viewid,
array(),
$maharasubmission->iscollection
);
if ($maharasubmissionplugin->get_error()) {
$this->set_error($maharasubmissionplugin->get_error());
} else {
$maharasubmissionplugin->set_mahara_submission_status($maharasubmission->submission, assign_submission_mahara::STATUS_RELEASED);
}
}
}

Found using https://github.com/squizlabs/PHP_CodeSniffer and https://github.com/PHPCompatibility/PHPCompatibility.

Report output:

FILE: ...mod/assign/submission/mahara/classes/observers.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 130 | ERROR | "$this" can no longer be used in a plain function or
     |       | method since PHP 7.1.
----------------------------------------------------------------------

Can't delete a mahara assignment if the Mahara site is down

I had this problem on a demo site. A Moodle & Mahara site were connected together via MNet. Some mahara assignments were set up on the Moodle site. Then the Mahara site had its database reset (on purpose), while the Moodle site was kept around because it had useful demo data in it.

The result was that the existing mahara assignments were broken, but they couldn't be deleted because attempts to delete do an mnet call which was throwing an exception.

To replicate:

  1. Set up a Mahoodle instance, with the assignment submission plugin.
  2. Create a Mahara assignment in the Moodle site
  3. Submit a Mahara page to the assignment
  4. Delete the Mahara site's database and reinstall
  5. Attempt to delete the Mahara assignment in Moodle

Expected result: You should be able to delete the assignment (possibly with a warning message)
Actual result: You see an error message and the deletion fails.

Unlock after grading does not work

When grading a student in a Moodle-Mahara assignment and saving the grade, the submitted page/collection should be unlocked.

However, this no longer works. The following error occurs:

I think I'm having the same problem here:

image

Error code: generalexceptionmessage

  • line 130 of /mod/assign/submission/mahara/classes/observers.php: Error thrown
  • line 73 of /mod/assign/submission/mahara/classes/observers.php: call to assignsubmission_mahara_observers::release_submitted_view()
  • line ? of unknownfile: call to assignsubmission_mahara_observers::submission_graded()
  • line 155 of /lib/classes/event/manager.php: call to call_user_func()
  • line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
  • line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
  • line 2856 of /mod/assign/locallib.php: call to core\event\base->trigger()
  • line 8475 of /mod/assign/locallib.php: call to assign->update_grade()
  • line 8621 of /mod/assign/locallib.php: call to assign->apply_grade_to_user()
  • line 1589 of /mod/assign/externallib.php: call to assign->save_grade()
  • line 261 of /lib/externallib.php: call to mod_assign_external::submit_grading_form()
  • line 81 of /lib/ajax/service.php: call to external_api::call_external_function()

When setting the Moodle-Mahara assignment to 'unlock after grading', the error occurs. It will not unlock.

Add "test connection" functionality in GUI and cli

A user on the Moodle forums sent me a message with a request:

"I work for the University of Montreal, we are using Mahara 1.10.2, Moodle 2.7 with the new versions of plugins for assign submission and feedback from Mahara.

We would like to have an automated test that can detect if my Moodle-Mahara integration is working fine. In other words, any kind of integration test that can check the SSO, exporting files from Moodle to Mahara, and any others shared functionalities. I would like to run it daily and be alerted if there is something that doesn't work.

Do you know if anybody in the community use some kind of test for that? Behat tests? Unit tests?

Thanks in advance!"

I mentioned that once you get the initial setup working, there should be no problems going into the future unless, possibly, you have Mahara and Moodle installed on separate servers in which case there are more potential points of failure (firewall, SSH keys, etc).

Either way, I thought it might be nice to have a feature that tests your connection between Moodle and Mahara to make sure page submitting will work. This could be accessed via a menu in Moodle that just says "connection successful!" and also a cli script that could be set to run on a cron (if someone wanted notifications on failures).

Obviously not a priority but it could be a nice long-term goal.

Now that I think about it, maybe this would be more appropriate for general XMLRPC connections in Moodle to other software, since that's ultimately what would be the cause of failure.

Mahara views locked but no Moodle submission

We have an intermittent problem with the Mahara view(s) being locked but noting being submitted in Moodle. Student reports "an error" (yes, I know!). Nothing useful is logged.

We have checked for mnet issues like time synchronisation and suchlike. SSO works fine.

It's a major pain to fix as there is nothing in the Mahara UI to reverse the lock.

I appreciate that this is a near useless report but any thoughts/actions much appreciated.

Mahara Collections (and their pages) Not Displaying within Assignments

Using Moodle 2.6.6 and Mahara 1.9.3 version.

assignsubmission_mahara v2014082000

  1. 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.
  2. 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.
  3. 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

Multiple submissions of the same page to different assignments breaks previous assignments' access

The current implementation for allowing assignments to be submitted without locking the page/collection, is pretty much a hack. It calls the Mahara method that submits & locks the page. It retrieves and stores the secret URL which is created by this call. Then it immediately calls the Mahara method that releases the page.

As a bug in the original Mahara code, the secret URL created for the lock is not deleted when the lock is released. So this quick lock-release creates and stores the secret URL, leaving the page unlocked afterwards.

The problem is, the behavior it relies on was a bug. The secret URL really should be deleted once the page is released. And it gets deleted once another lock is created on the page, which means that a page will, to the user, inexplicably stop being visible at some point, if it's submitted to another assignment.

What we really need I guess, is some kind of API for creating and storing MNet secret URLs, without locking the page. Or maybe drop the secret URL angle entirely, and use MNet itself to verify that the user is allowed to see the page?

Restoration of a deleted Mahara assignment will not lock up pages again

When a Mahara assignment containing submitted pages is deleted and then restored. The pages will not be locked again in Mahara. To reproduce:

*Assuming that the "Lock submitted pages" option is at "Yes" with the "Mahara Feedback" checked.

  1. As a student, go to the Mahara assignment and submit a page or pages.
  2. As a teacher, make a backup of your course only with the Mahara assignment. You must include user data.
  3. Delete the assignment.
  4. As a student, check that the page (or pages) was (were) unlocked in Mahara.
  5. As a teacher, restore the course with the .mbz file.
  6. Check that the assignment is now available again and that student’s page(s) is (are) back as well.
  7. As a student, check that your page(s) that you previously sent for evaluation is now locked again in Mahara. (this does not happen).

Result: It seems that the page(s) is (are) not locked anymore which might be a problem for many users. I am using Moodle 2.7.3 and Mahara 1.10.2.

Submission fails if multiple submission plugins are enabled

Plugin version: 2015021006
Moodle version: 2016120504.10
Mahara version: 2016090224

Steps to replicate:
0. Assuming that you have moodle and mahara configured to work with each other.

  1. Create a new assignment and enable Mahara portfolio and File submission types
  2. Set Require students click submit button to yes
  3. Set Require that students accept the submission statement to yes
  4. Login as a student who doesn't have any pages or collections created in mahara. Don't create any.
  5. Submit draft: upload file and Save changes.
  6. Submit assignment.

Expected: assignment submitted for grading.
Actual: Error Attempt to send mnet request resulted in error:
Stack trace:
line 649 of /mod/assign/submission/mahara/locallib.php: moodle_exception thrown
line 5969 of /mod/assign/locallib.php: call to assign_submission_mahara->submit_for_grading()
line 6066 of /mod/assign/locallib.php: call to assign->submit_for_grading()
line 473 of /mod/assign/locallib.php: call to assign->process_submit_for_grading()
line 55 of /mod/assign/view.php: call to assign->view()

It seems to happen because we don't check if we get correct mahara submission data in https://github.com/MaharaProject/moodle-assignsubmission_mahara/blob/master/locallib.php#L646

Using $this in static function

Hello,

I reviewed the plugin and it looks like there is the bug in the code. I noticed using $this in static function release_submitted_view() in mod/assign/submission/mahara/classes/observers.php.

Best regards,
Olena Tatarintseva

Rename column mdl_assignsubmission_mahara.viewid to make it clear it can hold a view OR collection ID

Before this plugin supported collections, the mdl_assignsubmission_mahara.viewid column held the (Mahara) ID of the submitted view. When I implemented collection supported, I added an additional column to the table (iscollection) and began using the viewid column to hold collection IDs as well as view IDs.

I fear this could cause developers new to the project to get confused and think that in the case of a collection, the column contains the view of one of the IDs in the collection. So maybe in the sake of readability, it would be a good idea to rename that column to something that makes it more obvious that it is not just holding a view id.

Like... maharaid? Or vcid? Or portfolioid?

Add string "none selected" to lang package / Amos

Hello
I discovered that the string (none selected) is not in the lang package
But directly in /mod/assign/submission/mahara/localib.php
line 216
$mform->addElement('radio', 'viewid', '', '(none selected)', 'none');

We don't want to touch the plugin code
Would it be possible to add it in the lang package for next release ?

Thanks
BR
Emilie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.