function fid=reportTest(sesDat,rsl,typeTst)
% write report

fidInd=['responses/' sesDat.id,'_',sesDat.sesScript];
if (~sesDat.reREAD && (sesDat.noTst==1))
   fid=fopen(fidInd,'w');
else   
   fid=fopen(fidInd,'a');
end
eol(fid);

% title
fprintf(fid,'%%%%%%%%%%%% Module #%d : %s \t ID: %s  \t DATE: %s ',sesDat.noTst,typeTst,sesDat.id,date);eol(fid);eol(fid);

% elapsed time
min=floor(rsl.duration/60);
sec=floor(rsl.duration-min*60);
fprintf(fid,'%%%% ELAPSED TIME : %d min %d sec ',min,sec);eol(fid);
fprintf(fid,'Song: %s\n', sesDat.cuSndListFile);