Loading groups via csv throwing error Undefined index: allowarchives

Bug #1376503 reported by Robert Lyon on 2014-10-01
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Medium
Robert Lyon
1.10
Medium
Unassigned
15.04
Medium
Robert Lyon

Bug Description

The problem seems to be if you upload groups via a csv file with a group that contains role = course.

Test with a file similar to the csv file structured

shortname,displayname,roles,editroles
groupone,Group One,standard,admin
grouptwo,Group Two,course,all
groupalpha,Group A,standard,admin
groupthree,Group Three,course,admin
groupbeta,Group B,standard,admin

Also the 'allowarchives' needs to be a valid column type for the csv.

The error stack is:

    log_message("Undefined index: allowarchives", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 437) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:439
    error(8, "Undefined index: allowarchives", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 437, array(size 3)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/group.php:437
    group_create(array(size 6)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/groups/uploadcsv.php:288
    uploadcsv_submit(object(Pieform), array(size 5)) at Unknown:0
    call_user_func_array("uploadcsv_submit", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:527
    Pieform->__construct(array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:162
    Pieform::process(array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/groups/uploadcsv.php:352

Reviewed: https://reviews.mahara.org/3734
Committed: http://gitorious.org/mahara/mahara/commit/8f0e0737ba62f9f8e3fd0a703e735717fd98c826
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 8f0e0737ba62f9f8e3fd0a703e735717fd98c826
Author: Robert Lyon <email address hidden>
Date: Thu Oct 2 12:15:44 2014 +1300

Upload groups via csv throws errors (Bug #1376503)

When the role 'course' is used - see notes in bug for testing

Also fixing the problem when updating groups via csv one could set
allowarchives = 1 even if allow submitpages = 0 which shouldn't be
allowed.

Change-Id: I9a2205835b09f73c9c881e8f707845e9032939ed
Signed-off-by: Robert Lyon <email address hidden>

Son Nguyen (ngson2000) on 2014-10-06
Changed in mahara:
status: Confirmed → Fix Committed

Reviewed: https://reviews.mahara.org/3772
Committed: http://gitorious.org/mahara/mahara/commit/02270459c605a6398ed65e07e43eeb83fe3124b0
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 02270459c605a6398ed65e07e43eeb83fe3124b0
Author: Robert Lyon <email address hidden>
Date: Thu Oct 2 12:15:44 2014 +1300

Upload groups via csv throws errors (Bug #1376503)

When the role 'course' is used - see notes in bug for testing

Also fixing the problem when updating groups via csv one could set
allowarchives = 1 even if allow submitpages = 0 which shouldn't be
allowed.

Change-Id: I9a2205835b09f73c9c881e8f707845e9032939ed
Signed-off-by: Robert Lyon <email address hidden>

Aaron Wells (u-aaronw) on 2014-10-20
no longer affects: mahara/1.10
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
tags: added: usermanualupdate
tags: removed: usermanualupdate
Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers