3. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/18/2017 7:43:52 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

3.1 Files compared

# Location File Last Modified
1 RAMS-Integration_CIF.zip GenerateAgendaReportRDC.js Mon Apr 17 17:57:50 2017 UTC
2 RAMS-Integration_CIF.zip GenerateAgendaReportRDC.js Tue Apr 18 12:33:06 2017 UTC

3.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 638
Changed 7 24
Inserted 0 0
Removed 0 0

3.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

3.4 Active regular expressions

No regular expressions were active.

3.5 Comparison detail

  1   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/docxt emplater.j s"></scrip t>
  2   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/FileS aver.min.j s"></scrip t>
  3   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/jszip -utils.js" ></script>
  4   // <script
  5   // src="ht tps://vaww .itst.ram. msp. DNS     /SiteAsset s/js/dynam icGenerati on.js"></s cript>
  6   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/jquer y-1.8.3.mi n.js"></sc ript>
  7  
  8   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/spin. min.js"></ script>
  9   // <script
  10   // src="ht tp://vaww. itst.ram.m sp. DNS     /SiteAsset s/js/jshas htable-3.0 .js"></scr ipt>
  11   // <script
  12   // src="ht tp://vaww. itst.ram.m sp. DNS     /SiteAsset s/js/rams- environmen t.js"></sc ript>
  13  
  14   // <script
  15   // src="ht tp://vaww. itst.ram.m sp. DNS     /SiteAsset s/js/dynam icMembers. js"></scri pt>
  16   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/Micro softAjax.j s"></scrip t> 
  17   <script sr c="http:// vaww.itst. ram.msp. DNS     /SiteAsset s/js/momen t.js"></sc ript>
  18   // <script  type="tex t/javascri pt" src="_ layouts/15 /sp.runtim e.js"></sc ript>
  19   // <script  type="tex t/javascri pt" src="_ layouts/15 /sp.js"></ script>
  20   <!--
  21   Mandatory  in IE 6, 7 , 8 and 9.
  22   -->
  23   <!--[if IE ]>
  24   <script ty pe="text/j avascript"  src="exam ples/vendo r/jszip-ut ils-ie.js" ></script>
  25   <![endif]- ->
  26  
  27   <div id="s pinnerdiv" > </div>
  28   <script>
  29   var loadFi le=functio n(url,call back){
  30           JS ZipUtils.g etBinaryCo ntent(url, callback);
  31   }
  32   var opts =  {
  33                    line s: 12, //  The number  of lines  to draw
  34                    leng th: 7, //  The length  of each l ine
  35                    widt h: 5, // T he line th ickness
  36                    radi us: 10, //  The radiu s of the i nner circl e
  37                    colo r: '#fff',  // #rbg o r #rrggbb
  38                    spee d: 1, // R ounds per  second
  39                    trai l: 66, //  Afterglow  percentage
  40                    shad ow: true / / Whether  to render  a shadow
  41   };
  42  
  43   // checkSo urceParame ter();
  44   var target  = documen t.getEleme ntById('sp innerdiv') ;
  45  
  46   var spinne r = new Sp inner(opts ).spin(tar get);
  47   $(target). data('spin ner',spinn er);
  48  
  49   var itemIn fo; // dat a after JS ON is pars ed into di ctionary
  50   var curren tUrl = win dow.locati on.href;
  51   var studyA rray = [];
  52   var minute Array=[];
  53   var agenda Columns =  new Object ;
  54  
  55   generateAg endaReport (currentUr l);
  56  
  57   function g enerateAge ndaReport( currUrl){
  58           va r realUrl  = currUrl. substring( 0, currUrl .indexOf(" SitePages" )-1);
  59           va r itemID   = getQuery StringPara meter('Cus tomID');//  currUrl.s ubstring(c urrUrl.ind exOf("ID=" )+3);
  60  
  61           $. ajax({
  62                    url:  realUrl +  "/_api/we b/lists/ge tbytitle(' RDC Calend ar')/items (" + itemI D + ")?$se lect=Title ,EventDate ,Committee Attendees/ ID,Committ eeAttendee s/Title,Pa rticipants Picker/ID, Participan tsPicker/T itle,Appro vedApplica tionLookup /ID&$expan d=Committe eAttendees ,ApprovedA pplication Lookup,Par ticipantsP icker",
  63                    meth od: "GET",
  64                    head ers: { "Ac cept": "ap plication/ json; odat a=verbose"  },
  65                    succ ess: funct ion (data)  {
  66                             // map ping the r esults
  67                             mapDat aObject(da ta);
  68                    },
  69                    erro r: functio n (data) {
  70                             alert( data.respo nseText);
  71                    }
  72           }) ;
  73  
  74           //  console.l og(agendaC olumns);
  75           //  return ag endaColumn s;
  76           //  return it emInfo;
  77   }
  78  
  79   function m apDataObje ct(inData) {
  80           it emInfo =   inData;
  81           va r arr = [] ;
  82  
  83  
  84           va r committe eAttendeeC ount = 0;
  85           va r attendee Count = 0;
  86           ag endaColumn s["Title"]  = itemInf o.d.Title;  // can al so use
  87                                                                                                            // a gendaColum ns.Title t o add
  88                                                                                                            // p roperty to  object
  89           //  agendaCol umns["Loca tion"] = i temInfo[0] .Location;
  90           ag endaColumn s["EventDa te"] = mom ent(itemIn fo.d.Event Date).form at( "MMM D D YYYY");  // no
  91                                                                                                                                                                                                    // ' StartDate'
  92                                                                                                                                                                                                    // v alue
  93                                                                                                                                                                                                    // f ound
  94           ag endaColumn s["EventTi me"] = mom ent(itemIn fo.d.Event Date).form at( "h:mm" );
  95           //  agendaCol umns["Desc ription"]  = itemInfo [0].Descri ption;
  96           //  agendaCol umns["Date  Created"]  = itemInf o[0].Creat ed;
  97           if  (itemInfo .d.Committ eeAttendee s.hasOwnPr operty('re sults')){
  98                    comm itteeAtten deeCount =  itemInfo. d.Committe eAttendees .results.l ength;
  99                    for( count = 0;  count < c ommitteeAt tendeeCoun t; count++ ){
  100                             arr.pu sh({
  101                                      "name":  itemInfo.d .Committee Attendees. results[co unt].Title ,
  102                                      "role":  "N/A",
  103                                      "coi": " No"
  104                             });
  105  
  106                    }
  107           }
  108           if  (itemInfo .d.Partici pantsPicke r.hasOwnPr operty('re sults')){
  109                    atte ndeeCount  = itemInfo .d.Partici pantsPicke r.results. length;
  110                    for( count = 0;  count < a ttendeeCou nt; count+ +){
  111                             arr.pu sh({
  112                                      "name":  itemInfo.d .Participa ntsPicker. results[co unt].Title ,
  113                                      "role":  "N/A",
  114                                      "coi": " No"
  115                             });
  116  
  117                    }
  118           }
  119           ag endaColumn s["Attende es"] = arr ; // of ty pe Collect ion
  120           ag endaColumn s["Committ eeAttendee Count"] =  committeeA ttendeeCou nt;
  121           ag endaColumn s["Attende eCount"] =  attendeeC ount
  122           pr ocessMinut es(itemInf o);
  123   }
  124  
  125   function p rocessStud ies(itemIn fo){
  126           st udies = it emInfo.d.A pprovedApp licationLo okup.resul ts; 
  127           if  (studies. length > 0 ){
  128                    for( count = 0;  count < s tudies.len gth;count+ +){
  129  
  130                             var st udyID = st udies[coun t].ID;
  131                             var st udyResult=  getStudy( studyID);
  132                             studyR esult.done (function( result) {
  133                                      // resul t is an SP .List beca use that i s what we  passed to
  134                                      // resol ve()!
  135                                      var stud y = result
  136                                      var Assi gnedIRBAdm inistrator ;
  137                                      if (stud y.d.Assign edIRBAdmin istrator.h asOwnPrope rty('Title ')){
  138  
  139                                               AssignedIR BAdministr ator = stu dy.d.Assig nedIRBAdmi nistrator. Title;
  140                                      }
  141                                      else{
  142  
  143                                               AssignedIR BAdministr ator = "N/ A";
  144                                      }
  145                                      var Prim aryReviewe r;
  146                                      if (stud y.d.Primar yReviewers .hasOwnPro perty('res ults')){
  147  
  148                                               PrimaryRev iewer = st udy.d.Prim aryReviewe rs.results [0].Title; // Will
  149                                                                                                                                                                                   // Modify
  150                                                                                                                                                                                   // code
  151                                                                                                                                                                                   // to
  152                                                                                                                                                                                   // accomod ate
  153                                                                                                                                                                                   // more
  154                                                                                                                                                                                   // than
  155                                                                                                                                                                                   // one
  156                                                                                                                                                                                   // reviewe r
  157                                      }
  158                                      else{
  159  
  160                                               AssignedIR BAdministr ator = "N/ A";
  161                                      }
  162                                      studyArr ay.push({
  163                                               "StudyTitl e": study. d.StudyTit le,
  164                                               "StudyID":  study.d.S tudy_ID,
  165                                               "PI": stud y.d.Princi palInvesti gator.Titl e,
  166                                               "PrimaryRe viewer":Pr imaryRevie wer,
  167                                               "IRBAdmin" :AssignedI RBAdminist rator,
  168                                               "Deliberat ion":study .d.Deliber ation,
  169                                               "Decision" : study.d. Decision,
  170                                               "StudyType ":study.d. Applicatio nType
  171                                      });
  172                                      if (stud yArray.len gth == ite mInfo.d.Ap plicationS tudyLookup .results.l ength ){
  173                                               agendaColu mns["Studi es"]=study Array;  
  174  
  175                                               generateDo cx(agendaC olumns);
  176  
  177                                      }
  178                             });
  179  
  180                             studyR esult.fail (function( result) {
  181                                      // resul t is a str ing becaus e that is  what we pa ssed to
  182                                      // rejec t()!
  183                                      var erro r = result ;
  184                                      console. log(error) ;
  185  
  186                             });
  187  
  188  
  189                    }
  190           }
  191           el se{  // no  studies a ttached
  192  
  193                    gene rateDocx(a gendaColum ns);
  194           }
  195  
  196   }
  197   function p rocessMinu tes(itemIn fo){
  198           //  468161: F ix the iss ue of gene rate agend a report i n RDC Meet ings list
  199           //  Uses Cale ndar as so urce inste ad of meet ing minut
  200           mi nuteArray. push({
  201                    "min uteTitle":  itemInfo. Title,
  202                    "dis cussion":  itemInfo.D eliberatio n,
  203                    "act ion": item Info.Decis ion
  204           }) ;
  205           ag endaColumn s["Minutes "]=minuteA rray;  
  206  
  207           pr ocessStudi es(itemInf o);
  208  
  209  
  210  
  211   }
  212   function g enerateDoc x(dataSet) {
  213  
  214           va r Attendee Array = da taSet["Att endees"];
  215           va r agendaDa te = dataS et["EventD ate"];
  216           va r agendaTi me = dataS et["EventT ime"];
  217           va r agendaSt udies = da taSet["Stu dies"];
  218           va r agendaMi nutes = da taSet["Min utes"];
  219           va r committe eAttendeeC ount = dat aSet["Comm itteeAtten deeCount"] ;
  220           va r attendee Count = da taSet["Att endeeCount "];
  221  
  222           lo adFile("ht tp://vaww. itst.ram.m sp. DNS     /SiteAsset s/js/Agend a-Minutes- Template.d ocx",funct ion(err,co ntent){
  223                    doc= new Docxte mplater(co ntent)
  224                    var  clientArra y = [{"nam e":"John S mith", "ro le":"Devel oper", "co i":"Yes"}, {"name":"K ang Cho",  "role":"Pr inciple",  "coi":"No" }];
  225                    doc. setData({
  226                             "atten dee":Atten deeArray,
  227                             "Commi tteeAttend eeCount":  committeeA ttendeeCou nt,
  228                             "Atten deeCount": attendeeCo unt,
  229                             "date" :agendaDat e,
  230                             "time" :agendaTim e,
  231                             "Studi es":agenda Studies,
  232                             "Minut es":agenda Minutes
  233                    });
  234                    doc. render() / / apply th em
  235                    outp ut=doc.get Zip().gene rate({type :"blob"})  // Output  the docume nt using
  236                                                                                                                     // Dat a-URI
  237                    save As(output, "Agenda-Mi nutes-"+ag endaDate+" .docx");
  238                    $('# spinnerdiv ').data('s pinner').s top();
  239           })
  240  
  241  
  242  
  243   }
  244  
  245   function c heckSource Parameter( ){
  246           va r sourcePa ram = getQ ueryString Parameter( 'Source');
  247           if  (sourcePa ram == nul l || sourc eParam ==  '' ){
  248                    var  thisUrl =  window.loc ation.href ;
  249                    var  siteUrl =  thisUrl.su bstring(0,  thisUrl.i ndexOf("Li sts")-1);
  250                    wind ow.locatio n.href = U RL_add_par ameter(thi sUrl, 'Sou rce', site Url);
  251           }
  252   }
  253   function g etStudy(in StudyID){
  254           va r d = $.De ferred(); 
  255           va r realUrl  = currentU rl.substri ng(0, curr entUrl.ind exOf("Site Pages")-1) ;
  256           $. ajax({
  257                    url:  realUrl +  "/_api/we b/lists/ge tbytitle(' Committee  Topics')/i tems(" + i nStudyID +  ")?$selec t=StudyTit le,Applica tionType,S tudy_ID,De liberation , Principa lInvestiga tor/ID, Pr incipalInv estigator/ Title,Prim aryReviewe rs/ID, Pri maryReview ers/Title,  Reviewers /ID, Revie wers/Title , Assigned IRBAdminis trator/ID,  AssignedI RBAdminist rator/Titl e&$expand= PrincipalI nvestigato r, Primary Reviewers,  Reviewers , Assigned IRBAdminis trator",
  258                    meth od: "GET",
  259                    head ers: { "Ac cept": "ap plication/ json; odat a=verbose"  },
  260                    succ ess: funct ion (data)  {
  261  
  262                             d.reso lve(data);
  263                    },
  264                    erro r: functio n (data) {
  265                             // ale rt(data);
  266                             d.reje ct("getStu dyFailed") ;
  267                    }
  268           }) ;
  269           re turn d.pro mise();
  270   }
  271  
  272   function g etMinute(i nMinutesID ){
  273           va r d = $.De ferred(); 
  274           va r realUrl  = currentU rl.substri ng(0, curr entUrl.ind exOf("Site Pages")-1) ;
  275           $. ajax({
  276                    url:  realUrl +  "/_api/we b/lists/ge tbytitle(' CommitteeM inutes')/i tems(" + i nMinutesID  + ")?$sel ect=Title, Deliberati on, Decisi on",
  277                    meth od: "GET",
  278                    head ers: { "Ac cept": "ap plication/ json; odat a=verbose"  },
  279                    succ ess: funct ion (data)  {
  280  
  281                             d.reso lve(data);
  282                    },
  283                    erro r: functio n (data) {
  284                             // ale rt(data);
  285                             d.reje ct("getMin utesFailed ");
  286                    }
  287           }) ;
  288           re turn d.pro mise();
  289   }
  290   function g etQueryStr ingParamet er(urlPara meterKey)  {
  291  
  292           va r params =  document. URL.split( '?')[1].sp lit('&');
  293           va r strParam s = '';
  294  
  295           fo r (var i =  0; i < pa rams.lengt h; i = i +  1) {
  296                    var  singlePara m = params [i].split( '=');
  297                    if ( singlePara m[0] == ur lParameter Key)
  298                             return  decodeURI Component( singlePara m[1]);
  299  
  300           }
  301  
  302   }
  303  
  304   function U RL_add_par ameter(url , param, v alue){
  305           va r hash        = {};
  306           va r parser      = docum ent.create Element('a ');
  307  
  308           pa rser.href     = url;
  309  
  310           va r paramete rs = parse r.search.s plit(/\?|& /);
  311  
  312           fo r(var i=0;  i < param eters.leng th; i++) {
  313                    if(! parameters [i])
  314                             contin ue;
  315  
  316                    var  ary      =  parameter s[i].split ('=');
  317                    hash [ary[0]] =  ary[1];
  318           }
  319  
  320           ha sh[param]  = value;
  321  
  322           va r list = [ ];  
  323           Ob ject.keys( hash).forE ach(functi on (key) {
  324                    list .push(key  + '=' + ha sh[key]);
  325           }) ;
  326  
  327           pa rser.searc h = '?' +  list.join( '&');
  328           re turn parse r.href;
  329   }
  330  
  331   </script>