Adding users to sections is not working

Description

Adding users to any sections is not working. It is showing a javascript error at the browser console:

Uncaught TypeError: Cannot read property 'options' of undefined

It seems that availableUsers variable is null in this code of sections.js:

function addUser(){
var count = 0;
var selectedArray = new Array();
for (var i=0; i<availableUsers.options.length; i++) {

See the screenshot.

Attachments

2
  • 18 Nov 2014, 06:47 AM
  • 07 Nov 2014, 05:48 AM

is related to

Activity

Show:

Hudson CI Server November 23, 2014 at 1:20 PM

SUCCESS: Integrated in sakai-trunk-java-1.7 #522 (See http://builds.sakaiproject.org:8080/job/sakai-trunk-java-1.7/522/)
https://sakaiproject.atlassian.net/browse/SAK-28062#icft=SAK-28062 Adding users to sections is not working (jjmerono@um.es: rev 315525)

Juanjo Meroño November 19, 2014 at 4:04 AM

Thanks for the patch !!
Committed revision 315525

Metal Ring November 18, 2014 at 6:47 AM

Sections tool has prelude.jspf and coda.jspf files to include header and footer code in all pages. Because iframes are removed in SAK-27774, the <body> and </body> tags included in these files are not being rendered anymore, so the javascript inside the "onload" attribute is not executed:

<body onload="<%=request.getAttribute("sakai.html.body.onload")%>prepForms();setTimeout('setSectionPageFocus()',1);">

I attach a patch that runs these javascript functions using jquery.

I suppose the code in this structure could be rewritten for optimization in other jira.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Environment

Chrome, Firefox, Internet Explorer
Created November 7, 2014 at 5:48 AM
Updated November 23, 2014 at 1:20 PM
Resolved November 19, 2014 at 4:04 AM