School ID Handle in MAPViewController.js

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

School ID Handle in MAPViewController.js

Jonathan Hart

Good Afternoon All,

 

Working on an integration between MAP and our SIS and cannot seem to get a handle on the School ID for a student inside of MAPViewController.js

 

Can anyone point out where I can get a handle on the School ID?  personLite.get(“schoolId”) does not work :p

 

Thanks,

 

 

--
You received this message because you are subscribed to the Google Groups "Student Success Plan User Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/ssp-user/.
Reply | Threaded
Open this post in threaded view
|

RE: School ID Handle in MAPViewController.js

Jonathan Hart

Nevermind… figured it out :P

 

           var me = this;

           Ext.Ajax.request({

             url: '/ssp/api/1/person/' + me.personLite.get('id'),

             success: function (response, opts) {

                var obj = Ext.JSON.decode(response.responseText);

                var base = document.URL;

                var sisPath = 'https://some.url.com/webapp';

                sisPath += (base.substr(base.indexOf('-') + 1, 4) == 'prod') ? '' : 'Test';

                Ext.Ajax.request({

                  url: sisPath + '/servlet/ssp.SomeMAPServletHere',

                  cors: true,

                  params: {

                     json: true,

                     studentSchoolId: obj.schoolId,

                     termId: ''

                  },

                  success: function (response, opts) {

                     var obj = Ext.JSON.decode(response.responseText);

                     var sMsg = (obj.SomeMAPServlet.Successful == 'true') ? 'was Successful.' : 'Failed!';

                     Ext.Msg.alert('Sync to Mariner ' + sMsg, obj.MapUpdateERPAdvising.ResponseMessage);

                  },

                  failure: function (response, opts) {

                     Ext.Msg.alert('Sync to SIS Failed!', '<br/>FAILURE CODE: ' + response.status);

                  }

                });

             },

             failure: function (response, opts) {

                Ext.Msg.alert('STUDENT NOT FOUND!', '<br/>FAILURE CODE: ' + response.status);

             }

           });

 

Thanks,

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jonathan Hart
Sent: Tuesday, January 12, 2016 3:17 PM
To: [hidden email]
Subject: [ssp-user] School ID Handle in MAPViewController.js

 

Good Afternoon All,

 

Working on an integration between MAP and our SIS and cannot seem to get a handle on the School ID for a student inside of MAPViewController.js

 

Can anyone point out where I can get a handle on the School ID?  personLite.get(“schoolId”) does not work :p

 

Thanks,

 

 

--
You received this message because you are subscribed to the Google Groups "Student Success Plan User Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/ssp-user/.

--
You received this message because you are subscribed to the Google Groups "Student Success Plan User Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/ssp-user/.