Students unable to duplicate a collection because of an index collision in SmartEvidence framework

Bug #1938872 reported by Alex Walker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

We have several students who are unable to duplicate a collection in Mahara. Doing so results in an error about duplicate rows in a table (framework_evidence) with a unique index on certain fields (framevid_fraelevie_uk).

Full error log below:

[WAR] 88 (lib/errors.php:853) Failed to get a recordset: mysqli error: [1062: Duplicate entry '7-46-184220' for key 'framevid_fraelevie_uk'] in EXECUTE("INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES ('1106091', '7', '46', '184220', 0, '2021-03-11 12:33:02', '2021-03-11 12:33:02')")Command was: INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES (?, ?, ?, ?, ?, ?, ?) and values was (annotation:1106091,framework:7,element:46,view:184220,state:0,ctime:2021-03-1112:33:02,mtime:2021-03-1112:33:02)

Call stack (most recent first):

log_message(string(size 597), integer, true, true) at /var/www/html/mahara/lib/errors.php:89
log_warn(string(size 597)) at /var/www/html/mahara/lib/errors.php:853
SQLException->__construct(string(size 597)) at /var/www/html/mahara/lib/dml.php:1236
insert_record(string(size 18), object(stdClass)) at /var/www/html/mahara/lib/collection.php:666
Collection::create_from_template(array(size 3), integer) at /var/www/html/mahara/lib/view.php:7831
copyview(string(size 6), integer, null, integer) at /var/www/html/mahara/view/copy.php:34

[WAR] 88 (lib/dml.php:1236) Failed to get a recordset: mysqli error: [1062: Duplicate entry '7-46-184220' for key 'framevid_fraelevie_uk'] in EXECUTE("INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES ('1106091', '7', '46', '184220', 0, '2021-03-11 12:33:02', '2021-03-11 12:33:02')")Command was: INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES (?, ?, ?, ?, ?, ?, ?) and values was (annotation:1106091,framework:7,element:46,view:184220,state:0,ctime:2021-03-1112:33:02,mtime:2021-03-1112:33:02)

Call stack (most recent first):

insert_record(string(size 18), object(stdClass)) at /var/www/html/mahara/lib/collection.php:666
Collection::create_from_template(array(size 3), integer) at /var/www/html/mahara/lib/view.php:7831
copyview(string(size 6), integer, null, integer) at /var/www/html/mahara/view/copy.php:34

Site unavailable

A nonrecoverable error occurred. This probably means you have encountered a bug in the system

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Alex,

Which version of Mahara are you using? How are you duplicating a collection with SmartEvidence? Are they copying it from an institution or site collection or from a personal one? It would be great to have more information available for testing.

Thank you
Kristina

Changed in mahara:
status: New → Incomplete
Revision history for this message
Alex Walker (lexy212) wrote :

Hello,

We're using Mahara 21.04.1 and our database is on MySQL 5.7-27.

Our lecturers create a blank template portfolio for the students to fill out, and they share it with students through a group. The students duplicate it and fill out their details. They do this at several intervals throughout their course - at the start, after 3 months, after 6 months etc to document their learning process throughout the year.

This doesn't happen when every student duplicates a group - we have a big class of students, and only two are seeing this issue. The version they're trying to create is a duplicate of a duplicate.

If you need any further information about this, I'll need to get in touch with the lecturers to try and get a bit more information.

Alex

Changed in mahara:
status: Incomplete → New
summary: Students unable to duplicate a collection because of an index collision
- in Evidence Framework
+ in SmartEvidence framework
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.