Loading groups via csv throwing error Undefined index: allowarchives

Bug #1376503 reported by Robert Lyon
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon
1.10
Fix Released
Medium
Unassigned
15.04
Fix Released
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

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3734

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

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)
Changed in mahara:
status: Confirmed → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/3772

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

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)
no longer affects: mahara/1.10
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
tags: added: usermanualupdate
tags: removed: usermanualupdate
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.