← Back to team overview

mahara-contributors team mailing list archive

[Bug 1251089] Re: Invalid value for licensedefault

 

==== Bug #1251089 Invalid value for license default ====

==== How to Test ====
1. Log in as an admin 
2. Browse to Administration => Site options => General settings => make sure to tick the Licence metadata check box
3. Browse to settings link at the top right hand corner of the page 
4. Confirm there are no errors on the user settings page.  
5. Browse to Administration => Users => select a user to masquerade as
6. Browse to settings link at the top right hand corner of the page 
7. Confirm there are no errors on the masqueraded user settings page. 

==== Test Results  ====
4. Confirmed there are no errors on the user settings page. ✔
7. Confirmed there are no errors on the masqueraded user settings page. ✔

Catalyst QA Approved ✔

-- 
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/1251089

Title:
  Invalid value for licensedefault

Status in Mahara ePortfolio:
  In Progress

Bug description:
  If I have a site and enable the 'General' setting: License metadata
  and then masquerade as different user and then go to their account
  settings  page I get the below error (see first error).

  From what I can see in general_account_prefs_form_elements($prefs)
  there is a bit of code to set the institution's default as the default
  for the form.

  But 'no institution' doesn't set the default license as it's edit form
  does not display this option and on save you get errors (shown below).

  The 'no institution' institution needs to be able to handle this like
  any other institution - or be exempt from needing it.


  [WAR] 99 (lib/pieforms/pieform.php:1236) Invalid value for select "licensedefault"
  Call stack (most recent first):

      log_message("Invalid value for select "licensedefault"", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 1236) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
      error(1024, "Invalid value for select "licensedefault"", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 1236, array(size 2)) at Unknown:0
      trigger_error("Invalid value for select "licensedefault"", 1024) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:1236
      Pieform::info("Invalid value for select "licensedefault"") at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform/elements/select.php:102
      pieform_element_select(object(Pieform), array(size 12)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:1402
      Pieform->build_element_html(array(size 12)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:673
      Pieform->build() at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:171
      Pieform::process(array(size 8)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
      pieform(array(size 8)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/account/index.php:266

  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  [WAR] 11 (admin/users/institutions.php:585) Undefined index: licensemandatory
  Call stack (most recent first):

      log_message("Undefined index: licensemandatory", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 585) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
      error(8, "Undefined index: licensemandatory", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 585, array(size 3)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:585
      institution_validate(object(Pieform), array(size 34)) at Unknown:0
      call_user_func_array("institution_validate", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:1348
      Pieform->validate(array(size 34)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:506
      Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:170
      Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
      pieform(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:517

  [WAR] 11 (admin/users/institutions.php:677) Undefined index: licensemandatory
  Call stack (most recent first):

      log_message("Undefined index: licensemandatory", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 677) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
      error(8, "Undefined index: licensemandatory", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 677, array(size 11)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:677
      institution_submit(object(Pieform), array(size 34)) at Unknown:0
      call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:528
      Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:170
      Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
      pieform(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:517

  [WAR] 11 (admin/users/institutions.php:678) Undefined index: licensedefault
  Call stack (most recent first):

      log_message("Undefined index: licensedefault", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 678) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
      error(8, "Undefined index: licensedefault", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 678, array(size 11)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:678
      institution_submit(object(Pieform), array(size 34)) at Unknown:0
      call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:528
      Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:170
      Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
      pieform(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:517

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


References