AnsweredAssumed Answered

Need some assistance with custom scripting for ILP integration (Colleague -> Blackboard)

Question asked by ch29891 on Jun 25, 2018

Trying to get the Colleague -> Blackboard ILP integration up and running.  Trying to write a custom script in the Primary Institution Role field to look at the email coming in from Colleague to determine whether or not it includes "students" in the email address.  If so, I want to pass a value of "CVCC Student" if not, I want to pass a value of "CVCC Faculty and Staff".


Any suggestions on what this custom script should look like?


I tried hard coding the email address just to see if I could get 'includes' to work:



var semail = '';

var n = semail.includes('students');

if (n == true) {

  return '164';

} else {

  return '165';





The output I am getting is null.


Here's the message I am getting in my log file:

blackboard.platform.script.ScriptingException: org.mozilla.javascript.EcmaError: TypeError: Cannot find function includes in object (<Unknown Source>#3)