← Back to team overview

mahara-contributors team mailing list archive

[Bug 1795273] Re: Can't delete a user who submitted assignments to the LMS via LTI

 

** Changed in: mahara
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1795273

Title:
  Can't delete a user who submitted assignments to the LMS via LTI

Status in Mahara:
  Fix Released

Bug description:
  I wanted to delete a user who submitted assignments to LTI (both
  locked and unlocked), but only got the error messages below.

  To replicate
  ---------------

  1. Set up LTI between Moodle and Mahara.
  3. Create 2 activities: One to keep the portfolio locked, one to unlock it.
  3. Submit portfolios to each as a student.
  4. Delete the student account on Mahara.
  Expected result: Account is deleted.
  Actual result: Delete action is aborted.

  
  [WAR] 73 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion
  Call stack (most recent first):

      log_message("Array to string conversion", 8, true, true, "/var/www/ws-mahara-prod-mahara/releases/2018092704...", 45) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/errors.php:521
      error(8, "Array to string conversion", "/var/www/ws-mahara-prod-mahara/releases/2018092704...", 45, array(size 7)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/adodb/adodb-exceptions.inc.php:45
      ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "view" violates ...", "DELETE FROM "view" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/adodb/adodb-exceptions.inc.php:80
      adodb_throw("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "view" violates ...", "DELETE FROM "view" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/adodb/adodb.inc.php:313
      ADODB_TransMonitor("postgres8", "adodb_throw", -1, "ERROR: update or delete on table "view" violates ...", "DELETE FROM "view" WHERE "id" = ? ", array(size 1), object(ADODB_postgres8)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/adodb/adodb.inc.php:1263
      ADOConnection->_Execute("DELETE FROM "view" WHERE "id" = ? ", array(size 1)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/adodb/adodb.inc.php:1223
      ADOConnection->Execute("DELETE FROM "view" WHERE "id" = ? ", array(size 1)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/dml.php:981
      delete_records("view", "id", "84") at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/view.php:1016
      View->delete() at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/user.php:1601
      delete_user(8) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:323
      delete_submit(object(Pieform), array(size 3)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:542
      Pieform->__construct(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:164
      Pieform::process(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/mahara.php:5195
      pieform(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:188

  [WAR] 73 (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-1: ERROR:  update or delete on table "view" violates foreign key constraint "ltiassesubm_vie_fk" on table "lti_assessment_submission"
  DETAIL:  Key (id)=(84) is still referenced from table "lti_assessment_submission".] in adodb_throw(DELETE FROM "view"  WHERE "id" = ? , Array)Command was: DELETE FROM "view"  WHERE "id" = ?  and values was (0:84)
  Call stack (most recent first):

      log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/errors.php:95
      log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/errors.php:859
      SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/dml.php:984
      delete_records("view", "id", "84") at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/view.php:1016
      View->delete() at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/user.php:1601
      delete_user(8) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:323
      delete_submit(object(Pieform), array(size 3)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:542
      Pieform->__construct(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:164
      Pieform::process(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/mahara.php:5195
      pieform(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:188

  [WAR] 73 (lib/dml.php:984) Failed to get a recordset: postgres8 error: [-1: ERROR:  update or delete on table "view" violates foreign key constraint "ltiassesubm_vie_fk" on table "lti_assessment_submission"
  DETAIL:  Key (id)=(84) is still referenced from table "lti_assessment_submission".] in adodb_throw(DELETE FROM "view"  WHERE "id" = ? , Array)Command was: DELETE FROM "view"  WHERE "id" = ?  and values was (0:84)
  Call stack (most recent first):

      delete_records("view", "id", "84") at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/view.php:1016
      View->delete() at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/user.php:1601
      delete_user(8) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:323
      delete_submit(object(Pieform), array(size 3)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:542
      Pieform->__construct(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/pieforms/pieform.php:164
      Pieform::process(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/lib/mahara.php:5195
      pieform(array(size 4)) at /var/www/ws-mahara-prod-mahara/releases/20180927041435/admin/users/bulk.php:188

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1795273/+subscriptions


References