{"version":3,"sources":["scripts/app-c64361716b.js"],"names":["intersect_safe","a","b","t","length","filter","e","indexOf","isJson","str","JSON","parse","filterIt","arr","searchKey","obj","Object","keys","some","key","includes","isDate","d","prototype","toString","call","isNaN","valueOf","formatDateforEmail","dt","date","Date","hours","getHours","minutes","getMinutes","ampm","strTime","getMonth","getDate","getFullYear","daysBetween","startDate","endDate","millisecondsPerDay","treatAsUTC","result","setMinutes","getTimezoneOffset","fixrpt","width","appendFormItem","name","val","frm","i","document","createElement","setAttribute","appendChild","pad","num","size","s","clone","copy","constructor","attr","hasOwnProperty","processArray","process","len","getParameterByName","replace","regex","RegExp","results","exec","location","search","decodeURIComponent","getQueryVariable","variable","query","window","substring","vars","split","pair","replaceAll","find","isNumeric","jQuery","isArray","parseFloat","validateEmail","email","re","test","ImageLoader","chall_FixAmazonURL","this","FormatTimespan","date1","date2","diff","getTime","days","Math","floor","mins","seconds","routeConfig","$urlRouterProvider","$locationProvider","baSidebarServiceProvider","html5Mode","otherwise","$inject","angular","module","config","textAngularConfig","$provide","decorator","taToolFunctionsConfig","$delegate","imgOnSelectActionFn","imgOnSelectAction","aOnSelectActionFn","aOnSelectAction","event","$element","editorScope","displayElements","popover","css","finishEdit","updateTaBindtaTextElement","hidePopover","wrapImageCenter","element","on","preventDefault","removeClass","addClass","wrapImageLeft","wrapImageRight","eq","html","append","container","popoverContainer","empty","link","display","max-width","overflow","text-overflow","white-space","vertical-align","buttonGroup","reLinkButton","urlLink","prompt","unLinkButton","replaceWith","contents","showPopover","taRegisterTool","taSelection","taToolFunctions","taOptions","$uibModal","$window","tooltiptext","iconclass","action","$deferred","textAngular","rangy","saveSelection","open","windowClass","backdrop","templateUrl","controller","$uibModalInstance","$scope","$rootScope","$http","Upload","image","progress","ClearFiles","Files","errorFile","AskClearFiles","swal","title","text","type","showCancelButton","confirmButtonText","dangerMode","del","$apply","FilesAdded","fls","forEach","f","push","SelectImage","ImageList","img","Selected","style","SelectedImage","outline","outline-offset","upload","file","url","method","evt","parseInt","loaded","total","success","data","dir","filename","active","post","User","UserId","RS_0","insert","close","S3Path","then","$editor","wrapSelection","resolve","onElementSelect","createLink","tagBegin","tagEnd","_selection","getSelection","collapsed","insertHtml","getRangeAt","canSurroundContents","node","surroundContents","activeState","commonElement","tagName","toolbar","$stateProvider","state","sidebarMeta","icon","order","secure","Allow","$stateParams","abstract","template","$filter","$location","ngIntroService","introStepsScoreLog","intro","introStepsInProg","IntroOptionsScoreLog","steps","showStepNumbers","tooltipPosition","positionPrecedence","IntroOptionsInProg","PersistentCourseId","UserSettings","UserName","UserCourses","ExpiredTrials","grep","HasExpired","IsTrial","ActiveTrials","IsExpiredTrial","id","Id","IsActiveTrial","TrialExpires","course","Expires","PageSizes","PageSize","UserRoles","completedPageSize","completedCurrentPage","inprogPredicate","inprogReverse","inprogFilter","Today","updateLogs","pages","cur","console","log","dta","activityPageInfo","RS_2","InProgress","Completed","RS_1","Profile","RS_3","CreatedOnDate","LastActivityDate","LastAssessmentDate","getAssTab","AssignActiveStatus","ass","StartDateTime","EndDateTime","Assessment_Id","CourseId","ChapterId","TopicId","Assignments","updateActivityPage","pagesz","page","updateActivity","StartAssessment","SubTopicId","AssessmentId","custom","UserAssessmentId","ShowLoad","params","CurrentUserTZoffsett","AHparams","Complete","com","inp","Viewabilty","EffectiveDateTime","DueDateTime","Viewablity","HasViewability","Viewable","ShowLeaderBoard","PrescriptiveReport","MinutesAllocated","confirm","path","ResumeAssessment","ViewPrescription","DeleteAssessment","assessment","closeOnConfirm","dtaa","TotalPages","ip","SortableStartDateTime","SortableEndDateTime","directive","$parse","$compile","restrict","scope","Roles","CurrentPage","LoadProducts","Products","ProductTypes","LoadRates","TaxRates","UnAssignedTaxRates","LoadDiscounts","Discounts","EditTaxRate","rate","mi","items","StateEntries","Rate","State","EntryId","StateEntryId","Name","HideDDL","Value","Cancel","SaveTaxRate","validationText","HeadingText","$sce","Heading","Message","trustAsHtml","cancel","EditProduct","prd","EditSort","tag","Tag","sortableOptions","stop","ui","save","lst","idx","Result","tinymceOptions","Product","RoleAvailabilty","Inactive","NoDiscount","HideInStore","IsRecurring","pt","ProductTypeId","ProductType","NewProduct","Description","HTML","Prices","RecurringFrequency","Modifiers","Workflows","mod","Values","v","wf","WorkflowDefinitionId","Workflow","ProductModifierId","OptionDoneEdit","isEditing","NewModifierValue","m","DisplayText","IsPremiumUpgrade","UpgradeFactor","IsDeleted","NewModifier","ProductId","AvailableRoles","RoleId","Role","Subscriptions","SubscriptionId","Subscription","Courses","Course","Institutions","InstitutionId","Institution","r","ra","productId","Tags","NewPrice","Price","Effective","Amount","PricebookEntryId","Save","price","p","SaveProduct","taglist","TagArray","join","product","DeleteProduct","error","err","alert","LoadTags","EditTag","Icon","SaveTag","DeleteTag","DeleteTaxRate","EditDiscount","disc","Discount","IsProductSecific","Code","DiscountType","MinimumAmount","MaximumAmount","UseLimit","SalesForceReferenceId","SaveDiscount","user","LoaDing","IsExpired","exp","expArr","now","disMonth","expD","ProductSelected","$on","PaymentOption","ValidateOrder","PaymentExpired","fn","itemIds","Cart","Items","itm","optionIds","SelectedModifiers","discCode","po","ItemsRemoved","DiscountTotal","owned","AlreadyHas","cItem","CalculateCart","TotalPrice","IsValid","LookupCode","code","InvalidDiscount","CartRev","UsedUp","RemoveItem","splice","AddToOrder","HasProduct","ProcessingOrder","ProcessOrder","SOBid","PaymentOptionId","DiscountCode","SOB","OptionIds","Wait","ProcessResult","ResultMessage","TotalCount","OptionSelected","SelectedOption","$watch","n","o","Username","u","UserID","Options","$timeout","$state","toastr","toastrConfig","$templateCache","OrigGlobalSettings","LoadGlobalSettings","get","ManipGlobalSettings","SaveGlobalSettings","gs","data2","GlobalSettings","ResetGlobalSettings","textAreaSetup","restricted","status","isFirstOpen","IsEditingUser","IsMakingSale","EditUser","SelectedUser","AddOrder","Impersonate","href","SaveUser","PremiumFilters","Val","AuthorizationFilters","SelectedAuthFilter","SelectedPremFilter","unshift","SelectedIntitution","UserFilter","FirstName","LastName","Email","DisplayName","IntitutionId","Authorized","IsPremium","MasterFilter","InstitutionChanged","GetUsers","AuthFilterChanged","PremFilterChanged","ClearFilter","$","SortBy","UserList","fltr","txtfltr","InactiveT","ImpersonateEmail","Classifications","baConfig","layoutPaths","HashyMcHashface","hash","IntegeredHash","TabsetGlob","Active","IsCustom","SelectedTab","topdeets","source","classes","sameassignee","AssignableStudents","classFilterList","contentfilter","totalsel","sourceFiltered","Students","student","ClassName","c","cl","Class","classFilter","totalSelected","stu","filterselect","field","amSelected","updateTotalCount","filtered","sortProperty","reverse","property","toggle","toggleList","list","killList","IsOn","SelectAll","students","selected","GetCourseInCurriculum","assmnt","retval","Curricula","each","Sequence","ChapterSort","EffectiveDate","DueDate","DetailDisplay","ClassesDisplay","AssessDisplay","TopicDisplay","Display","ChapterName","Title","Classes","Assessments","SendNotification","msg","loaderizing","Editing","IdArray","extend","autoDismiss","positionClass","timeOut","extendedTimeOut","allowHtml","closeButton","tapToDismiss","progressBar","newestOnTop","maxOpened","preventDuplicates","preventOpenDuplicates","extraData","FillDueDateDown","FillEffectiveDateDown","filterqueue","AssignmentQueue","PageSizzes","PageSizze","SelectClass","cls","SetSameAssignees","SameAssignees","SetSingleDueDate","SingleDueDate","addDays","SetSingleEffDate","SingleEffDate","SetSpecifyEffective","SpecifyEffective","SetSameScore","SetDisplayPracticeReview","DisplayPracticeReview","SetAssessmentViewablity","AssessmentViewablity","SetDisplayPrescription","DisplayPrescription","SetShowLeaderBoard","SetNotifyNewAssignment","NotifyNewAssignment","SetNotifyUpdatedAssignment","NotifyUpdatedAssignment","SetReminderIncomplete","ReminderIncomplete","SetSendReminderHours","SendReminderHours","SetSendIncompletePending","SendIncompletePending","k","SetPendingEmails","SetSendPendingHours","SendPendingHours","PendingEmails","SetDueEmails","DueEmails","SetSendCompleted","SendCompleted","SetCompleteEmails","CompleteEmails","SetSendDue","SendDue","SetTimeLimit","TimeLimit","SetLimitTries","LimitTries","SetMinutesAllocated","SetNumTries","NumTries","CheckValid","from","to","AssessmentArray","crs","maketruthy","hasSelected","SameScore","PassingScore","undefined","aa","Ids","EditingAssignments","EditingAssingments","AssignmentDefinition","showProgress","savingWaitNotification","onShown","SaveAssignment","TabChanged","BuildAssignments","SelectedAssignees","DisplayChapterAssessments","DisplayTopicAssessments","UpdateDueDate","UpdateEffectiveDate","UpdatePassingScore","score","UpdateAssessmentScore","UpdateSameScore","same","deleteInstSettings","stringify","Settings","AssignmentDefaultOptions","NotifyIncompletePending","NotifyDueDate","SaveMyDefaultOptions","validateSave","ToggleChapterAssessments","disp","hiddencount","IsChapterLevel","toggleAssignments","ToggleAssessmentDetail","$$phase","ToggleTopicDetail","topic","ToggleTopicAssessments","IsTopicLevel","SelectCourseChildren","assess","Topics","institutionsettings","InstitutionSettings","defaultCurId","Assessment","isCustom","LoadingText","CourseName","AssessmentCount","newass","QuestionCount","TotalQuestions","AssessmentName","DisplayClass","Label","SelectedCourse","AssignmentProgress","AssignmentProgressPercent","changing","next","returnValue","removeEventListener","overrideurl","dismiss","addEventListener","WaitForBuild","confirmText","TotalAssignments","allValid","courseid","assid","AssigneeCount","s_uid","Ass","Student_Id","Passing_Score","AssignedByUserId","Note","Curriculum","Match","AssignedDateTime","formatShortZulu","DuplicateAssignment","DeleteDupe","index","checkForDuplicates","aq","round","setHours","AssignName","toISOString","AssignDefinitition","ad","Student_id","SendAssignmentNotifications","saveprogress","recipients","cnt","sent","assignment","Updated","New","Eff","Due","Action","getInstitution","recipient","getById","res","ToName","ToAddress","FromName","FromAddress","Subject","ucount","rooturl","domain","Body","topicstr","AssignmentName","ncount","SavingDisplay","history","back","gotoassignactivity","SaveSingleAssignment","processed","Waiting","controllerAs","GoToCME","GoToExams","CustomExams","ExamId","Deny","studytopics","number","zoomChart","lineChart","zoomToIndexes","dataProvider","layoutColors","colors","getAttribute","datavalues","CompleteDateTime","getUTCMonth","getUTCDate","getUTCFullYear","getUTCHours","getUTCMinutes","getUTCSeconds","AmCharts","makeChart","theme","color","defaultText","marginTop","marginRight","valueAxes","axisAlpha","position","gridAlpha","gridColor","border","graphs","balloonText","bullet","bulletSize","lineColor","danger","lineThickness","negativeLineColor","warning","valueField","chartCursor","categoryBalloonDateFormat","cursorAlpha","valueLineEnabled","valueLineBalloonEnabled","valueLineAlpha","fullWidth","dataDateFormat","categoryField","categoryAxis","dateFormats","period","format","parseDates","minorGridAlpha","minorGridEnabled","export","enabled","creditsPosition","pathToImages","images","amChart","addListener","CheckSectionTotalQCount","sections","q","QCount","vm","qfilter","treeFilter","SelectedCustomQs","pathname","IsIntitution","goToBuild","$broadcast","CheckAllChidlrenSelected","parent","SelectedChilrenCount","SelectedCount","nodes","child","Parentname","SetNodeSelected","nd","parentname","QuestionTree","SelectedFavorites","Favorites","CheckAllChildSelected","SelectedChilCount","SelectedChildCount","DistinctCount","FavCount","CustCount","RegCount","Array","SelectedQuestions","reg","found","fav","SourceId","cus","Exam","Simple","Sectionize","SectionizeMethod","oldtab","tabcontent","removeQuestion","sel","removeTab","numberSelected","GetAnswer","removeTabQs","courseTabs","activeTab","courseList","Chapters","chap","top","Questions","ques","ViewNode","isCollapsed","QsToRemove","QuestionId","ct","ctchp","cttop","ctass","ctq","qs","quess","tempcoursecheck","setDisabled","ChangeMe","setActiveTab","selectpicker","tab","courses","cr","trialAlert","x","SaveExam","ExamSubmitted","NewCustomExamId","ExamCreated","CalculateTotal","CalculateQCount","section","Sections","BuildQuestions","chapter","question","TopicName","CustomQSections","CourseCount","cq","ch","BuildSections","ClearQuestions","StartOver","beginCustom","CourseNames","SelectedCourses","customexamsearch","SelectQuestion","SetAssessmentSelected","SetTopicSelected","Topic","SetChapterSelected","Chapter","SetCourseSelected","ur","RoleID","PreviewQuestions","CheckSelectedQs","qu","rq","sq","CurrentCourse","SelectTemplate","selectedExam","ChapterExamTemplate","as","SectionQuestions","Questions_Id","CustomQuestions","Bookmarks","ChapterExams","CourseAssess","ca","AssessmentType","HasSelectedQs","ChaptersLoadedCount","cc","types","SortOrder","proc","qdata","TimesAnswered","TimesCorrect","TimesSeen","tassessment","tq","chtop","SearchString","StartSearch","ExecuteSearch","SelectAlls","SearchWait","CourseArray","rslt","SearchResults","Results","ClearAll","QuestionsTotal","AllTotal","PagesTotal","SubTopicsTotal","TopicsTotal","ChaptersTotal","CoursesTotal","AddQuestions","CourseChanged","ClearSearch","ShowAssessment","modalInstance","TotalAssessSelected","Answers","AnswersJSON","ShowQuestion","Question","QuestionBody","QuestionAnswers","QuestionRemediation","CorrectRemediation","Searched","datas","QuestionAnswsers","stopPropagation","qt","oldc","RemoveNonPublished","removed","StatusId","OwnerId","PrivacyModeId","uq","uNodes","TreeJSON","DelCount","otherpeoplesQs","tempNodes","TotalCustomQuestionCount","actref","inviteGUID","groupID","InvitationGUID","dgroups","g","csel","SelCourse","courseSelectChangeHandler","newCourseId","dataff","hideMeta","HideAssigneeWelcome","cancelButtonText","allowEscapeKey","isConfirm","SaveUserSettings","introSteps","isProgMan","isAssignee","IntroOptions","rosterFilter","DismissHelp","HelpDashboard_Hide","NowDate","LastLogin","LastLoginDate","WaitNews","ChallFeed","InstitutionUserList","IsProgMgr","IsAssignee","RSSParser","parseURL","parsed","LastRSS","feed","entries","intDate","pubDate","ASS","Goto","CMETypes","cmeAttributes","Available","EarnedHours","getCMEStats","totalUnclaimed","ClaimedHours","cmeSelect","WaitLoading","content","Notes","ObjectTypeTranslator","","1","2","3","5","NoteTypeFilter","BMTypeFilter","BMSearch","NoteSearch","ShowBMDetail","SetBMDetail","Mark","ObjectType","GetQuestion","ObjectId","UnsetBMDetail","AllMarks","LoadMarks","GetAll","AllNotes","LoadNotes","SaveMe","Touch","EditMe","NewHTML","MobileShowNoteMenu","CancelEditMe","ShareMe","ShareableList","ShareArray","ShareWith","ShowShare","ToggleShare","CancelShare","SaveShare","ShareArrayTmp","DeleteMe","Delete","OwnedNotes","DeleteMark","MyMarked","RenderBMType","BMTypeId","BMOut","BMGo","QId","QType","ApplyFilter","fil","BMApplyFilter","displayTitle","useDisplayTitle","tagfilter","sid","HideTrialBar","Slug","$cookies","$cookieStore","dataService","LoadyBaloney","dacproceed","PremiumRenewDate","setFullYear","setDate","getObject","PremiumIncluded","IncludesPremium","PriceIncluded","exists","Qty","IsInCart","datb","HasTrial","TrialHasExpired","AlreadyOwnStop","putObject","urlattr","TermsAccepted","ExplainPremium","searchObj","google_trackConversion","google_conversion_id","google_conversion_language","google_conversion_format","google_conversion_color","google_conversion_label","google_conversion_value","TotalAmount","google_remarketing_only","PremiumInCart","RemoveFromCart","$emit","ReportHidden","CourseList","DateRange","CourseDateRange","DateFormat","MinDate","MaxDate","StartDate","EndDate","HideNullSelector","uploadDone","FrameWidth","innerWidth","Loading","Execute","AllDates","formatSQL","formatSQLEnd","hideNulls","body","submit","GoSearch","ptflurp","SearchQueryTop","itemsPerPage","SearchLabel","CourseIdArray","qstns","concat","Pages","SubTopics","RS_4","RS_5","RS_6","RS_7","when","ft","cart","IsInstructor","fromTrial","fromCart","hasGroupInterest","HasAcademicInterest","HasCorporateInterest","hasRetailInterest","TrialCourses","TrialName","amChartConfig","baConfigProvider","themes","blur","themeName","AmChart","backgroundColor","AmCoordinateChart","primary","info","primaryDark","warningLight","successDark","successLight","primaryLight","warningDark","AmStockChart","AmSlicedChart","labelTickColor","labelTickAlpha","AmRectangularChart","zoomOutButtonColor","zoomOutButtonRollOverAlpha","zoomOutButtonImage","AxisBase","axisColor","ChartScrollbar","backgroundAlpha","graphFillAlpha","graphLineAlpha","selectedBackgroundColor","selectedBackgroundAlpha","ChartCursor","cursorColor","AmLegend","AmGraph","lineAlpha","GaugeArrow","alpha","nailAlpha","innerRadius","nailRadius","startWidth","borderAlpha","nailBorderAlpha","GaugeAxis","tickColor","tickAlpha","tickLength","minorTickLength","axisThickness","bandAlpha","TrendLine","AreasSettings","colorSolid","unlistedAreasAlpha","unlistedAreasColor","outlineColor","outlineAlpha","outlineThickness","rollOverColor","rollOverOutlineColor","selectedOutlineColor","selectedColor","unlistedAreasOutlineColor","unlistedAreasOutlineAlpha","LinesSettings","ImagesSettings","labelColor","labelRollOverColor","ZoomControl","buttonFillAlpha","buttonIconColor","buttonRollOverColor","buttonFillColor","buttonBorderColor","buttonBorderAlpha","buttonCornerRadius","gridBackgroundColor","buttonIconAlpha","buttonSize","SmallMap","mapColor","rectangleColor","borderThickness","PeriodSelector","PeriodButton","background","opacity","MozBorderRadius","borderRadius","margin","boxSizing","PeriodButtonSelected","PeriodInputField","DataSetSelector","rollOverBackgroundColor","DataSetCompareList","lineHeight","webkitBoxSizing","DataSetSelect","assignChartConfig","chartJsConfig","ChartJsProvider","setOptions","colours","responsive","scaleFontColor","scaleLineColor","pointLabelFontColor","datasetFill","Morris","Donut","defaults","Grid","gridDefaults","gridLineColor","borderDark","gridTextColor","jstree","core","provider","uiTreeFilterSettings","addresses","regexFlags","descendantCollection","$get","visit","collection","pattern","address","foundSoFar","collectionItem","testForField","resolveAddress","object","parts","slice","item","value","match","reduce","fieldName","yyyy","mm","dd","formatSQLDateTime","hh","nn","ss","getSeconds","AvailableProducts","extended_valid_elements","valid_elements","height","handle_event_callback","file_browser_callback","field_name","win","querystringtype","tinymce","activeEditor","windowManager","resizable","inline","close_previous","getElementById","input","plugins","toolbar1","toolbar2","image_advtab","move","old_index","new_index","formatShortLocal","newDateObj","dat","guid","s4","random","doAsyncLoop","array","callback","endCallback","currentIndex","step","asyncLoop","callbackPos","arguments","Globals","FreeCmeCourses","FullProductName","FullProductId","FullProductUrl","CartTemplate","RequiredSubscriptions","cid","pids","InstitutionalAdminRoles","InstitutionalFacultyRoles","InstitutionalLearnerRoles","Countries","States","StatesWithNames","AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MH","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","PW","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY","Specialties","Degrees","DisplayTags","IconPath","TestingYears","picklists","Primary__country__c","StateProvince","Primary_State__c","Primary_Degree__c","AdditionalDegrees","Medical_Degree__c","Specialty_1__c","AdditionalSpecialties","Specialty_2__c","SpecYears","Spec1_Exam_Year__c","AdditionalSpecYears","Spec2_Exam_Year__c","ClinicianTypes","Clinician_Type__c","AcceptableContactMethods","Acceptable_Contact_Method__c","DemoAcademicNeeds","Demo_Academic_Needs__c","DemoCorporateNeeds","Demo_Corporate_Needs__c","DemoPersonalNeeds","Demo_Personal_Needs__c","Salutations","Salutation","String","padLeft","l","app","numnum","mobile","spanum","propertyName","propertyValue","LATIN_MAP","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ő","Ø","Ù","Ú","Û","Ü","Ű","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ő","ø","ù","ú","û","ü","ű","ý","þ","ÿ","LATIN_SYMBOLS_MAP","©","GREEK_MAP","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","σ","τ","υ","φ","χ","ψ","ω","ά","έ","ί","ό","ύ","ή","ώ","ς","ϊ","ΰ","ϋ","ΐ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","Ά","Έ","Ί","Ό","Ύ","Ή","Ώ","Ϊ","Ϋ","TURKISH_MAP","ş","Ş","ı","İ","ğ","Ğ","RUSSIAN_MAP","а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь","э","ю","я","А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь","Э","Ю","Я","UKRAINIAN_MAP","Є","І","Ї","Ґ","є","і","ї","ґ","CZECH_MAP","č","ď","ě","ň","ř","š","ť","ů","ž","Č","Ď","Ě","Ň","Ř","Š","Ť","Ů","Ž","POLISH_MAP","ą","ć","ę","ł","ń","ś","ź","ż","Ą","Ć","Ę","Ł","Ń","Ś","Ź","Ż","LATVIAN_MAP","ā","ē","ģ","ī","ķ","ļ","ņ","ū","Ā","Ē","Ģ","Ī","Ķ","Ļ","Ņ","Ū","ARABIC_MAP","أ","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","ALL_DOWNCODE_MAPS","Downcoder","Initialize","map","chars","lookup","downcode","downcoded","pieces","mapped","removelist","toLowerCase","sort","factory","AllMarksData","ObjectTypes","ObjectTypesFull","ot","MarkTypes","MarkTypesFull","mt","IconClass","_ERROR","BookmarkObject","DeleteData","_RESPONSE","AllNotesData","LentNotes","ShareLevels","ShareLevelsFull","sl","GetForObject","ObjectNotesData","NoteObject","TouchData","Path","portal-sale","googleTrackConversion","conversion_label","dollar_amount","google_conversion_currency","sendPortalSaleConversion","amt","username","GetChapters","NoAccess","CourseChapters","DisplayChildren","ChapterTopics","topicsprocessed","Background","INDEX","IsAssessment","Chapter_Id","Topics_Id","__metadata","setTimeout","GetSubTopics","TopicSubTopics","Topic_Id","SubTopic","SubTopicPages","stparams","SubTopic_Id","Pages_Id","Page","userdata","usr","App","SaveContentObject","desc","put","compile","isFunction","compiledContents","remove","pre","apply","substr","tempdate","setSeconds","out","IsInactive","InactiveClasses","cn","filterOn","isUndefined","newItems","extractValueToCompare","isObject","isString","isDuplicate","equals","uiTreeFilterSettingsProvider","attrs","bind","which","$eval","ngEnter","striphref","getElementsByName","Stripped","el","target","$attrs","newHTML","htmlName","ngBindHtmlUnsafe","NewReply","children","CreateReply","CancelReply","newReplyObj","Content","GroupArray","GroupIdsArray","ParentId","SaveReply","Status","ShowReplies","LoadReplies","Replies","x2js","X2JS","CreatedDateTime","GroupsJSON","xml_str2json","GroupPostArr","Groups","Group","MultiPost","GroupId","CreateGroup","EditGroup","NewPost","$$path","startsWith","Invitation","rd","InviteGroupDetail","Loaded","IsNewPost","LoadPosts","groupId","CurGroup","GroupDetail","Posts","GroupRoles","PendingJoinRequests","MyGroups","AvailableGroups","IsAdmin","RespondToInvite","req","reload","Invite","dtl","Invitations","InviteMore","RemoveInvite","SendInvitationtions","comment","InvitationMessage","Comment","rsp","CancelInvitationtions","ApproveUser","RejectUser","showLoaderOnConfirm","animation","inputPlaceholder","inputValue","RejectReason","toState","toParams","fromState","fromParams","JoinGroup","grp","ApprovalRequired","NewGroup","IsPublic","RequireReview","IconImage","MembershipScheme","CancelGroup","SaveGroup","ClickGroupChk","checkZero","CurPost","CancelPost","EditingPost","SavePost","EditPost","scrollTo","DeletePost","confirmButtonColor","qnTpl","showTitle","currentValue","maxValue","current","max","table","percent","objectType","objectId","btnClass","widgetClass","noteFormStyle","ShowNotes","objectTypeTranslated","ownedNotes","lentNotes","Bookmarked","NeedInfoed","Issued","bms","IconId","NeedInfos","Issues","DoBookmark","BMType","ToggleNotes","ShowNewNote","NewNoteHTML","newNote","cancelNewNote","CreateNote","no","createResult","ShareLevel","model","handleSave","handleCancel","elm","previousValue","edit","editMode","focus","slug","ShowPage","CheckOut","UndoCheckout","SignIn","AddProductsToCart","ids","couponcode","AddToCart","UpdateProductPrice","OriginalPrice","selOpt","BeforeAddToCart","UserIsPremium","currentRenewDate","PremiumInfo","ExpiryDate","newRenewDate","formattedNewRenewDate","Current Renew Date","New Renew Date","CallForPricing","load","BuyNow","Premium","PendingProductId","HidePromoBar","http","ownfilter","resultlength","showfeatured","AddingToCart","newVal","oldVal","searchFilter","prod","FilterTags","DescriptionHTML","np","SortPriority","OpenProduct","GoToSignIn","ProductToAdd","SearchFilter","TagId","OwnFilter","ShowCart","loadit","CheckCart","ReturnUrl","chkout","HideSelectTag","buttononly","ExpMap","PchMap","ActMap","TrialMap","TrialHits","prds","TrialProducts","ExpiredTrialProducts","ActiveTrialProducts","UserPurchases","FindTrial","Number","isInteger","ProductsContainingCourse","ContainingMap","ThisTrial","$anchorScroll","noExamsCourses","HelpExams_Hide","SA","newval","LastPublished","CourseLastPublished","CourseFromCourses","cmefree","FullProductInfo","fc","BoardExams","ex","IsOpen","yOffset","uploadComplete","usrExist","Inst","Users","iu","SavePrompt","CalculteAllocation","UnAllocatedCount","StudentCount","InactiveCount","FacultyCount","AdminCount","al","StudentClasses","sc","ia","FacultyTerm","AdminTerm","isValid","FacultySlots","StudentSlots","LearnerTerm","LoadAssets","Assigned","LoadUsers","LoadSettings","InactiveUsers","drag","ClassExists","Members","pass","Password","FacultyRoles","LearnerRoles","AdminRoles","sr","SettingsJSON","SaveUsers","FullScreenLoading","LoadInstitution","inst","InstId","MinECI","WhichCourse","itemsPerPageOptions","orderBy","PerformanceIndex","RealIndex","BoardSimAvg","NonBoardSimAvg","BoardSimsTaken","NonBoardSimsTaken","BoardSimDaysSince","NonBoardSimDaysSince","Likelihood","userprogress","ViewPremiumContent","HelpCustomExams_Hide","LoadCustomExams","CreatedOn","NewExamId","Archive","ce","ShowEditNameClick","ShowEditName","EditNameSave","pvt","IsPrivate","tid","changeCMEType","selectedCMEType","TotalCME","CMETotals","SetCMEforCourse","cour","SetCMEforChapter","topicsURL","CMEList","flags","output","indx","totalearned","totalavailable","Earned","totalearnedchap","totalavailablechap","chaptop","CourseHTML","ChapterShowableByName","ChapName","chapterid","label","editAssessment","editCME","assessid","editAss","editCMEs","loadPractice","LoadPractice","WinOpen","p1","p2","Children","IsQP","ShowText","ShowMedia","GoToSubTopic","subtopic","topicid","GotoQP","QuestionPool","subtopicid","sub","subtopichtml","subtopiccontent","$document","getTimeRemaining","endtime","ql","questionloading","popResource","goToTop","animate","scrollTop","offset","DoKeyPress","SavingAnswer","MovePrevious","MoveNext","IsCheater","IsQuickQuiz","mobpag","ShowMobilePagination","pagiTogVisible","use","FlagQuestion","Flagged","SelectedQColor","ImagePath","currentTarget","attributes","pause","ExitAssessment","UserAssessment","SaveAnswer","uaquestionId","IsCorrect","SelectedAnswerArray","userassessmentid","loadUserAssessment","RadioClick","AnswerId","SelectedAnswerIdArray","HasAnswered","unanswered","TotalUnansweredQuestions","qqmove","CheckBoxClick","selectedAnswers","flagged","SelectQuestionIdx","ua","closeThingy","SelectedQuestion","elem","currpgq","scrollpos","prop","toggleMobilePagination","showhide","Allocation","AutoScoreDateTime","RemainingSeconds","FlaggedQuestions","timer","setInterval","TimeRemaining","clearInterval","Scoring","ScoreLocked","fq","ans","parseJSON","MultiAnswer","answArr","SelectedAnswerId","AssessmentLoaded","blert","flaggedSwal","doRealScore","qq","QQScoreResult","newpoints","Points","QQHighScore","qqhigh","errrr","assessmentid","assessmenttype","canbecrash","Predicate","Reverse","chSort","switchIt","gotocustomreview","IsCrash","AssignmentsExist","questats","answered","AnsweredCount","UnAnsweredCount","SortDateTime","Score","Scored","AllHistory","QuestionStats","AssStats","selectedtab","PopLinkies","not","host","SelectedTabIndex","src","View","qp","Whattoshow","LoadTab","UpdateUrl","GoToTop","NextSection","SectionIndex","Section","PreviousSection","changeSection","sec","loadqp","loading","editQ","IncorrectRemediation","LastReview","SourceTypeId","sqa","$evalAsync","questionid","displaymode","CheckAnswer","querstion","Tries","RemainingTries","Disabled","Correct","Remediation","loadQuestion","iscustom","iscustomq","Column1","resp","QunderR","UnderReview","ReportQuestion","UserComments","UpdateUserComments","ok","pathIds","require","ngModelCtrl","fromUser","transformedInput","$setViewValue","$render","$parsers","forcheckout","PmtLoading","SetDefaultPayment","payId","DeletePaymentOption","LoadPaymentOptions","uid","isDefault","DefaultPaymentId","DefaultPaymentExp","ssl_exp_date","PaymentOptions","SetTransactionPayment","PaymentId","AddNewPayment","NewPayment","CardNumber","Address1","Street","Address2","Unit","City","Region","Postal","PostalCode","MakeDefault","CancelNewPayment","SubmitNewPayment","wait","Sortulator","year","ResetAdaptive","utcStr","toUTCString","utcDate","formatteddate","showConfirmButton","getType","GetAdaptiveDate","ResetDate","PwWaitLoading","UserIsCheater","UserIsAuthor","LoadRoles","ShowPremiumExtend","PremiumEffective","PremiumExpires","PremiumExtension","ChangePremium","showInputError","ExtensionChange","MakeCheater","MakeAuthor","UnMakeAuthor","UnMakeCheater","LoadSubscriptions","UserSubscriptions","AvailableSubscriptions","AddSubscriptionChange","scrp","SubscriptionsToAdd","AddSubscriptionToUser","RemoveSubscription","EditCell","EditCity","EditCountry","EditFax","EditPostalCode","EditRegion","EditStreet","EditTelephone","EditUnit","EditProfile","EditUsername","LoadProfile","Revert","CheckUsername","uname","UsernameStatus","UsernameStatusStyle","SaveUsername","SaveFirstName","SaveLastName","SaveDisplayName","SaveEmail","LoadPassword","UserInfo","CurrentUser","NewPassObj","UpdateInstitution","Theme","SavePassword","NewPassword","ConfirmPassword","passwordForm","$setPristine","$setUntouched","EditFirstName","EditLastName","EditEmail","Specialty","data0","OriginalNickname","Nickname","SelectedInstitution","ins","SplendidId","AcceptableContactMethodArr","AcceptableContactMethod","HasRetailInterest","rs","SaveProfile","AddressType","CompanyName","Country","datablap","select","Regions","GetRegions","OnlyTelChars","instid","StakeHolderCount","AddStudentClasses","AddInactiveClasses","ExpiredFilter","Expired","filterExpired","filterTheExpired","fe","showCourse2","selCourse2","IsDate","showCourse","selCourse","ExpireCourse","ExpirationDate","countAssigned","ParentInstitutions","hsd","Companies","properties","acd","Accounts","OnBoardDate","today","instMilestones","HasEM","HasFM","HasIM","HasPEDS","HasEPA","msl","AddInId","checkmilestone","toggleMilestone","check","MilestoneValue","AdminTermChanged","IsDirty","FacultyTermChanged","UpdateClassName","SaveSettings","SettingsHaveChanged","DeleteClass","DeleteInactiveClass","NewTerm","Terms","IsEditing","SaveTerm","term","enddt","LoadTerms","totalFiltered","endsWith","classfilter","ShowInactive","retrievingusers","AddSelected","selArr","NeedToAdd","newArr","RemoveSelected","LogoChanged","NewLogo","LogoPath","RelativeURL","AddUsers","Reason","commit","usrs","SaveInstitution","isValidMessage","HubspotId","Domain","Classification_Id","SFID","SaveAss","AssArray","NewAssigned","UserSaveProgress","UsersSaving","UserChanged","institution","editableOptions","editableThemes","origInstitution","isStaff","bgStyle","background-color","rowClass","editableTableData","submitTpl","cancelTpl","w","loadClasses","$parent","addUser","inserteduser","users","options","accept","item_id","FacultySlotsAvailable","list1","testValid","onDrop","listAdm","list0","list2","list3","list4","list5","list6","list7","list8","list9","ilist0","ilist1","ilist2","set_item_id","StudentsSlotsAvailable","Allocate","list10","allocated","doodle","snippet","SnippetOutput","snippets","snip","SetURL","GetAssForExport","DueDateTimeString","EffectiveDateTimeString","TimesTaken","row","EffectiveDateTimeDisplay","DueDateTimeDisplay","Best","Highest","CompletedDate","HighScore","LowScore","Lowest","AverageScore","Average","IsExporting","ProcessExport","pagedItems","pg","form","removeChild","ShowByStatus","assignmentLabels","assignmentOptions","segmentShowStroke","maintainAspectRatio","tooltips","assignmentDataNotActiveColors","assignmentDataNotActiveOptions","fill","assignments","archived","loadassignment","EditAssignment","assignmentModal","ScoresSumForAvg","NumberOfScores","ListOfScores","AddAssignees","visible","pageY","left","pageX","CurrentAssignment","Reassign","TodayPlusWeek","NotifyComplete","DueDateNotify","PendingHours","ReminderHours","NumberOfTries","OldAssignDefinition","AdvancedEdit","Assignment","tot","totcnt","TotalAttempts","FailFails","AssStatus","NoAttempt","Passed","AssClass","EffectiveOpen","DueDateOpen","Unassign","isDirty","AssAverage","toFixed","AssignmenttoDelete","asdel","URL","AssignmentId","Pocess","clear","UpdateDue","due","UpdateEffective","eff","AvgHighest","HighestBest","LowestBest","newAssigneesArray","newAssignees","InstitutionUsersList","assign","UnassignClicked","UnassignButton","UnassignUsers","st","ActiveAssignees","EditLeaderboard","lb","EditViewability","view","Viewability","EditPracticeReview","pr","PracticeReview","EditAttempts","EditAtmps","EditTimeLimit","EditTime","SetSendPendingRecipients","PendingRecipients","SetDueDateNotify","SetDueDateRecipients","DueDateRecipients","SetNotifyComplete","SetCompleteRecipients","CompleteRecipients","SetPassingScore","SetReminderHours","selectedAssignees","AllSelected","selectAllAssignees","na","selectAssignees","NewStart","NewEnd","NewAssignment","emailDue","PracticeReviewmsg","PrescriptiveReportmsg","MinutesAllocatedmsg","NumberOfTriesmsg","ShowLeaderBoardmsg","Sent","MakeAssignment","howManyAssignees","parambalams","SaveProgress","SaveChanges","assignmentDataNotActiveData","filterNames","assignmentDataNotActiveLabel","WaitI","cal","InstitutionCalendar","TodayDate","TodayDateObj","unixTodayDate","truncate","unixEffectiveDateTime","unixDueDateTime","assignmentStatus","assignData","assignFailedData","OnTime","CompletedOnTime","assignDatac","Delinquent","assignLabs","deletewithNotification","CollapseAllAssign","ShowDeets","TotalCompleted","TotalComp","comp","TotalPending","TotalPend","pend","AssignmentCount","qqq","sortingOrder","filteredItems","groupedItems","currentPage","updateStatus","updateSearch","updatePageSize","searchMatch","haystack","needle","StatusedItems","groupToPages","numPages","range","start","end","ret","prevPage","nextPage","setPage","sort_by","newSortingOrder","ibcChartOpts","segmentStrokeColor","segmentStrokeWidth","percentageInnerCutout","animationSteps","animationEasing","animateRotate","animateScale","yAxes","ticks","beginAtZero","stacked","institionid","ShowGantt","LoadCalendar","CreateAssignment","TodayMinusFiveStart","TodayMinusFiveEnd","BackMonth","timestart","timeend","ForwardMonth","GanttData","GanttDataUsers","registerApi","api","filterinactive","filterusers","parameters","DataLoaded","CalendarLoaded","CalData","fullCalendar","calendarevents","tasks","EffectiveToolTip","DueToolTip","clr","CompletedOnTimePct","AssignTooltip","Assignees","AssigneeNames","FirstandLast","filterme","filterRow","stuff","filterdaterange","valid","side","setWidth","tree","collapseAll","filteredcalendar","filterthecalendar","filteredevents","refreshcalendar","header","center","right","defaultDate","selectable","selectHelper","editable","eventAfterAllRender","eventLimit","eventTextColor","events","eventClick","eventMouseover","ShowGanttToggle","eventData","newsubscription","newsubModal","newsub","subname","subdesc","CreateNewSub","editsubscription","editsubModal","editsub","UpdateSub","editSubscription","dialog","modal","buttons","click","ajax","loadSubscriptions","contentType","dataType","editcourses","editCoursesModal","selectedcourses","currentsubscription","InSubscription","subAssigned","available","ava","insub","InSubLength","selectcourses","RemoveMe","subscriptdel","AddMe","jqXHR","textStatus","subscriptadd","AddToSelected","UpdateCourses","AddCourses","RemoveCourses","subscriptions","institionId","courseId","chapterId","topicId","subTopicId","assessmentId","dueDateTime","effectiveDateTime","assessmentLabel","hideinactive","showList","pageSizeChange","pageSizzeChange","WaitA","searchChange","AssStatusFilter","DoAssOut","AssOut","UpdateAssStat","AssessmentAverage","ao","predicate","ShowHotSpots","ShowReviewMode","WaitSpots","HotSpotSort","SortReverse","UpdateSort","UpdateReverse","FullQuestions","HotSpots","hot","skipped","CNT","Skipped","sF","sFAdjusted","variance","IsIncorrect","PercentIncorrect","PercentCorrect","blerp","exc","ShowReportLongText","getKPI","ExportProgress","DateStart","DateEnd","UserDisplay","FirstPassingDate","AvgScore","LastAttempt","PoolCount","WaitUser","userfilter","itemsPer","itemsPerPageU","DateRangeStart","DateRangeEnd","SetStartDate","HasDateRange","CollapseAll","SetEndDate","SetAllDates","filteredItemsU","outputArr","loadusers","InstitutionUsers","qqqq","sortingOrderU","reverseU","groupedItemsU","pagedItemsU","currentPageU","updateSearchU","updatePageSizeU","searchMatchU","searchU","groupToPagesU","numPagesU","rangeU","prevPageU","nextPageU","setPageU","sort_byU","newSortingOrderU","userId","beginDate","userName","userEmail","unixSignStart","unixSignEnd","AttemptList","PassingScoreParsed","ScoreParsed","ScoreStatus","UnixSessStart","UnixSessEnd","Time","uaid","showback","Uaid","User_UserID","toggleShowQs","ShowQs","NavigateTo","tzOffset","showDeets","WaitInst","itemsPerPageA","UserDetails","AssessmentNameTrunc","getData","numberOfPagez","ceil","pageSizze","totalPagez","currentPagge","updatePage","aaaa","sortingOrderA","reverseA","filteredItemsA","groupedItemsA","pagedItemsA","currentPageA","updateSearchA","updatePageSizeA","searchMatchA","groupToPagesA","numPagesA","searchA","sort_byA","newSortingOrderA","rangeA","prevPageA","nextPageA","setPageA","TogAssHistory","loadUserAssessments","UserAssessments","Purchases","LoadPurchases","newValue","oldValue","testDataIbc","ChartSampleData","highlight","ExpandAll","ShowChildren","ViewStudent","Student","ViewAssessment","ViewAss","UA","ToggleChildren","ShowPaginate","PassDate","studentfilter","role","UserAssignee","UserStudent","assignAll","assignComplete","assignActive","assignFailed","assignScheduled","TakeActiveAssign","assignLabels","assignOptions","newGoalValue","CountDown","endDatez","changeDate","thedate","addCountDown","DataValues","PercentFloor","Percent","QuickQuiz","RightNow","highScore","highScoreFound","partialSeconds","TimeToTake","sum","NotAvailable","Rank","RankAverage","updateCMEGoal","CMEGoals","CMEGoalType","CMEGoalEarned","CMEGoalWidth","CMEGoalValue","removeCountdowns","CountDownView","removeCMEGoals","removeCountDown","closeonCancel","addCountDowntoList","goalsname","saved","saveCountdown","goalName","unixendDate","counter","CountView","ToggleCalender","$event","DateOpen","ToggleSettingsCount","showSettingsCount","duration","timeSpan","countdown","updateCountdown","removeGoal","ToggleSettingsGoal","showSettingsGoal","addGoaltoList","newGoalType","showCourses","HelpAssets_Hide","AssetWait","ShowCourses","assetfilter","textFilter","DrillDownCourse","ToggleTopics","ToggleAssessments","SimValues","sv","ExactPercentage","PercentComplete","TotalAssessments","OriginalOrder","FullCourseInfo","NavtoCourse","ModalExamClicky","Pending","Approve","claimId","Reject","ClaimId","ViewEditForm","CMETypeId","FormId","FormData","Q","Answer","Type","A","SubmitSurvey","SaveRetired","SaveExpire","ChangeDate","loadCurricula","CanClaim","CMEType","SelectedTotal","MayClaimCME","Degree","IsMobile","OwnedSubs","SelectAllUnclaimedClicked","unclaimed","Unclaimed","EarnedSelected","SelectAllUnclaimed","yearsearch","cmeYears","ItemClicked","allSelected","CertOnlyError","CMEChange","typ","tomorrow","Claimed","ClaimDate","TotalEarnedHours","TotalEarned","EarnedHoursFloat","CompleteDate","cheqReq","j","pidsy","subsy","sect","NeedFullProduct","LoadCME","ClaimSelected","SelectedEarned","SelectedCME","cmecert","Batch","List","Commit","filterFilter","formid","AddClaimItem","ShowClaimed","WaitCME","AvailableCME","ccc","xxx","vals","updateCourse","courseIdMatch","resultsID","searchID","SelectType","AssignList","newEffectiveDateTime","newDueDateTime","ShowGoToButton","bbbb","updateSearchStatus","searchStatus","qid","hidestart","profiletab","programtab","Load","scroll","selectTab1","clickTab","aidx","Next","showLeaderBoard","qquiz","showLB","WaitQQ","Performance","HasTaken","QQFeedback","$modal","$modalInstance","feedback","Telephone","ShowLogin","ShowRegister","QuizList","QuickQuizCME","assessname","GoBackMagic","PostScore","RXReportQuestion","CurrentUserInfo","orderQuestionId","isuser","checkQOrder","Header","BacktoQuestionPool","PrescriptionViewability","showSection","PracticeArray","PracticeArr","NameSingle","SectionShow","ListButton","ShowAlls","ShowEveryQuestion","Pct","BgColor","ShowSecQuestions","ShowSecMissedQuestions","ShowRemediation","QuestionClass","SelectedAnswers","ai","UserSelected","UserSelectedClass","ShowMissedSectionQs","ShowAllSectionQs","ShowAll","qidx","AnswerText","selectedItem","ShowAllSections","SelectedAnswerIds","ShowMissedQuestions","EmptyCart","cartObject","GoCheckOut","addAssessment","toggleAdd","NewAssessment","AssessmentTypeId","Extended","AssessmentTypes","at","CMEValues","addObject","AddObject","newObject","Chapters_Id","srt","Course_Id","Debug","buttontext","buttonclass","buttontexticon","contentreview","authorfilter","Authors","SetOverride","task","settask","specialtyFilterList","contentFilterList","ContentTrackerFiltered","ContentTracker","Category","CoursesContained","Author","PeerReviewer","Proofer","Received","PeerReviewed","Proofed","Tagged","Published","Guideline","MessageSent","filterlist","specialtyfilter","CMETypeValues","cme","TypeAssess","AssessLevel","Show","sectionid","newQ","SectionQs","RemoveSelectedQs","ToggleReview","editSect","editSec","editSectQCount","editSecQCount","AddQuestion","editq","SelectMe","me","OneRemediation","qProps","Keywords","CaseBased","LastReviewBy","PhysicianTask","PhysicianTasks","DifficultyLevel","DifficultyLevels","SpecialPopulation","SpecialPopulations","QuestionTagCategories","CurrentQuestionTagCategory","searchFor","searchAudio","searchVideo","searchImage","searchFile","BackToMain","smallList","perPage","init","CriteriaVisible","AddVisible","ResultsVisible","Criteria","Caption","Source","OriginalFileName","Resolution","SortFields","OrderBy","SortDirections","OrderByDirection","Categories","cat","TagGroups","tg","tgidx","tagGroup","tagidx","MediaTagGroupId","SelectedCategory","SelectedTagGroup","maxSize","files","ShowAddNew","SearchCriteriaVisible","HideAddNew","SetCriteria","ShowList","TagIds","CatIds","MediaList","TotalItems","SelectedCats","SelectedTags","TagGroup","SetDirty","media","RowClass","setFiles","ShowUploadButton","reader","FileReader","onload","theFile","preview","escape","description","keywords","caption","runtime","resolution","grpidx","catidx","category","readAsDataURL","progressVisible","StartUpload","fd","SaveMediaObject","Size","Height","Width","Runtime","pageNo","thumb","Mime","imageid","showtitle","showcaption","showattr","startup","flattentree","Idexists","CommitQuestion","CurrentQuestion","aIds","SaveTree","changed","QuestionTemp","CleanTree","newlist","DeleteFolder","$modelValue","TreeSaved","UndoTree","EditNode","EditName","changeName","Rollback","RemediationType","checkForUnsaved","searchstatus","TreeOptions","dropped","NewFolder","folder","folderCount","IsQuestionInNodes","CurrentQuestionList","CorrectIndex","DifficultyLevel_Id","PhysicianTask_Id","SpecialPopulation_Id","notreecolapse","IsFirstRun","PrivateQuestions","OrgOnlyQuestions","AuthorsOnlyQuestions","PublicQuestions","qcountTooltip","tmpTree","currentFilter","childlessFilter","publishedToggle","kw","SetRtype","EditQuestion","newq","NewQuestion","PlaceHolderText","SetAnswerCorrect","isChanged","SaveQuestion","hasCorrect","oldStatus","dq","alertText","exam","CancelEdit","RemoveAnswer","aid","qa","AddAnswer","SetQtype","handleUnloadEvent","exception","cause","$injector","refresh","specialty","institutionid","milestoneaccess","fadeIn","fadeOut","milestoneDisplay","overviewDisplay","selectedms","changems","ms","Show1","mslFilter","mslFilterList","msls","noAdd","mf","filterqueuez","filterClass","clas","classesFilter","toggleDisplay","toggleOverview","changeuser","milestone","updateAverage","gotoUser","gotoMilestone","M","milestoneslevel","msltext","selecteduser","updateMilestone","level","msi","mile","saveData","msConditonal","userms","condition","msLevelCheck","idx2","updateMilestoneByLevel","getMilestone","newspec","selectedMilestone","milestonetotal","mstext","milestonelevels","Data","msu","cutme","milestoneavg","newuser","muser","milestonedata","milestonesavailable","tmsl","jsontext","deleteData","searchmsl","printMilestone","IsHappening","showGlobalLeaderBoard","showGlobalLB","useGlobalLB","useLB","updateGlobalActivity","da","PropertyValue","NickNameSet","goto","$index","transclude","initVenobox","defaultOptions","titleattr","customOptions","venobox","$observe","keyCode","onEnter","onEsc","colorHelper","changeTheme","changeColors","default","dashboard","white","configProvider","conf","basic","colorScheme","tint","infoLight","dangerLight","shade","infoDark","dangerDark","blueStone","dashboardColors","surfieGreen","silverTree","gossip","merge","mix","color1","color2","weight","d2h","h2d","h","color1Part","color2Part","resultPart","IMAGES_ROOT","constant","resWidthCollapseSidebar","resWidthHideSidebar","root","profile","amMap","themeRun","preloader","$q","baSidebarService","themeLayoutSettings","screenSize","whatToWait","loadAmCharts","loadImg","all","$pageFinishedLoading","$baSidebarService","pageTitle","carto","dataLayer","route","RequiredProductsNotPurchased","isEditor","isAuthor","OptOut","WillRenew","NoRenewReason","Exp","expMonth","expYear","expDay","premDay","todayDay","dc","CoursesHolder","CoursesForSelect","SelectTitle","isImpersonating","io","dset","IsPermanentPremium","CurrentYear","desktop","navigator","cookieEnabled","run","isMobile","userAgent","mobileClass","blurClass","service","ProfileModalCtrl","CMEProfilePageCtrl","ProfilePageCtrl","fileReader","UserEmailOptOutSettings","ChangeTheme","AppTheme","UpdateOptOut","regSvc","regData","loc","ContactByEmail","ContactByPhone","ContactByText","ContactByMail","SubmitStep1","Campaign","campaign","Route","Channel","$uibTooltip","newRegSubStep","SaveWaiting","SubmitStep2","Password2","ckunData","CreateUserObj","ClinicianType","FullTrial","completedStep3","showSettingsShortCuts","showSettingsCMESummary","showSettingsAssignSummary","showSettingsAssetsSummary","showSettingsActivtySummary","showSettingsQuickQuiz","showSettingsUpdates","PersonalObjectives","ValidNick","SubmitStep3","RetailPersonalObjectives","PersonalObjective","AcademicPersonalObjectives","CorporatePersonalObjectives","SubmitReg","NicknameTaken","qquser","GamingAlias","TryNickname","TablesPageCtrl","smartTablePageSize","smartTableData","firstName","lastName","age","peopleTableData","metricsTableData","browser","visits","isVisitsUp","purchases","isPurchasesUp","isPercentUp","group","statuses","groups","showGroup","showStatus","removeUser","inserted","toastrLibConfig","closeHtml","containerId","animatedChange","changeValue","oldvalue","autoExpand","scrollHeight","autoFocus","includeWithScope","ele","ionSlider","min","prefix","maxPostfix","prettify","prettifySeparator","grid","gridMargin","postfix","hideMinMax","hideFromTo","disable","onChange","onFinish","values","timeout","ionRangeSlider","prettify_enabled","prettify_separator","update","ngFileSelect","srcElement","getFile","scrollPosition","maxHeight","prevScrollTop","trackWidth","minWidth","prevTrackWidth","resize","zoomIn","delay","baUtil","isDescendant","parentNode","hexToRGB","hex","onLoad","deferred","onError","reject","onProgress","getReader","onerror","onprogress","defer","promise","readAsDataUrl","Image","ready","stopableInterval","interval","calback","time","startInterval","AssignChartCtrl","columnSpacing","columnWidth","rotate","startDuration","startEffect","gridPosition","titleColor","trendLines","fillAlphas","fillColors","guides","above","boldLabel","dashLength","inside","labelRotation","maximum","minimum","allLabels","balloon","titles","Learner","chartJs1DCtrl","shuffle","labels","polarOptions","scaleShowLabelBackdrop","changeData","chartJs2DCtrl","series","chartJsWaveCtrl","$interval","sin","pop","chartistCtrl","getResponsive","padding","chartPadding","labelOffset","labelDirection","labelInterpolationFnc","simpleLineOptions","simpleLineData","areaLineData","areaLineOptions","low","showArea","biLineData","biLineOptions","high","showLine","showPoint","axisX","showGrid","simpleBarData","simpleBarOptions","multiBarData","multiBarOptions","stackBars","word","axisY","multiBarResponsive","reverseData","horizontalBars","Chartist","noop","seriesBarDistance","stackedBarData","stackedBarOptions","simplePieData","simplePieOptions","labelsPieData","labelsPieOptions","simpleDonutData","simpleDonutOptions","donut","donutResponsive","pieResponsive","Line","Bar","Pie","morrisCtrl","lineData","y","areaData","barData","donutData","MailTabCtrl","composeModal","mailMessages","navigationCollapsed","showCompose","subject","tabs","getTabs","messages","pic","attachment","important","newMails","getMessagesByLabel","getMessageById","TimelineCtrl","hideBlocks","blocks","showBlocks","hasClass","timelineBlocks","requestAnimationFrame","treeCtrl","getDefaultData","opened","ignoreChanges","newId","newNode","basicConfig","multiple","check_callback","worker","version","dragConfig","addNewNode","basicTree","get_selected","treeData","expand","collapse","readyCB","applyModelChanges","dragData","BlurFeedCtrl","author","surname","ago","expanded","expandMessage","message","blurFeed","assignCalendar","dashboardCalendar","DashboardCalendarCtrl","gossipDark","DashboardLineChartCtrl","chart","zoomToDates","graphColor","chartData","value0","minVerticalGap","useLineColorForBulletBorder","fillColorsField","categoryBalloonColor","categoryBalloonAlpha","zoomOutButton","zoomOutText","dashboardLineChart","DashboardMapCtrl","zoomControl","zoomControlEnabled","panControlEnabled","zoomLevel","zoomLongitude","zoomLatitude","areas","customData","areasSettings","legend","marginLeft","equalWidths","borderColor","horizontalGap","dashboardMap","DashboardPieChartCtrl","getRandomArbitrary","loadPieCharts","easyPieChart","easing","onStep","barColor","trackColor","scaleLength","lineWidth","lineCap","updatePieCharts","pieColor","charts","stats","dashboardPieChart","DashboardTodoCtrl","getRandomColor","transparent","todoList","newTodoText","addToDoItem","clickPlus","dashboardTodo","popularApp","TrafficChartCtrl","doughnutData","percentage","ctx","getContext","myDoughnut","Chart","Doughnut","trafficChart","WeatherCtrl","updateGeoData","jsonp","response","geoData","updateWeather","handDrawn","legendValueText","lineColorField","write","saveWeatherData","firstItem","weather","timeTemp","main","temp","itemDate","dt_txt","lastItem","middleOfTheDay","units","weatherIcons","01d","02d","03d","04d","09d","10d","11d","13d","50d","01n","02n","03n","04n","09n","10n","11n","13n","50n","switchUnits","switchDay","day","appid","lat","geoplugin_latitude","lon","geoplugin_longitude","WizardCtrl","personalInfo","productInfo","shipment","arePersonalInfoPasswordsEqual","confirmPassword","password","GmapPageCtrl","initialize","mapCanvas","mapOptions","google","maps","LatLng","zoom","mapTypeId","MapTypeId","ROADMAP","Map","LeafletPageCtrl","L","Default","imagePath","setView","tileLayer","attribution","addTo","marker","bindPopup","openPopup","MapBubblePageCtrl","latlong","latitude","longitude","mapData","minBulletSize","maxBulletSize","Infinity","AmMap","addTitle","imagesSettings","mapVar","worldLow","maxSquare","PI","minSquare","dataItem","square","sqrt","MapLinesPageCtrl","targetSVG","planeSVG","linkToObject","svgPath","scale","lines","latitudes","longitudes","labelShiftY","labelShiftX","labelFontSize","linesSettings","backgroundZoomsToTop","linesAboveImages","ButtonPageCtrl","progressFunction","IconsPageCtrl","icons","kameleonIcons","kameleonRoundedIcons","ionicons","fontAwesomeIcons","socicon","ModalsPageCtrl","NotificationsPageCtrl","defaultConfig","quotes","openedToasts","clearLastToast","toast","clearToasts","openRandomToast","quote","toastType","toastQuote","optionsStr","openToast","strOptions","baPanel","baPanelClass","baPanelTitle","titleTpl","baPanelBlur","baPanelBlurHelper","bodyBgSize","bodyBgLoad","getBodyBgImageSizes","recalculatePanelStyle","backgroundSize","backgroundPosition","positionX","positionY","$isMobile","computedStyle","getComputedStyle","backgroundImage","elemW","documentElement","clientWidth","elemH","clientHeight","finalHeight","finalWidth","imgRatio","containerRatio","baPanelSelf","BaSidebarCtrl","menuItems","getMenuItems","defaultSidebarState","stateRef","hoverItem","showHoverElem","hoverElemHeight","menuTopValue","hoverElemTop","getBoundingClientRect","canSidebarBeHidden","setMenuCollapsed","baSidebar","layoutSizes","jqWindow","_onWindowClick","$evt","originalEvent","$sidebarEventProcessed","isMenuCollapsed","_onWindowResize","newMenuCollapsed","shouldMenuBeCollapsed","newMenuHeight","_calculateMenuHeight","menuHeight","childNodes","off","staticMenuItems","addStaticItem","_factory","defineMenuItemStates","meta","states","isOk","RoleName","isChildOk","subMenu","toggleMenuCollapsed","getAllStateRefsRecursive","_iterateSubItems","currentItem","subItem","baSidebarToggleMenu","baSidebarCollapseMenu","baSidebarTogglingItem","BaSidebarTogglingItemCtrl","_isState","subItemsStateRefs","subItemState","menuItem","$$menuItem","$$expandSubmenu","warn","$$collapseSubmenu","$expand","$collapse","$toggle","baUiSrefTogglingSubmenu","slideDown","slideUp","baUiSrefToggler","baWizard","complete","tabaction","baWizardNewExam","baWizardCtrl","calcProgress","tabNum","addTab","setPrev","selectTab","LastTab","FirstTab","isAvailiable","tIndex","isFirstTab","isLastTab","nextTab","previousTab","baWizardStep","wizard","isSelected","$setSubmitted","isComplete","$valid","prevTab","pTab","backTop","speed","contentTop","hideTitle","activePageTitle","NowNow","MsgCenterCtrl","0","notifications","getMessage","msgCenter","pageTop","showMobileSearch","toggleMobileSearch","currentState","startSearch","widgets","ngModel","appImage","kameleonImg","profilePicture","ext","plainText","AreaChartCtrl","zoomAreaChart","areaChart","cornerRadius","horizontalPadding","verticalPadding","durationUnits","bulletBorderAlpha","bulletBorderThickness","autoGridCount","gridCount","BarChartCtrl","country","categoryBalloonEnabled","zoomable","combinedChartCtrl","precision","labelFunction","valueAxis","clustered","bulletColor","hideBulletsCount","chartScrollbar","graph","oppositeAxis","scrollbarHeight","selectedGraphFillAlpha","selectedGraphLineColor","selectedGraphLineAlpha","pan","useGraphSettings","shadowAlpha","market1","market2","sales1","sales2","FunnelChartCtrl","titleField","labelPosition","funnelAlpha","startX","neckWidth","startAlpha","neckHeight","ganttChartCtrl","balloonDateFormat","brightnessStep","segmentsField","colorField","startField","endField","durationField","segments","valueScrollbar","valueBalloonsEnabled","valueZoomable","LineChartCtrl","minPeriod","PieChartCtrl","handleInit","pieChart","handleRollOver","wedge","addClassNames","autoMargins","defs","feOffset","in","dx","dy","feGaussianBlur","stdDeviation","feBlend","in2","mode","litres","marginBottom","pullOutRadius","rules","maxWidth","overrides","labelsEnabled","composeBoxCtrl","MailDetailCtrl","mail","MailListCtrl","NotificationsCtrl","showSuccessMsg","showInfoMsg","showErrorMsg","showWarningMsg","bottom","SelectpickerPanelCtrl","standardSelectItems","selectWithSearchItems","groupedSelectItems","priority","ngDisabled","dropupAuto","SwitchPanelCtrl","switc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7C,EAAeg7C,IAAI,iDAAiD,6iCACpEh7C,EAAeg7C,IAAI,4CAA4C,+pGAC/Dh7C,EAAeg7C,IAAI,8CAA8C,k4LACjEh7C,EAAeg7C,IAAI,gDAAgD,07CACnEh7C,EAAeg7C,IAAI,iDAAiD,2qBACpEh7C,EAAeg7C,IAAI,oDAAoD,m6HACvEh7C,EAAeg7C,IAAI,mDAAmD,4RACtEh7C,EAAeg7C,IAAI,2CAA2C,oOAC9Dh7C,EAAeg7C,IAAI,2CAA2C,2TAC9Dh7C,EAAeg7C,IAAI,kDAAkD,iWACrEh7C,EAAeg7C,IAAI,0CAA0C,sPAC7Dh7C,EAAeg7C,IAAI,qDAAqD,+qBACxEh7C,EAAeg7C,IAAI,sDAAsD,iUACzEh7C,EAAeg7C,IAAI,oDAAoD;AACvEh7C,EAAeg7C,IAAI,qDAAqD,6pBACxEh7C,EAAeg7C,IAAI,qDAAqD,6pBACxEh7C,EAAeg7C,IAAI,uDAAuD,iVAC1Eh7C,EAAeg7C,IAAI,uDAAuD,6UAC1Eh7C,EAAeg7C,IAAI,uDAAuD,6eAC1Eh7C,EAAeg7C,IAAI,kDAAkD,i/BACrEh7C,EAAeg7C,IAAI,+CAA+C,i4BAClEh7C,EAAeg7C,IAAI,+CAA+C,6wBAClEh7C,EAAeg7C,IAAI,iDAAiD,wjBACpEh7C,EAAeg7C,IAAI,iDAAiD,q9BACpEh7C,EAAeg7C,IAAI,mDAAmD,+7HACtEh7C,EAAeg7C,IAAI,mDAAmD,ueACtEh7C,EAAeg7C,IAAI,yDAAyD","file":"scripts/app-c64361716b.js","sourcesContent":["/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages', [\r\n 'ui.router',\r\n 'BlurAdmin.pages.dashboard',\r\n 'BlurAdmin.pages.reports',\r\n 'BlurAdmin.pages.media',\r\n 'BlurAdmin.pages.questions',\r\n 'BlurAdmin.pages.products',\r\n 'BlurAdmin.pages.courseware',\r\n 'BlurAdmin.pages.assessment',\r\n 'BlurAdmin.pages.assignments',\r\n 'BlurAdmin.pages.administration',\r\n 'BlurAdmin.pages.staff',\r\n 'BlurAdmin.pages.institution',\r\n //'BlurAdmin.pages.ui',\r\n //'BlurAdmin.pages.components',\r\n //'BlurAdmin.pages.form',\r\n //'BlurAdmin.pages.tables',\r\n //'BlurAdmin.pages.maps',\r\n //'BlurAdmin.pages.charts',\r\n 'BlurAdmin.pages.profile',\r\n 'BlurAdmin.pages.registration',\r\n 'BlurAdmin.pages.assets',\r\n 'BlurAdmin.pages.activity',\r\n 'BlurAdmin.pages.cmes',\r\n 'BlurAdmin.pages.quickquiz',\r\n 'BlurAdmin.pages.myassignments',\r\n 'BlurAdmin.pages.search',\r\n 'BlurAdmin.pages.launchcme',\r\n 'BlurAdmin.pages.launchexams',\r\n 'BlurAdmin.pages.launchtopics',\r\n 'BlurAdmin.pages.welcome',\r\n 'BlurAdmin.pages.news',\r\n 'BlurAdmin.pages.help',\r\n 'BlurAdmin.pages.editor',\r\n 'BlurAdmin.pages.authortools',\r\n 'BlurAdmin.pages.notes',\r\n 'BlurAdmin.pages.discussions'\r\n ])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($urlRouterProvider, $locationProvider, baSidebarServiceProvider) {\r\n $locationProvider.html5Mode(true);\r\n $urlRouterProvider.otherwise('/');\r\n\r\n //baSidebarServiceProvider.addStaticItem({\r\n // title: 'Pages',\r\n // icon: 'ion-document',\r\n // subMenu: [{\r\n // title: 'Sign In',\r\n // fixedHref: 'auth.html',\r\n // blank: false\r\n // }, {\r\n // title: 'Sign Up',\r\n // fixedHref: 'reg.html',\r\n // blank: false\r\n // }, {\r\n // title: 'User Profile',\r\n // stateRef: 'profile'\r\n // }, {\r\n // title: '404 Page',\r\n // fixedHref: '404.html',\r\n // blank: true\r\n // }]\r\n //});\r\n //baSidebarServiceProvider.addStaticItem({\r\n // title: 'Menu Level 1',\r\n // icon: 'ion-ios-more',\r\n // subMenu: [{\r\n // title: 'Menu Level 1.1',\r\n // disabled: true\r\n // }, {\r\n // title: 'Menu Level 1.2',\r\n // subMenu: [{\r\n // title: 'Menu Level 1.2.1',\r\n // disabled: true\r\n // }]\r\n // }]\r\n //});\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 15.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme', [\r\n 'toastr',\r\n 'chart.js',\r\n 'angular-chartist',\r\n 'angular.morris-chart',\r\n 'textAngular',\r\n 'BlurAdmin.theme.components'\r\n ]).config(function ($provide) {\r\n $provide.decorator('taOptions', ['taRegisterTool', 'taSelection', 'taToolFunctions', '$delegate', '$uibModal', '$window', function (taRegisterTool, taSelection, taToolFunctions, taOptions, $uibModal, $window) {\r\n // $delegate is the taOptions we are decorating\r\n // register the tool with textAngular\r\n taRegisterTool('customInsertImage', {\r\n tooltiptext: 'Insert Image',\r\n iconclass: \"fa fa-picture-o\",\r\n action: function ($deferred) {\r\n var textAngular = this;\r\n var savedSelection = rangy.saveSelection();\r\n var modalInstance = $uibModal.open({\r\n // Put a link to your template here or whatever\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n templateUrl: '/app/modals/EditorImageUpload.html',\r\n controller: ['$uibModalInstance', '$scope', '$rootScope', '$http', 'Upload',\r\n function ($uibModalInstance, $scope, $rootScope,$http, Upload) {\r\n $scope.image = '/assets/img/image_default.png';\r\n $scope.progress = 0;\r\n $scope.ClearFiles = function () {\r\n $scope.Files = [];\r\n $scope.errorFile = [];\r\n }\r\n $scope.Files = [];\r\n $scope.AskClearFiles = function() {\r\n swal({\r\n title:\"Clear file selection?\",\r\n text:\"This will empty the list of files you've selected for uploading. Files you've already uploaded will not be affected.\",\r\n type:\"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Clear Files\",\r\n dangerMode: true\r\n }, function(del) {\r\n if(del){\r\n $scope.Files = [];\r\n $scope.errorFile = [];\r\n $scope.$apply();\r\n }\r\n\r\n //alert(del)\r\n });\r\n }\r\n\r\n $scope.FilesAdded = function (fls) {\r\n angular.forEach(fls, function (f) {\r\n $scope.Files.push(f)\r\n })\r\n //console.log($scope.Files)\r\n }\r\n $scope.SelectImage = function (i) {\r\n //console.log(i)\r\n angular.forEach($scope.ImageList, function (img) {\r\n img.Selected = false;\r\n img.style = {}\r\n });\r\n $scope.SelectedImage = i;\r\n $scope.SelectedImage.Selected = true;\r\n $scope.SelectedImage.style = { \"outline\": \"5px solid rgba(65, 195, 65, 0.75)\", \"outline-offset\":\"-5px\"}\r\n \r\n }\r\n $scope.upload = function () {\r\n angular.forEach($scope.Files, function (file) {\r\n Upload.upload({\r\n url: '/UserMediaUpload',\r\n file: file,\r\n method: 'POST'\r\n })\r\n .progress(function (evt) {\r\n $scope.progress = parseInt(100.0 * evt.loaded / evt.total);\r\n })\r\n .success(function (data) {\r\n\r\n $scope.progress = 0;\r\n $scope.ClearFiles();\r\n $scope.image = data.dir + data.filename;\r\n $scope.active = 0\r\n //console.log($scope.image);\r\n $http.post(\"/Execute/GetUserMedia\", [$rootScope.User.UserId, 1]).success(function (data) {\r\n $scope.ImageList = data.RS_0;\r\n })\r\n });\r\n\r\n });\r\n \r\n };\r\n $scope.insert = function () {\r\n $uibModalInstance.close('https://s3.amazonaws.com/' + $scope.SelectedImage.S3Path);\r\n };\r\n ////console.log($rootScope.User)\r\n $http.post(\"/Execute/GetUserMedia\", [$rootScope.User.UserId, 1]).success(function (data) {\r\n $scope.ImageList = data.RS_0;\r\n })\r\n \r\n }\r\n ]\r\n }).result.then(\r\n function (result) {\r\n //rangy.restoreSelection(savedSelection);\r\n textAngular.$editor().wrapSelection('insertImage', result);\r\n $deferred.resolve();\r\n },\r\n function () {\r\n $deferred.resolve();\r\n }\r\n );\r\n return false;\r\n },\r\n onElementSelect: {\r\n element: 'img',\r\n action: taToolFunctions.imgOnSelectAction\r\n }\r\n });\r\n taRegisterTool('customInsertLink', {\r\n tooltiptext: 'Insert Link...',\r\n iconclass: \"fa fa-link\",\r\n \r\n action: function ($deferred) {\r\n var textAngular = this;\r\n var savedSelection = rangy.saveSelection();\r\n var urlLink;\r\n urlLink = $window.prompt('Please enter a URL to insert', 'http://');\r\n //\r\n ////console.log(urlLink)\r\n var createLink = function (url) {\r\n //var options\r\n //var optionsTagName = options.toLowerCase().replace(/[<>]/ig, '');\r\n //if (optionsTagName.trim() === 'default') {\r\n // optionsTagName = taDefaultWrap;\r\n // options = '<' + taDefaultWrap + '>';\r\n //}\r\n \r\n var tagBegin = '',\r\n tagEnd = '',\r\n\t\t\t\t\t\t _selection = taSelection.getSelection();\r\n if (_selection.collapsed) {\r\n // insert text at selection, then select then just let normal exec-command run\r\n\r\n taSelection.insertHtml(tagBegin + url + tagEnd);\r\n } else if (rangy.getSelection().getRangeAt(0).canSurroundContents()) {\r\n var node = angular.element(tagBegin + tagEnd)[0];\r\n rangy.getSelection().getRangeAt(0).surroundContents(node);\r\n }\r\n return;\r\n }\r\n if (urlLink && urlLink !== '' && urlLink !== 'http://') {\r\n return createLink(urlLink)\r\n }\r\n },\r\n activeState: function (commonElement) {\r\n if (commonElement) return commonElement[0].tagName === 'A';\r\n return false;\r\n },\r\n onElementSelect: {\r\n element: 'a',\r\n action: taToolFunctions.aOnSelectAction\r\n }\r\n });\r\n // add the button to the default toolbar definition\r\n taOptions.toolbar[3].push('customInsertImage');\r\n taOptions.toolbar[3].push('customInsertLink');\r\n return taOptions;\r\n }]);\r\n })\r\n .config(textAngularConfig);\r\n textAngularConfig.$inject = ['$provide'];\r\n function textAngularConfig($provide) {\r\n $provide.decorator('taToolFunctions', taToolFunctionsConfig);\r\n }\r\n taToolFunctionsConfig.$inject = ['$delegate'];\r\n function taToolFunctionsConfig($delegate) {\r\n // save original function to call it later\r\n var imgOnSelectActionFn = $delegate.imgOnSelectAction;\r\n var aOnSelectActionFn = $delegate.aOnSelectAction;\r\n // decorate imgOnSelectAction\r\n $delegate.imgOnSelectAction = function (event, $element, editorScope) {\r\n // call original function in which img toolbar is constructed\r\n imgOnSelectActionFn(event, $element, editorScope);\r\n\r\n // set popover size to fit content\r\n // btw, dunno why it is set to concrete size\r\n editorScope.displayElements.popover.css('width', 'auto');\r\n\r\n // https://github.com/fraywing/textAngular/blob/1372bc1d2187f959b6eb01bbf6dab1410a598e2a/src/textAngularSetup.js#L219-L221\r\n var finishEdit = function () {\r\n //console.log(editorScope)\r\n editorScope.updateTaBindtaTextElement();\r\n editorScope.hidePopover();\r\n };\r\n\r\n var wrapImageCenter = angular.element('');\r\n wrapImageCenter.on('click', function (event) {\r\n event.preventDefault();\r\n // use bootstrap helper class because no margin or display allowed\r\n // https://github.com/fraywing/textAngular/blob/1372bc1d2187f959b6eb01bbf6dab1410a598e2a/src/textAngular-sanitize.js#L499-L501\r\n ////console.log($element)\r\n //event.preventDefault();\r\n $element.removeClass('img-right')\r\n $element.removeClass('img-left')\r\n\r\n $element.addClass('chall-img')\r\n ////$element.css({\r\n //// 'float': 'none',\r\n //// 'padding-right': '10px',\r\n //// 'padding-left': '10px',\r\n //// 'padding-top': '5px',\r\n //// 'padding-bottom': '5px'\r\n ////});\r\n //$element.css({\r\n // 'border': '10px solid red'\r\n //});\r\n finishEdit();\r\n });\r\n var wrapImageLeft = angular.element('');\r\n wrapImageLeft.on('click', function (event) {\r\n event.preventDefault();\r\n // use bootstrap helper class because no margin or display allowed\r\n // https://github.com/fraywing/textAngular/blob/1372bc1d2187f959b6eb01bbf6dab1410a598e2a/src/textAngular-sanitize.js#L499-L501\r\n ////console.log($element)\r\n event.preventDefault();\r\n $element.removeClass('img-right')\r\n $element.addClass('chall-img img-left')\r\n //$element.css({\r\n // 'float': 'left'\r\n //}).css({\r\n // 'padding-right': '10px',\r\n // 'padding-left': '0px',\r\n // 'padding-top': '5px',\r\n // 'padding-bottom': '5px'});\r\n finishEdit();\r\n });\r\n var wrapImageRight = angular.element('');\r\n wrapImageRight.on('click', function (event) {\r\n event.preventDefault();\r\n // use bootstrap helper class because no margin or display allowed\r\n // https://github.com/fraywing/textAngular/blob/1372bc1d2187f959b6eb01bbf6dab1410a598e2a/src/textAngular-sanitize.js#L499-L501\r\n ////console.log($element)\r\n event.preventDefault();\r\n $element.removeClass('img-left')\r\n\r\n $element.addClass('chall-img img-right')\r\n //$element.css({\r\n // 'float': 'right',\r\n // 'padding-right': '0px',\r\n // 'padding-left': '10px',\r\n // 'padding-top': '5px',\r\n // 'padding-bottom': '5px'\r\n //});\r\n finishEdit();\r\n });\r\n editorScope.displayElements.popover\r\n .find('.btn-group')\r\n // eq(0) -> [full, half, quart]\r\n // eq(1) -> [floatLeft, floatNone, floatRight]\r\n // eq(2) -> [remove]\r\n .eq(1).html('')\r\n .append(wrapImageLeft)\r\n .append(wrapImageCenter)\r\n .append(wrapImageRight);\r\n };\r\n $delegate.aOnSelectAction = function (event, $element, editorScope) {\r\n // setup the editor toolbar\r\n //console.log('' + $element.attr('href') + '')\r\n // Credit to the work at http://hackerwins.github.io/summernote/ for this editbar logic\r\n aOnSelectActionFn(event, $element, editorScope);\r\n event.preventDefault();\r\n editorScope.displayElements.popover.css('width', '336px');\r\n var container = editorScope.displayElements.popoverContainer;\r\n container.empty();\r\n container.css('line-height', '28px');\r\n var link = angular.element('' + $element.attr('href') + '');\r\n link.css({\r\n 'display': 'inline-block',\r\n 'max-width': '200px',\r\n 'overflow': 'hidden',\r\n 'text-overflow': 'ellipsis',\r\n 'white-space': 'nowrap',\r\n 'vertical-align': 'middle'\r\n });\r\n //console.log('this part works', link)\r\n container.append(link);\r\n var buttonGroup = angular.element('
');\r\n var reLinkButton = angular.element('');\r\n reLinkButton.on('click', function (event) {\r\n event.preventDefault();\r\n var urlLink = window.prompt('Please enter a URL to insert', $element.attr('href'));\r\n if (urlLink && urlLink !== '' && urlLink !== 'http://' + 'target=\"_blank\"') {\r\n $element.attr('href', urlLink);\r\n editorScope.updateTaBindtaTextElement();\r\n }\r\n editorScope.hidePopover();\r\n });\r\n buttonGroup.append(reLinkButton);\r\n var unLinkButton = angular.element('');\r\n // directly before this click event is fired a digest is fired off whereby the reference to $element is orphaned off\r\n unLinkButton.on('click', function (event) {\r\n event.preventDefault();\r\n $element.replaceWith($element.contents());\r\n editorScope.updateTaBindtaTextElement();\r\n editorScope.hidePopover();\r\n });\r\n buttonGroup.append(unLinkButton);\r\n //var targetToggle = angular.element('');\r\n //if ($element.attr('target') === '_blank') {\r\n // targetToggle.addClass('active');\r\n //}\r\n //targetToggle.on('click', function (event) {\r\n // event.preventDefault();\r\n // $element.attr('target', ($element.attr('target') === '_blank') ? '' : '_blank');\r\n // targetToggle.toggleClass('active');\r\n // editorScope.updateTaBindtaTextElement();\r\n //});\r\n //buttonGroup.append(targetToggle);\r\n container.append(buttonGroup);\r\n editorScope.showPopover($element);\r\n \r\n };\r\n return $delegate;\r\n }\r\n ;\r\n})();\r\n\r\n\r\n \r\n\r\n\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.media', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('media', {\r\n url: '/media',\r\n title: 'My Media',\r\n templateUrl: '/app/pages/media/media.html',\r\n sidebarMeta: {\r\n icon: 'ion-ios-book',\r\n order: 420,\r\n secure: { Allow: [\"Contributor\", \"Author\"] }\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.User = $rootScope.User;\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 08/23/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.activity', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('activitypage', {\r\n url: '/activity',\r\n title: 'My Activity',\r\n abstract: true,\r\n template: '
',\r\n sidebarMeta: {\r\n icon: 'fa fa-history',\r\n order: 300,\r\n secure: {Allow: [\"Learner\",\"Program Manager\"]}\r\n }\r\n })\r\n .state('activitypage.scorelog', {\r\n url: '/score-log',\r\n title: 'Score Log',\r\n templateUrl: 'app/pages/activity/scorelog.html',\r\n controller: 'activityctrl',\r\n sidebarMeta: {\r\n order: 10\r\n }\r\n }).state('activitypage.inprogress', {\r\n url: '/in-progress',\r\n title: 'In Progress',\r\n templateUrl: 'app/pages/activity/inprogress.html',\r\n controller: 'activityctrl',\r\n sidebarMeta: {\r\n order: 20\r\n }\r\n });\r\n }\r\n\r\n angular.module('BlurAdmin.pages.activity').controller(\r\n 'activityctrl',\r\n function ($scope, $rootScope, $http, $stateParams, $filter, $location, ngIntroService) {\r\n var introStepsScoreLog = [\r\n {\r\n element: '#launch',\r\n intro: \"

Score Log

\" +\r\n \"

Here you will find a record of every assessment you've scored.

\"\r\n },\r\n {\r\n element: '#detail-0',\r\n intro: \"

View Assessment Detail

\" +\r\n \"

Click the magnifying glass icon to view detailed information and remediation for a scored assessment

\"\r\n },\r\n {\r\n element: '#retry-0',\r\n intro: \"

Retry Assessment

\" +\r\n \"

Click the retry icon to begin a fresh attempt of a previously scored assessment

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Score Log tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n var introStepsInProg = [\r\n {\r\n element: '#launch',\r\n intro: \"

In-Progress (Paused) Assessments

\" +\r\n \"

When you pause an assessment without scoring it, you can find it again here.

\"\r\n },\r\n {\r\n element: '#list-controls',\r\n intro: \"

List Controls

\" +\r\n \"

Choose how the list of in-progress assessments is displayed, and filter by keyword.

\"\r\n },\r\n {\r\n element: '#resume-0',\r\n intro: \"

Resume

\" +\r\n \"

You'll be taken to the first unanswered question in the paused assessment.

\"\r\n },\r\n {\r\n element: '#delete-0',\r\n intro: \"

Remove

\" +\r\n \"

Delete the paused assessment from your account.

This can not be undone.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the In-Progress Assessments tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptionsScoreLog = {\r\n steps: introStepsScoreLog,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.IntroOptionsInProg = {\r\n steps: introStepsInProg,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.PersistentCourseId = $rootScope.UserSettings.PersistentCourseId || '';\r\n $scope.User = $rootScope.User;\r\n $http.post(\"/Execute/GetUserCourses\", [$scope.User.UserName]).success(function (data) {\r\n $scope.UserCourses = data.RS_0;\r\n $scope.ExpiredTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"True\" && e.IsTrial == \"1\");\r\n })\r\n $scope.ActiveTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"False\" && e.IsTrial==\"1\");\r\n })\r\n $scope.IsExpiredTrial = function(id) {\r\n var find = jQuery.grep($scope.ExpiredTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.IsActiveTrial = function(id) {\r\n var find = jQuery.grep($scope.ActiveTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.TrialExpires = function(id) {\r\n var course = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.Id == id.toString);\r\n });\r\n return course.Expires;\r\n }\r\n //console.log($scope.ExpiredTrials)\r\n });\r\n $scope.PageSizes = [\"10\", \"25\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[2];\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n $scope.completedPageSize = $scope.PageSizes[1];\r\n $scope.completedCurrentPage = 1;\r\n $scope.inprogPredicate = \"SortableStartDateTime\";\r\n $scope.inprogReverse = true;\r\n $scope.inprogFilter = '';\r\n var Today = new Date()\r\n $scope.updateLogs = function (pages, cur) {\r\n console.log([$scope.User.UserName, cur, 1000000])\r\n $http.post(\"/Execute/GetAssessmentActivity\", [$scope.User.UserName, cur, 1000000]).success(function (dta) {\r\n $scope.activityPageInfo = dta.RS_2[0];\r\n console.log($scope.activityPageInfo)\r\n $scope.InProgress = dta.RS_0;\r\n $scope.Completed = dta.RS_1;\r\n //console.log($scope.InProgress);\r\n $scope.Profile = dta.RS_3[0];\r\n //////console.log($scope.Profile)\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.UserRoles, function (getAssTab) {\r\n if (getAssTab == 'Assignee') {\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.UserName]).success(function (data) {\r\n //console.log(data)\r\n $scope.AssignActiveStatus = data.RS_1;\r\n });\r\n };\r\n });\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n $http.post('/Execute/GetAssessmentViewability', [ass.Assessment_Id, ass.CourseId, ass.ChapterId, ass.TopicId, $rootScope.User.UserId]).success(function (data) {\r\n ass.Assignments = data.RS_0[0];\r\n });\r\n });\r\n //console.log($scope.Completed)\r\n });\r\n }\r\n $scope.updateLogs($scope.completedPageSize, $scope.completedCurrentPage)\r\n $scope.updateActivityPage = function (pagesz, page) {\r\n $scope.completedCurrentPage = page;\r\n $scope.updateActivity(pagesz);\r\n }\r\n $scope.StartAssessment = function (UserName,CourseId,ChapterId,TopicId,SubTopicId,AssessmentId,custom,UserAssessmentId) {\r\n $scope.ShowLoad = UserAssessmentId;\r\n custom = ((custom==\"1\") ? 1 : 0);\r\n var params = [UserName, CourseId, ChapterId, TopicId, SubTopicId || \"0\", AssessmentId, CurrentUserTZoffsett]\r\n //////console.log(params)\r\n /////////////////////////////////////////////////\r\n var AHparams = [UserName, CourseId, ChapterId, TopicId || \"0\", SubTopicId || \"0\", AssessmentId, custom]\r\n //////console.log(params)\r\n $http.post(\"/Execute/GetAssessmentHistory\", AHparams).success(function (data) {\r\n $scope.Complete = data.RS_0;\r\n\r\n angular.forEach($scope.Complete, function (com) {\r\n com.EndDateTime = new Date(com.EndDateTime + \" UTC\");\r\n com.StartDateTime = new Date(com.StartDateTime + \" UTC\");\r\n });\r\n $scope.InProgress = data.RS_1;\r\n angular.forEach($scope.InProgress, function (inp) {\r\n inp.StartDateTime = new Date(inp.StartDateTime + \" UTC\");\r\n });\r\n\r\n if (data.RS_3) {\r\n ////console.log('ok')\r\n $scope.Viewabilty = data.RS_3[0];\r\n $scope.Assignments = data.RS_2[0] || {};\r\n //console.log($scope.Assignments);\r\n //$scope.HasViewability = true;\r\n\r\n $scope.Assignments.EffectiveDateTime = new Date($scope.Assignments.EffectiveDateTime + ' UTC');\r\n $scope.Assignments.DueDateTime = new Date($scope.Assignments.DueDateTime + ' UTC')\r\n if ($scope.Assignments.Viewablity == 3) {\r\n\r\n //console.log($scope.Assignments.EffectiveDateTime, $scope.Assignments.DueDateTime, Today)\r\n if ($scope.Assignments.EffectiveDateTime < Today && $scope.Assignments.DueDateTime > Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false;\r\n ////console.log($scope.Assignments.HasViewability)\r\n }\r\n }\r\n if ($scope.Assignments.Viewablity == 2) {\r\n\r\n if ($scope.Assignments.EffectiveDateTime < Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false\r\n }\r\n //console.log($scope.Assignments)\r\n\r\n }\r\n if ($scope.Assignments.Viewablity == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n\r\n }\r\n }\r\n else {\r\n $scope.Assignments = data.RS_2[0];\r\n if ($scope.Assignments.Viewable && $scope.Assignments.Viewable == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n }\r\n\r\n\r\n ////console.log(data)\r\n\r\n\r\n ////console.log($scope.Assignments)\r\n if ($scope.Viewabilty) {\r\n if ($scope.Viewabilty.ShowLeaderBoard == '') {\r\n $scope.Viewabilty.ShowLeaderBoard = '0'\r\n }\r\n if ($scope.Viewabilty.PrescriptiveReport == '') {\r\n $scope.Viewabilty.PrescriptiveReport = '1'\r\n }\r\n if ($scope.Viewabilty.MinutesAllocated == '') {\r\n $scope.Viewabilty.MinutesAllocated = '0'\r\n }\r\n }\r\n ////console.log($scope.Viewabilty)\r\n if ($scope.Assignments.HasViewability && $scope.Viewabilty && $scope.Viewabilty.MinutesAllocated && $scope.Viewabilty.MinutesAllocated > 0 && new Date($scope.Assignments.EffectiveDateTime + ' UTC') > Today && new Date($scope.Assignments.DueDateTime + ' UTC') < Today) {\r\n if (confirm(\"This Assessment will be automatically scored in \" + $scope.Viewabilty.MinutesAllocated +\" Minute. Are you ready to start?\")) {\r\n if (custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n if (custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n });\r\n ///////////////////////////////////////\r\n\r\n }\r\n $scope.ResumeAssessment = function (InProgress) {\r\n $location.path(\"/QuestionPool/\" + InProgress.Assessment_Id + \"/\" + InProgress.CourseId + \"/\" + InProgress.ChapterId + \"/\" + InProgress.TopicId + \"/Assessment\");\r\n }\r\n $scope.ViewPrescription = function (Completed) {\r\n //console.log(Completed)\r\n if (Completed.CourseId == \"0\") {\r\n $location.path(\"/customscrip/\" + Completed.Id);\r\n }\r\n else {\r\n $location.path(\"/prescription/\" + Completed.Id);\r\n }\r\n \r\n }\r\n $scope.DeleteAssessment = function (assessment) {\r\n swal({\r\n title: \"Are You Sure?\",\r\n text: \"You are about to delete an Assessment attempt.
This action CANNOT be undone.
Are you sure you want to delete and lose all progress for this attempt?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete Attempt\",\r\n closeOnConfirm: false,\r\n html: true\r\n },\r\n function () {\r\n $http.post(\"/Execute/DeleteUserAssessment\", [assessment.Id]).success(function (dta) {\r\n swal(\"Deleted!\", \"Assessment attempt successfully deleted.\", \"success\");\r\n $http.post(\"/Execute/GetLastActivity\", [$scope.User.UserName]).success(function (dtaa) {\r\n $scope.InProgress = dtaa.RS_0;\r\n $scope.Completed = dtaa.RS_1;\r\n $scope.Profile = dtaa.RS_2[0];\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n });\r\n });\r\n };\r\n \r\n $scope.updateActivity = function (pagesz) {\r\n \r\n ////console.log('updateActivity()');\r\n $http.post(\"/Execute/GetAssessmentActivity\", [$scope.User.UserName, $scope.completedCurrentPage, $scope.completedPageSize]).success(function (dtaa) {\r\n $scope.activityPageInfo = dtaa.RS_2[0];\r\n if ($scope.completedCurrentPage > 1 * $scope.activityPageInfo.TotalPages) {\r\n $scope.updateActivityPage($scope.completedPageSize, 1 * $scope.activityPageInfo.TotalPages);\r\n }\r\n $scope.InProgress = dtaa.RS_0;\r\n angular.forEach($scope.InProgress, function(ip){\r\n ip.SortableStartDateTime = Date.parse(ip.StartDateTime);\r\n });\r\n $scope.Completed = dtaa.RS_1;\r\n angular.forEach($scope.Completed, function(com){\r\n com.SortableEndDateTime = Date.parse(com.EndDateTime);\r\n })\r\n //////console.log($scope.Completed);\r\n $scope.Profile = dtaa.RS_3[0];\r\n //////console.log($scope.Profile)\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.UserRoles, function (getAssTab) {\r\n if (getAssTab == 'Assignee') {\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.User.UserName]).success(function (data) {\r\n //////console.log(data)\r\n $scope.AssignActiveStatus = data.RS_1;\r\n });\r\n };\r\n });\r\n\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n }\r\n\r\n }\r\n )\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.administration', [])\r\n .directive('rolemanager', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/RoleManager.htm',\r\n scope: {},\r\n controller: function ($scope, $http) {\r\n $http.post('/Execute/GetPortalRoles', [0]).success(function (data) {\r\n $scope.Roles = data.RS_0;\r\n ////console.log(data)\r\n });\r\n }\r\n }\r\n })\r\n .directive('productmanager', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/productmanager/main.htm',\r\n controller: function ($scope, $location, $http, $uibModal, $rootScope, $compile) {\r\n $scope.CurrentPage = 1;\r\n $scope.LoadProducts = function () {\r\n $http.post('/Execute/UAP_GetProducts', [$scope.CurrentPage, 10]).success(function (data) {\r\n $scope.Products = data.RS_0;\r\n $scope.ProductTypes = data.RS_1;\r\n });\r\n }\r\n $scope.LoadRates = function () {\r\n $http.post(\"/Execute/GetStateSalesTaxRates\").success(function (data) {\r\n $scope.TaxRates = data.RS_0;\r\n $scope.UnAssignedTaxRates = data.RS_1;\r\n });\r\n }\r\n $scope.LoadDiscounts = function () {\r\n $http.post(\"/Execute/GetProductDiscounts\").success(function (data) {\r\n $scope.Discounts = data.RS_0;\r\n });\r\n }\r\n $http.post(\"/CurrentUser\").success(function (dta) {\r\n ////console.log(dta)\r\n $scope.UserName = dta.UserName;\r\n });\r\n $scope.EditTaxRate = function (rate) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditSalesTaxRate.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.StateEntries = items.UnAssignedTaxRates;\r\n if (items.Rate) {\r\n $scope.Rate = items.Rate;\r\n $scope.Rate.State = { \"EntryId\": items.Rate.StateEntryId, \"Name\": items.Rate.Name };\r\n $scope.HideDDL = true;\r\n } else {\r\n $scope.HideDDL = false;\r\n $scope.Rate = { \"Value\": 0.0 }\r\n }\r\n $scope.Cancel = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.SaveTaxRate = function () {\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n $scope.Rate.EntryId = $scope.Rate.State.EntryId\r\n $http.post(\"SaveTaxRate\", $scope.Rate).success(function (data) {\r\n //console.log(data)\r\n $uibModalInstance.close($scope.Rate);\r\n });\r\n } else {\r\n var HeadingText = \"Invalid Rate\";\r\n var mi = $uibModal.open({\r\n templateUrl: '/js/Dashboard/templates/Warning-modal.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Rate: rate, UnAssignedTaxRates: $scope.UnAssignedTaxRates } } }\r\n });\r\n mi.result.then(function (rate) {\r\n if (rate) {\r\n $scope.LoadRates();\r\n }\r\n });\r\n }\r\n $scope.EditProduct = function (prd) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditProduct.htm',\r\n windowClass: 'course-dash',\r\n size: 'xlg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.EditSort = function (tag) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/SortProductsByTag.htm',\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Tag = items.Tag;\r\n ////console.log(tag)\r\n $scope.sortableOptions = {\r\n stop: function (e, ui, obj) {\r\n\r\n }\r\n };\r\n $http.post('/Execute/GetProductsByTag', [$scope.Tag.Id]).success(function (data) {\r\n $scope.Products = data.RS_0;\r\n });\r\n $scope.cancel = function () {\r\n $uibModalInstance.close(false);\r\n };\r\n $scope.save = function (lst, idx) {\r\n if (idx < lst.length) {\r\n ////console.log([lst[idx].Id, $scope.Tag.Id, idx + 1])\r\n $http.post('/Execute/UpdateProductTagSort', [lst[idx].Id, $scope.Tag.Id, idx + 1]).success(function (data) {\r\n if (data.RS_0[0].Result == 'OK') {\r\n if (idx + 1 == lst.length) {\r\n $uibModalInstance.close(false);\r\n }\r\n else {\r\n $scope.save(lst, idx + 1);\r\n }\r\n }\r\n });\r\n }\r\n };\r\n },\r\n resolve: { items: function () { return { Tag: tag } } }\r\n });\r\n }\r\n $scope.tinymceOptions = tinymceOptions;\r\n $scope.ProductTypes = items.ProductTypes;\r\n if (items.Product) {\r\n //console.log(items.Product)\r\n $scope.Product = items.Product;\r\n $scope.Product.RoleAvailabilty = $scope.Product.RoleAvailabilty.split(\",\");\r\n $scope.Product.Inactive = ($scope.Product.Inactive == \"True\");\r\n $scope.Product.NoDiscount = ($scope.Product.NoDiscount == \"True\");\r\n $scope.Product.HideInStore = ($scope.Product.HideInStore == \"True\");\r\n $scope.Product.IsRecurring = ($scope.Product.IsRecurring == \"True\");\r\n angular.forEach($scope.ProductTypes, function (pt) {\r\n if (pt.Id == $scope.Product.ProductTypeId) {\r\n $scope.Product.ProductType = pt;\r\n }\r\n });\r\n $scope.NewProduct = false;\r\n } else {\r\n $scope.Product = { \"Name\": \"\", \"Description\": \"\", \"HTML\": \"\", \"ProductType\": $scope.ProductTypes[1], \"RoleAvailabilty\": [], \"Prices\": [], \"IsRecurring\": false, \"RecurringFrequency\": \"Y\" };\r\n $scope.NewProduct = true;\r\n }\r\n //console.log([$scope.Product.Id])\r\n $http.post('/Execute/UAP_GetProductModifiers', [$scope.Product.Id]).success(function (data) {\r\n $scope.Product.Modifiers = data.RS_0;\r\n $scope.Workflows = data.RS_2\r\n angular.forEach($scope.Product.Modifiers, function (mod) {\r\n mod.Values = [];\r\n angular.forEach(data.RS_1, function (v) {\r\n angular.forEach($scope.Workflows, function (wf) {\r\n if (v.WorkflowDefinitionId == wf.Id) {\r\n v.Workflow = wf;\r\n }\r\n });\r\n if (v.ProductModifierId == mod.Id) {\r\n mod.Values.push(v);\r\n }\r\n });\r\n });\r\n //console.log($scope.Product.Modifiers)\r\n });\r\n $scope.OptionDoneEdit = function (val) {\r\n delete val.isEditing;\r\n }\r\n $scope.NewModifierValue = function (m) {\r\n var v = { Id: 0, ProductModifierId: m.Id, Name: \"New Option\", Description: \"\", HTML: \"\", Value: 0.00, DisplayText: \"\", IsPremiumUpgrade: 0, UpgradeFactor: 0, WorkflowDefinitionId: 0, IsDeleted: 0, Workflow: $scope.Workflows[0] }\r\n if (m.Values) {\r\n m.Values.push(v);\r\n }\r\n else {\r\n m.Values = [v]\r\n }\r\n }\r\n $scope.NewModifier = function () {\r\n\r\n var m = { Id: 0, ProductId: $scope.Product.Id, Name: \"New Modifier\", Description: \"\", HTML: \"\", Values: [], IsDeleted: false }\r\n if ($scope.Product.Modifiers) {\r\n $scope.Product.Modifiers.push(m);\r\n }\r\n else {\r\n $scope.Product.Modifiers = [m]\r\n }\r\n //console.log($scope.Product)\r\n }\r\n $http.post('/Execute/GetDDLForProducts').success(function (data) {\r\n $scope.Roles = data.RS_0;\r\n $scope.Product.AvailableRoles = angular.copy(data.RS_0);\r\n if ($scope.Product.ProductTypeId == 1) {\r\n angular.forEach($scope.Roles, function (obj) {\r\n if (parseInt(obj.Id) == $scope.Product.RoleId) {\r\n $scope.Product.Role = obj;\r\n }\r\n });\r\n }\r\n $scope.Subscriptions = data.RS_1\r\n if ($scope.Product.ProductTypeId == 2) {\r\n angular.forEach($scope.Subscriptions, function (obj) {\r\n if (parseInt(obj.Id) == $scope.Product.SubscriptionId) {\r\n $scope.Product.Subscription = obj;\r\n }\r\n });\r\n }\r\n $scope.Courses = data.RS_2\r\n if ($scope.Product.ProductTypeId == 3) {\r\n angular.forEach($scope.Courses, function (obj) {\r\n if (parseInt(obj.Id) == $scope.Product.CourseId) {\r\n $scope.Product.Course = obj;\r\n }\r\n });\r\n }\r\n $scope.Institutions = data.RS_3\r\n if ($scope.Product.ProductTypeId == 4) {\r\n angular.forEach($scope.Institutions, function (obj) {\r\n if (parseInt(obj.Id) == $scope.Product.InstitutionId) {\r\n $scope.Product.Institution = obj;\r\n }\r\n });\r\n }\r\n\r\n angular.forEach($scope.Product.AvailableRoles, function (r) {\r\n r.Selected = false;\r\n angular.forEach($scope.Product.RoleAvailabilty, function (ra) {\r\n if (ra == r.Id) { r.Selected = true; }\r\n });\r\n });\r\n var productId = 0;\r\n if ($scope.Product.Id) {\r\n productId = $scope.Product.Id\r\n }\r\n $http.post('/Execute/GetProductAdminDetails', [productId]).success(function (data) {\r\n $scope.Product.Prices = data.RS_0;\r\n $scope.Product.Tags = data.RS_1;\r\n angular.forEach($scope.Product.Tags, function (t) {\r\n t.Selected = (t.Selected == \"True\");\r\n });\r\n });\r\n\r\n });\r\n $scope.NewPrice = function () {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditPrice.htm',\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Price = { Effective: new Date(), Amount: 0.00, PricebookEntryId: \"\" };\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n $scope.Save = function () {\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n $uibModalInstance.close($scope.Price);\r\n } else {\r\n //console.log($scope.Price)\r\n var HeadingText = \"Invalid Price\";\r\n var mi = $uibModal.open({\r\n templateUrl: '/js/Dashboard/templates/Warning-modal.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Product: prd } } }\r\n });\r\n mi.result.then(function (price) {\r\n if (price) {\r\n angular.forEach($scope.Product.Prices, function (p) {\r\n if (!p.Expires || p.Expires == null) {\r\n p.Expires = price.Effective\r\n }\r\n });\r\n $scope.Product.Prices.push(price);\r\n }\r\n });\r\n }\r\n $scope.Cancel = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.SaveProduct = function () {\r\n\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n var taglist = [];\r\n\r\n angular.forEach($scope.Product.Tags, function (t) {\r\n if (t.Selected == true) {\r\n taglist.push(t.Id);\r\n //t.SortPriority = \"1\";\r\n }\r\n });\r\n $scope.Product.RoleAvailabilty = [];\r\n angular.forEach($scope.Product.AvailableRoles, function (r) {\r\n if (r.Selected == true) {\r\n $scope.Product.RoleAvailabilty.push(r.Id);\r\n }\r\n });\r\n $scope.Product.TagArray = taglist.join(\",\");\r\n $scope.Product.RoleAvailabilty = $scope.Product.RoleAvailabilty.join(\",\");\r\n //console.log($scope.Product);\r\n $http.post(\"SaveProduct\", $scope.Product).success(function (data) {\r\n $uibModalInstance.close($scope.Product);\r\n ////console.log(data);\r\n });\r\n } else {\r\n var HeadingText = \"Invalid Product\";\r\n swal({\r\n title: 'Error',\r\n html: true,\r\n text: validationText\r\n });\r\n /*var mi = $uibModal.open({\r\n templateUrl: '/app/pages/administration/badproduct.html',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });*/\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Product: prd, ProductTypes: $scope.ProductTypes, Tags: angular.copy($scope.Tags) } } }\r\n });\r\n mi.result.then(function (product) {\r\n $scope.LoadProducts();\r\n });\r\n }\r\n $scope.DeleteProduct = function (id) {\r\n $http.post(\"/Execute/DeleteProduct\", [id]).success(function (d) {\r\n $scope.LoadProducts();\r\n }).error(function (err) {\r\n alert(err)\r\n });\r\n }\r\n $scope.LoadTags = function () {\r\n $http.post(\"/Execute/UAP_GetTags\").success(function (data) {\r\n $scope.Tags = data.RS_0;\r\n });\r\n }\r\n $scope.EditTag = function (tag) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditTag.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, items) {\r\n if (items.Tag) {\r\n $scope.Tag = items.Tag;\r\n $scope.EditSort = function (tag) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/SortProductsByTag.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Tag = items.Tag;\r\n //console.log($scope.Tag)\r\n $http.post('/Execute/GetProductsByTag', [$scope.Tag.Id]).success(function (data) {\r\n $scope.Products = data.RS_0;\r\n });\r\n $scope.cancel = function () {\r\n $uibModalInstance.close(false);\r\n };\r\n $scope.save = function (lst, idx) {\r\n if (idx < lst.length) {\r\n //console.log([lst[idx].Id, $scope.Tag.Id, idx + 1])\r\n $http.post('/Execute/UpdateProductTagSort', [lst[idx].Id, $scope.Tag.Id, idx + 1]).success(function (data) {\r\n if (data.RS_0[0].Result == 'OK') {\r\n if (idx + 1 == lst.length) {\r\n $uibModalInstance.close(false);\r\n }\r\n else {\r\n $scope.save(lst, idx + 1);\r\n }\r\n }\r\n });\r\n }\r\n };\r\n },\r\n resolve: { items: function () { return { Tag: tag } } }\r\n });\r\n }\r\n } else {\r\n $scope.Tag = { \"Id\": 0, \"Name\": \"\", \"Description\": \"\", \"Icon\": \"\" };\r\n }\r\n $scope.Cancel = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.SaveTag = function () {\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n //console.log($scope.Tag);\r\n $http.post(\"SaveProductTag\", $scope.Tag).success(function (data) {\r\n //console.log(data)\r\n $uibModalInstance.close($scope.Tag);\r\n });\r\n } else {\r\n var HeadingText = \"Invalid Tag\";\r\n var mi = $uibModal.open({\r\n templateUrl: '/js/Dashboard/templates/Warning-modal.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Tag: tag } } }\r\n });\r\n mi.result.then(function (tag) {\r\n if (tag) {\r\n $scope.LoadTags();\r\n }\r\n });\r\n }\r\n $scope.DeleteTag = function (id) {\r\n $http.post(\"/Execute/DeleteProductTag\", [id]).success(function (d) {\r\n $scope.LoadTags();\r\n }).error(function (err) {\r\n alert(err)\r\n });\r\n }\r\n $scope.DeleteTaxRate = function (id) {\r\n $http.post(\"/Execute/DeleteTaxRate\", [id]).success(function (d) {\r\n $scope.LoadRates();\r\n }).error(function (err) {\r\n alert(err)\r\n });\r\n }\r\n $scope.EditDiscount = function (disc) {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditDiscount.htm',\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, $filter, items) {\r\n $scope.Products = items.Products;\r\n //console.log(items.Discount);\r\n if (items.Discount) {\r\n //items.Discount.ProductId = parseInt(items.Discount.ProductId);\r\n if (isNaN(items.Discount.ProductId)) { items.Discount.ProductId = \"0\" }\r\n $scope.Discount = items.Discount;\r\n\r\n $scope.Discount.Expires = new Date($scope.Discount.Expires)\r\n $scope.Discount.IsProductSecific = parseInt($scope.Discount.ProductId) > 0;\r\n } else {\r\n $scope.Discount = { \"Id\": 0, \"Code\": \"\", \"Name\": \"\", \"Description\": \"\", \"DiscountType\": 1, \"Value\": 0.0, \"Expires\": null, \"MinimumAmount\": 0.0, \"MaximumAmount\": 0.0, \"UseLimit\": 0, \"SalesForceReferenceId\": \"\", \"ProductId\": \"0\", \"IsProductSecific\": false };\r\n }\r\n $scope.Cancel = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.SaveDiscount = function () {\r\n\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n\r\n //$scope.Discount = JSON.stringify($scope.Discount)\r\n //console.log($scope.Discount);\r\n $http.post(\"SaveProductDiscount\", $scope.Discount).success(function (data) {\r\n //console.log(data)\r\n $uibModalInstance.close($scope.Discount);\r\n }).error(function (err) {\r\n //console.log(err)\r\n });\r\n } else {\r\n var HeadingText = \"Invalid Discount\";\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/Warning-modal.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Discount: disc, Products: $scope.Products } } }\r\n });\r\n mi.result.then(function (disc) {\r\n if (disc) {\r\n $scope.LoadDiscounts();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n })\r\n .directive('usersale', function ($parse, $http, $compile, $window, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/administration/UserSale.html',\r\n scope: { user: '=?' },\r\n controller: function ($scope) {\r\n $scope.LoaDing = true;\r\n $scope.IsExpired = function (exp) {\r\n if (exp) {\r\n var expArr = exp.split('/');\r\n var now = new Date();\r\n var disMonth = new Date(now.getFullYear(), now.getMonth(), 1);\r\n var expD = new Date(expArr[1], (expArr[0] - 1), 1);\r\n return (expD < disMonth);\r\n } else {\r\n return false;\r\n }\r\n }\r\n $scope.ProductSelected = function (prd) {\r\n if (prd) {\r\n //console.log(prd);\r\n }\r\n }\r\n $scope.$on('TransactionPayment', function (evt, id) {\r\n $scope.PaymentOption = id;\r\n $scope.ValidateOrder()\r\n })\r\n $scope.$on('TransactionPaymentExp', function (evt, exp) {\r\n if ($scope.IsExpired(exp)) {\r\n $scope.PaymentExpired = true;\r\n } else {\r\n $scope.PaymentExpired = false;\r\n }\r\n })\r\n $scope.ValidateOrder = function (fn) {\r\n $scope.LoaDing = true;\r\n var itemIds = [];\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n itemIds.push(itm.Id.toString());\r\n });\r\n var optionIds = $scope.Cart.SelectedModifiers.join(',');\r\n var discCode = '';\r\n if ($scope.Discount) {\r\n discCode = $scope.Discount.Code;\r\n }\r\n var po = 0\r\n if ($scope.PaymentOption) {\r\n po = $scope.PaymentOption;\r\n }\r\n //console.log([(typeof ($scope.User.UserId) == 'undefined') ? \"0\" : $scope.User.UserId, po, itemIds.join(\",\"), discCode, optionIds])\r\n $http.post(\"/Execute/ValidateOrder\", [(typeof ($scope.User.UserId) == 'undefined') ? \"0\" : $scope.User.UserId, po, itemIds.join(\",\"), discCode, optionIds]).success(function (data) { // Last param = OptionIds\r\n\r\n $scope.Cart.ItemsRemoved = false;\r\n $scope.Cart.DiscountTotal = parseFloat(0.0);\r\n var owned = data.RS_0\r\n angular.forEach(owned, function (itm) {\r\n if (itm.AlreadyHas != \"\" && itm.AlreadyHas != null) {\r\n angular.forEach($scope.Cart.Items, function (cItem) {\r\n if (cItem.Id == itm.ProductId) {\r\n cItem.Price = 0\r\n cItem.Discount = 0\r\n cItem.AlreadyHas = true;\r\n $scope.Cart.ItemsRemoved = true;\r\n }\r\n });\r\n } else {\r\n angular.forEach($scope.Cart.Items, function (cItem) {\r\n if (cItem.Id == itm.ProductId) {\r\n cItem.Price = itm.Price\r\n cItem.Discount = parseFloat(itm.Discount)\r\n\r\n if ($scope.Cart.NoDiscount) {\r\n $scope.Cart.DiscountTotal = 0;\r\n } else {\r\n $scope.Cart.DiscountTotal += cItem.Discount\r\n }\r\n }\r\n });\r\n }\r\n });\r\n CalculateCart($scope);\r\n\r\n if ($scope.Cart.TotalPrice > 0) {\r\n if (po != 0) {\r\n $scope.IsValid = true;\r\n }\r\n else {\r\n $scope.IsValid = false;\r\n }\r\n } else {\r\n if ($scope.Cart.Items.length > 0) {\r\n $scope.IsValid = true;\r\n }\r\n else {\r\n $scope.IsValid = false;\r\n }\r\n\r\n }\r\n if (fn) {\r\n fn();\r\n }\r\n $scope.LoaDing = false;\r\n });\r\n }\r\n $scope.LookupCode = function (code) {\r\n delete $scope.Discount;\r\n delete $scope.InvalidDiscount;\r\n $http.post(\"/Execute/GetDiscountByCode\", [code]).success(function (data) {\r\n //console.log(data)\r\n if (data.RS_0[0]) {\r\n $scope.CartRev = angular.copy($scope.Cart);\r\n $scope.Discount = data.RS_0[0];\r\n $scope.Discount.Expires = new Date($scope.Discount.Expires)\r\n var dt = new Date()\r\n $scope.Discount.HasExpired = (dt > $scope.Discount.Expires);\r\n $scope.Discount.UsedUp = ($scope.Discount.UsedUp == \"1\")\r\n } else {\r\n $scope.InvalidDiscount = true;\r\n }\r\n $scope.ValidateOrder();\r\n });\r\n }\r\n $scope.RemoveItem = function (idx) {\r\n $scope.Cart.Items.splice(idx, 1);\r\n $scope.ValidateOrder()\r\n }\r\n $scope.AddToOrder = function (prd) {\r\n if (prd) {\r\n prd.HasProduct = '1'\r\n try {\r\n $scope.Cart.Items.push(prd);\r\n }\r\n catch (e) {\r\n\r\n }\r\n $scope.ValidateOrder()\r\n }\r\n }\r\n $scope.ProcessingOrder = false;\r\n $scope.ProcessOrder = function () {\r\n $scope.ProcessingOrder = true;\r\n var discCode = '';\r\n var SOBid = '';\r\n if ($scope.Discount) {\r\n discCode = $scope.Discount.Code;\r\n SOBid = $scope.Discount.SalesForceReferenceId\r\n }\r\n var po = 0\r\n if ($scope.PaymentOption) {\r\n po = $scope.PaymentOption;\r\n }\r\n var optionIds = $scope.Cart.SelectedModifiers.join(',');\r\n var order = { PaymentOptionId: po, Items: $scope.Cart.Items, DiscountCode: discCode, SOB: SOBid, OptionIds: optionIds, UserId: $scope.User.UserId }; // OptionIds: Comma delimited string of IDs\r\n //console.log(JSON.stringify(order));\r\n if ($scope.IsValid = true) {\r\n $scope.Wait = true;\r\n $http.post(\"/ProcessOrder\", order).success(function (data) {\r\n $scope.ProcessResult = data;\r\n $scope.Wait = false;\r\n if (data.ResultMessage == \"APPROVAL\" || data.ResultMessage == \"SUCCESS\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n $scope.ProcessingOrder = false;\r\n swal({\r\n title: \"Transaction complete!\",\r\n text: \"Order has been completed.\",\r\n type: \"success\",\r\n closeOnConfirm: true\r\n });\r\n } else {\r\n $scope.ProcessingOrder = false;\r\n swal({\r\n title: \"Transaction incomplete!\",\r\n text: \"Something happened while processing your order. Please check your payment information and try again.\",\r\n type: \"warning\",\r\n closeOnConfirm: true\r\n });\r\n }\r\n });\r\n }\r\n }\r\n $scope.OptionSelected = function (mod) {\r\n //console.log(mod)\r\n $scope.Cart.SelectedModifiers = []\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Modifiers.length > 0) {\r\n angular.forEach(itm.Modifiers, function (m) {\r\n $scope.Cart.SelectedModifiers.push(m.SelectedOption);\r\n });\r\n }\r\n\r\n });\r\n $scope.ValidateOrder()\r\n //console.log($scope.Cart)\r\n }\r\n $scope.$watch('user', function (n, o) {\r\n $scope.LoaDing = true;\r\n $scope.Cart = { Items: [], SelectedModifiers: [] };\r\n if ($scope.user) {\r\n $scope.LoaDing = true;\r\n $http.post(\"/GetUser\", [$scope.user.Username]).success(function (u) {\r\n $scope.User = u\r\n $http.post(\"/Execute/GetProductsForUserSale\", [$scope.user.UserID]).success(function (data) {\r\n $scope.Products = data.RS_0;\r\n angular.forEach($scope.Products, function (p) {\r\n p.Modifiers = JSON.parse(p.Modifiers)\r\n if (p.Modifiers.length > 0) {\r\n angular.forEach(p.Modifiers, function (m) {\r\n angular.forEach(m.Options, function (o) {\r\n o.Selected = false;\r\n });\r\n if (m.Options.length > 0) {\r\n m.SelectedOption = m.Options[0].Id;\r\n }\r\n })\r\n }\r\n });\r\n $scope.LoaDing = false;\r\n });\r\n });\r\n } else {\r\n $scope.User = $rootScope.User\r\n }\r\n });\r\n //$scope.LoaDing = false;\r\n }\r\n }\r\n })\r\n .directive('globalsettings', function($parse,$http,$compile,$window,$sce) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/GlobalSettings.html',\r\n controller: function($scope, $rootScope, $http, $compile, $stateParams, $filter, $timeout, $location, $state, toastr, toastrConfig, ngIntroService, $templateCache) {\r\n //$scope.ManipGlobalSettings = $rootScope.GlobalSettings;\r\n var OrigGlobalSettings;\r\n $scope.LoadGlobalSettings = function() {\r\n $http.get(\"/GlobalSettings\").success(function(data){\r\n OrigGlobalSettings = data;\r\n $scope.ManipGlobalSettings = data;\r\n })\r\n }\r\n $scope.SaveGlobalSettings = function(gs) {\r\n $http.post('/GlobalSettings', gs).success(function(data) {\r\n $http.get('/GlobalSettings').success(function(data2){\r\n swal('Global App Settings Saved.')\r\n $rootScope.GlobalSettings = data2;\r\n $rootScope.$apply();\r\n\r\n })\r\n })\r\n }\r\n $scope.ResetGlobalSettings = function() {\r\n $scope.LoadGlobalSettings();\r\n }\r\n $scope.textAreaSetup = function ($element) {\r\n $compile($element.contents())($scope);\r\n };\r\n $scope.LoadGlobalSettings();\r\n }\r\n }\r\n })\r\n .directive('usermanager', function ($parse, $http, $compile, $window) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/UserManager.htm',\r\n scope: {restricted:'=?'},\r\n controller: function ($scope) {\r\n $scope.status = {};\r\n $scope.status.isFirstOpen = true;\r\n $scope.IsEditingUser = false;\r\n $scope.IsMakingSale = false;\r\n /*$scope.ReloadUser = function(oldUser) {\r\n\r\n }*/\r\n $scope.EditUser = function (user) {\r\n $scope.IsEditingUser = true;\r\n $scope.SelectedUser = user;\r\n $scope.$apply();\r\n };\r\n $scope.AddOrder = function (user) {\r\n $scope.IsMakingSale = true;\r\n $scope.SelectedUser = user;\r\n };\r\n $scope.Impersonate = function (user) {\r\n $window.location.href = \"/Impersonate/\" + user.Username\r\n };\r\n $scope.SaveUser = function (user) {\r\n $scope.IsEditingUser = false;\r\n }\r\n $scope.PremiumFilters = [{ Val: \"\", Name: \"Not Filtered\" }, { Val: \"Premium\", Name: \"Premium\" }, { Val: \"Expired\", Name: \"Expired\" }, { Val: \"Never\", Name: \"Never\" }];\r\n $scope.AuthorizationFilters = [{ Id: -1, Name: \"Not Filtered\" }, { Id: 0, Name: \"Unauthorized\" }, { Id: 1, Name: \"Authorized\" }];\r\n $scope.SelectedAuthFilter = $scope.AuthorizationFilters[0];\r\n $scope.SelectedPremFilter = $scope.PremiumFilters[0];\r\n $http.post(\"/Execute/GetInstitutions\").success(function (data) {\r\n $scope.Institutions = data.RS_0;\r\n $scope.Institutions.unshift({ Id: 0, Name: \"Retail\" });\r\n $scope.Institutions.unshift({ Id: -1, Name: \"Not Filtered\" });\r\n $scope.SelectedIntitution = $scope.Institutions[0];\r\n });\r\n $scope.UserFilter = {\r\n Username: '',\r\n FirstName: '',\r\n LastName: '',\r\n Email: '',\r\n DisplayName: '',\r\n IntitutionId: -1,\r\n Authorized: -1,\r\n IsPremium: ''\r\n };\r\n $scope.MasterFilter = angular.copy($scope.UserFilter);\r\n $scope.InstitutionChanged = function (i) {\r\n ////console.log(i);\r\n $scope.UserFilter.IntitutionId = i.Id;\r\n $scope.GetUsers();\r\n }\r\n $scope.AuthFilterChanged = function (o) {\r\n $scope.UserFilter.Authorized = o.Id\r\n $scope.GetUsers();\r\n }\r\n $scope.PremFilterChanged = function (o) {\r\n $scope.UserFilter.IsPremium = o.Val\r\n $scope.GetUsers();\r\n }\r\n $scope.ClearFilter = function (r) {\r\n $scope.UserFilter = {\r\n Username: '',\r\n FirstName: '',\r\n LastName: '',\r\n Email: '',\r\n DisplayName: '',\r\n IntitutionId: -1,\r\n Authorized: -1,\r\n IsPremium: ''\r\n };\r\n //if ($scope.Institutions) {\r\n\r\n //}\r\n //try{\r\n // $scope.SelectedIntitution = $scope.Institutions[0];\r\n //}\r\n //catch (e) {\r\n // //console.log(e);\r\n //}\r\n $scope.SelectedAuthFilter = $scope.AuthorizationFilters[0];\r\n ////console.log($scope.SelectedAuthFilter)\r\n $(\"#authfilterddl\").val(\"-1\");\r\n $(\"#premfilterddl\").val(\"\");\r\n $(\"#instfilterddl\").val(\"-1\");\r\n if (r == true) {\r\n try {\r\n //$scope.$apply();\r\n }\r\n catch (e) { }\r\n $scope.GetUsers();\r\n }\r\n }\r\n $scope.ClearFilter();\r\n $scope.SortBy = 'Username';\r\n $scope.CurrentPage = 1;\r\n $scope.TotalPages = 1;\r\n $scope.TotalCount = 1;\r\n $scope.PageSize = 100;\r\n $scope.$watch(\"SortBy\", function (o) {\r\n $scope.GetUsers();\r\n ////console.log($scope.SortBy);\r\n });\r\n $scope.$watch(\"CurrentPage\", function (o) {\r\n $scope.GetUsers();\r\n ////console.log($scope.SortBy);\r\n });\r\n\r\n $scope.GetUsers = function () {\r\n var p = [$scope.SortBy, $scope.UserFilter.Username, $scope.UserFilter.FirstName, $scope.UserFilter.LastName, $scope.UserFilter.Email, $scope.UserFilter.DisplayName, $scope.UserFilter.IntitutionId, $scope.UserFilter.Authorized, $scope.UserFilter.IsPremium, $scope.CurrentPage, $scope.PageSize]\r\n ////console.log(p)\r\n $http.post(\"/Execute/GetUserList\", p).success(function (data) {\r\n $scope.UserList = data.RS_0;\r\n angular.forEach($scope.UserList, function (u) {\r\n ////console.log(u);\r\n // if (u.ExpiryDate) {\r\n // u.ExpiryDate = new Date(ExpiryDate + ' GMT')\r\n // }\r\n });\r\n $scope.TotalPages = data.RS_1[0].TotalPages;\r\n $scope.TotalCount = data.RS_1[0].TotalCount;\r\n });\r\n }\r\n //$scope.GetUsers();\r\n\r\n }\r\n }\r\n })\r\n .directive('institutionlist', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/InstitutionList.htm',\r\n scope: {},\r\n controller: function ($scope, $http) {\r\n $scope.fltr = { Inactive: false, Name: '' };\r\n $scope.txtfltr = '';\r\n $http.post(\"/Execute/GetInstitutions\").success(function (data) {\r\n $scope.Institutions = data.RS_0;\r\n angular.forEach($scope.Institutions, function (i) {\r\n i.Inactive = (i.Inactive == \"True\");\r\n i.InactiveT = i.Inactive;\r\n i.ImpersonateEmail = (i.ImpersonateEmail == \"True\");\r\n })\r\n $scope.Classifications = data.RS_1;\r\n });\r\n }\r\n }\r\n })\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('administration', {\r\n url: '/administration',\r\n templateUrl: 'app/pages/administration/administrator.html',\r\n title: 'Administration',\r\n sidebarMeta: {\r\n icon: 'ion-settings',\r\n order: 4,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n });\r\n }\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.staff', [])\r\n .controller('StaffCtrl', function ($scope, $rootScope, $http, $stateParams, $uibModal, $compile, $window, $location, $filter, baConfig, User, layoutPaths, toastr, toastrConfig) {\r\n $scope.HashyMcHashface = $location.hash() || 0;\r\n $scope.IntegeredHash = 1*$scope.HashyMcHashface;\r\n $scope.TabsetGlob = {};\r\n $scope.TabsetGlob.Active = $scope.IntegeredHash;\r\n ////console.log($rootScope.User)\r\n $scope.UserName = $rootScope.User.UserName;\r\n $scope.LoadDiscounts = function () {\r\n $http.post(\"/Execute/GetProductDiscounts\").success(function (data) {\r\n $scope.Discounts = data.RS_0;\r\n });\r\n }\r\n $scope.EditDiscount = function (disc) { \r\n //console.log(disc)\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/EditDiscount.htm',\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, $filter, items) {\r\n $scope.Products = items.Products;\r\n //console.log(items.Discount);\r\n if (items.Discount) {\r\n //items.Discount.ProductId = parseInt(items.Discount.ProductId);\r\n if (isNaN(items.Discount.ProductId)) { items.Discount.ProductId = \"0\" }\r\n $scope.Discount = items.Discount;\r\n\r\n $scope.Discount.Expires = new Date($scope.Discount.Expires)\r\n $scope.Discount.IsProductSecific = parseInt($scope.Discount.ProductId) > 0;\r\n } else {\r\n $scope.Discount = { \"Id\": 0, \"Code\": \"\", \"Name\": \"\", \"Description\": \"\", \"DiscountType\": 1, \"Value\": 0.0, \"Expires\": null, \"MinimumAmount\": 0.0, \"MaximumAmount\": 0.0, \"UseLimit\": 0, \"SalesForceReferenceId\": \"\", \"ProductId\": \"0\", \"IsProductSecific\": false };\r\n }\r\n $scope.Cancel = function () {\r\n $uibModalInstance.close();\r\n }\r\n $scope.SaveDiscount = function () {\r\n\r\n var validationText = \"\";\r\n if (validationText == \"\") {\r\n\r\n //$scope.Discount = JSON.stringify($scope.Discount)\r\n //console.log($scope.Discount);\r\n $http.post(\"SaveProductDiscount\", $scope.Discount).success(function (data) {\r\n //console.log(data)\r\n $uibModalInstance.close($scope.Discount);\r\n }).error(function (err) {\r\n //console.log(err)\r\n });\r\n } else {\r\n var HeadingText = \"Invalid Discount\";\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/productmanager/Warning-modal.htm',\r\n windowClass: 'confirm',\r\n size: 'sm',\r\n backdrop: \"static\",\r\n controller: function ($scope, $sce, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Heading = items.Heading;\r\n $scope.Message = $sce.trustAsHtml(items.Message)\r\n $scope.cancel = function () {\r\n $uibModalInstance.close();\r\n };\r\n },\r\n resolve: { items: function () { return { Message: validationText, Heading: HeadingText } } }\r\n });\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { Discount: disc, Products: $scope.Products } } }\r\n });\r\n mi.result.then(function (disc) {\r\n if (disc) {\r\n $scope.LoadDiscounts();\r\n }\r\n });\r\n }\r\n })\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('staff', {\r\n url: '/staff',\r\n templateUrl: 'app/pages/administration/staff.html',\r\n title: 'Administration',\r\n controller: 'StaffCtrl',\r\n sidebarMeta: {\r\n icon: 'ion-settings',\r\n order: 5,\r\n secure: { Allow: [\"Platform Admin\"] }\r\n },\r\n })\r\n .state('sales', {\r\n url: '/sales',\r\n templateUrl: 'app/pages/administration/sales.html',\r\n title: 'Administration',\r\n controller: 'StaffCtrl',\r\n sidebarMeta: {\r\n icon: 'ion-settings',\r\n order: 5,\r\n secure: { Allow: [\"Sales\"] }\r\n },\r\n });\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.assessment', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('assessment', {\r\n url: '/assessment/:Id',\r\n templateUrl: 'app/pages/assessment/assessment.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.IsCustom = false;\r\n }\r\n })\r\n .state('customassessment', {\r\n url: '/customassessment/:Id',\r\n templateUrl: 'app/pages/assessment/assessment.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.IsCustom = true;\r\n }\r\n })\r\n .state('questionpool', {\r\n url: '/QuestionPool/:Id/:CourseId/:ChapterId/:TopicId',\r\n templateUrl: 'app/pages/assessment/questionpool.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.ChapterId = $stateParams.ChapterId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n //$scope.SelectedTab = 0;\r\n }\r\n })\r\n .state('questionpooltabs', {\r\n url: '/QuestionPool/:Id/:CourseId/:ChapterId/:TopicId/:SelectedTab',\r\n templateUrl: 'app/pages/assessment/questionpool.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.ChapterId = $stateParams.ChapterId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n $scope.SelectedTab = $stateParams.SelectedTab;\r\n }\r\n })\r\n .state('customassessmenthistory', {\r\n url: '/AssessmentHistory/:Id',\r\n templateUrl: 'app/pages/assessment/assessmenthistory.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.CourseId = 0;\r\n $scope.ChapterId = 0;\r\n $scope.TopicId = 0;\r\n $scope.IsCustom = true;\r\n }\r\n })\r\n .state('assessmenthistory', {\r\n url: '/AssessmentHistory/:Id/:CourseId/:ChapterId/:TopicId',\r\n templateUrl: 'app/pages/assessment/assessmenthistory.html',\r\n title: 'Assessment',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.ChapterId = $stateParams.ChapterId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n }\r\n })\r\n .state('prescription', {\r\n url: '/prescription/:Id',\r\n templateUrl: 'app/pages/assessment/prescription.htm',\r\n title: 'Prescription',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.User = $stateParams.User;\r\n $scope.topdeets = true;\r\n //console.log($scope.Id)\r\n }\r\n })\r\n .state('customprescription', {\r\n url: '/customscrip/:Id',\r\n templateUrl: 'app/pages/assessment/prescription.htm',\r\n title: 'Prescription',\r\n controller: function ($scope, $rootScope, $http, $location, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.topdeets = true;\r\n $scope.IsCustom = true;\r\n }\r\n })\r\n \r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 08/23/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.assets', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('assets', {\r\n url: '/assets',\r\n title: 'My Assets',\r\n templateUrl: '/app/pages/assets/assets.html',\r\n sidebarMeta: {\r\n icon: 'ion-ios-book',\r\n order: 400,\r\n secure: {Allow: [\"Learner\",\"Program Manager\"]}\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.User = $rootScope.User;\r\n }\r\n });\r\n }\r\n})();\n\r\n(function () {\r\n 'use strict';\r\n\r\n\r\n\r\n angular.module('BlurAdmin.pages.assignments', [])\r\n .directive('assigneesDropdown', function () {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/pages/assignments/assignees-ddl.html',\r\n scope: {\r\n source: '=',\r\n classes: '=',\r\n sameassignee: '='\r\n },\r\n controller: function ($scope, $rootScope, $filter) {\r\n $scope.AssignableStudents = []\r\n $scope.classFilterList = []\r\n //$scope.classFilter = ''\r\n $scope.Selected = false\r\n $scope.contentfilter = ''\r\n $scope.totalsel = 0;\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.$watch('source', function (o) {\r\n if ($scope.source) {\r\n //////console.log($scope.source)\r\n //$scope.sources = function (src) {\r\n // return $rootScope.InstitutionSettings.InactiveClasses.indexOf(src.Name) !== 1;\r\n //}\r\n \r\n \r\n \r\n if ($scope.sameassignee == true) {\r\n $scope.sourceFiltered = $scope.source\r\n $scope.TotalCount = $scope.source.length\r\n }\r\n if ($scope.sameassignee == false) {\r\n if ($scope.source.Students.length == 0) {\r\n angular.forEach($rootScope.Students, function (student) {\r\n //////console.log(student)\r\n $scope.source.Students.push({\r\n FirstName: student.FirstName,\r\n LastName: student.LastName,\r\n Selected: student.Selected,\r\n ClassName: student.ClassName,\r\n UserID: student.UserID\r\n\r\n })\r\n })\r\n }\r\n $scope.TotalCount = $scope.source.Students.length\r\n //////console.log($scope.source)\r\n $scope.sourceFiltered = $scope.source.Students\r\n //////console.log($scope.sourceFiltered)\r\n }\r\n \r\n }\r\n });\r\n $scope.$watch('classes', function (c) {\r\n ////console.log(c)\r\n if ($scope.classes) {\r\n if ($scope.classes[0].Name !== 'All') {\r\n angular.forEach(c, function (cl) {\r\n if (cl.Class) {\r\n cl.Name = cl.Class\r\n }\r\n })\r\n\r\n $scope.classes.unshift({\r\n Name: 'All',\r\n Class: ''\r\n })\r\n\r\n\r\n }\r\n $scope.classFilter = $scope.classes[0].Class\r\n }\r\n })\r\n \r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.totalSelected = function () {\r\n $scope.totalsel = 0\r\n angular.forEach($scope.sourceFiltered, function (stu) {\r\n if (stu.Selected == true) {\r\n $scope.totalsel++\r\n }\r\n })\r\n }\r\n // $scope.filterlist = $scope.contentFilterList[0].Value\r\n \r\n $scope.filterselect = function (field, val) {\r\n\r\n $scope.sourceFiltered = $filter('filter')($scope.source, { field: val })\r\n if ($scope.TotalCount !== $scope.sourceFiltered.length) {\r\n $scope.amSelected = false\r\n }\r\n $scope.TotalCount = $scope.sourceFiltered.length\r\n }\r\n $scope.updateTotalCount = function (filtered) {\r\n \r\n if ($scope.TotalCount !== filtered.length) {\r\n ////console.log(filtered.length, $scope.TotalCount)\r\n $scope.amSelected = false\r\n }\r\n $scope.TotalCount = filtered.length\r\n ////console.log(filtered)\r\n }\r\n $scope.sortProperty = 'Class'\r\n $scope.reverse = false\r\n $scope.SortBy = function (property) {\r\n $scope.reverse = !$scope.reverse\r\n $scope.sortProperty = property\r\n $scope.sourceFiltered = $filter('orderBy')($scope.sourceFiltered, $scope.sortProperty, $scope.reverse)\r\n\r\n //////console.log($scope.sortProperty)\r\n }\r\n $scope.totalsel = 0\r\n //$scope.SelectStudent = function (filter) {\r\n \r\n // angular.forEach(filter, function (stu) {\r\n // if (stu.Selected == true) {\r\n // $scope.totalsel++\r\n // }\r\n // })\r\n //}\r\n \r\n //$scope.SelectStudent = function (cls, student) {\r\n // //////console.log(cls, student)\r\n // //if (student.Selected == false) {\r\n // // cls.Selected = false;\r\n // //}\r\n // cls.Selected = true;\r\n // angular.forEach(cls.Students, function (c) {\r\n // if (c.Selected == false) {\r\n // cls.Selected = false\r\n // } \r\n // })\r\n \r\n //};\r\n //////////console.log($scope.source)\r\n //////////console.log($scope.source)\r\n $scope.toggle = -1;\r\n $scope.toggleList = function (list) {\r\n ////////console.log(list + ', ' + $scope.toggle)\r\n if ($scope.toggle == list) {\r\n $scope.toggle = -1;\r\n }\r\n else {\r\n $scope.toggle = list;\r\n }\r\n \r\n }\r\n $scope.killList = function(list) {\r\n $scope.toggle = -1;\r\n }\r\n //////////console.log($rootScope.InstitutionSettings)\r\n $scope.IsOn = true;\r\n $scope.SelectAll = function (students, selected) {\r\n \r\n angular.forEach(students, function (a) {\r\n if (selected == true) {\r\n a.Selected = true\r\n }\r\n if (selected == false) {\r\n a.Selected = false\r\n }\r\n \r\n })\r\n //$scope.SelectStudent(students)\r\n //////console.log(students, selected)\r\n }\r\n }\r\n \r\n };\r\n })\r\n .controller('AssignmentCtrl', function ($scope, $rootScope, $http, $stateParams, $window, $filter, $location, $timeout, baConfig, User, layoutPaths, toastr, toastrConfig) {\r\n $scope.loaderizing = true;\r\n var a = this;\r\n var openedToasts = [];\r\n $scope.Editing = false;\r\n $scope.IdArray = [];\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n extraData: $rootScope.msg,\r\n });\r\n ////////console.log($rootScope.User.InstitutionId)\r\n $scope.FillDueDateDown = function (obj) {\r\n angular.forEach(obj.Assessments, function (a) {\r\n a.DueDate = obj.DueDate;\r\n });\r\n };\r\n $scope.FillEffectiveDateDown = function (obj) {\r\n angular.forEach(obj.Assessments, function (a) {\r\n a.EffectiveDate = obj.EffectiveDate;\r\n });\r\n };\r\n $scope.toggleList = function (list, assessment) {\r\n ////////console.log(list + ', ' + $scope.toggle)\r\n if ($scope.toggle == list) {\r\n $scope.toggle = -1;\r\n }\r\n else {\r\n $scope.toggle = list;\r\n }\r\n ////console.log(list)\r\n }\r\n $scope.killList = function(list){\r\n $scope.toggle = -1;\r\n }\r\n $scope.filterqueue = [];\r\n $scope.reverse = false\r\n $scope.SortBy = function (property) {\r\n $scope.reverse = !$scope.reverse\r\n $scope.sortProperty = property\r\n $scope.AssignmentQueue = $filter('orderBy')($scope.AssignmentQueue, $scope.sortProperty, $scope.reverse)\r\n\r\n ////console.log($scope.sortProperty)\r\n }\r\n $scope.PageSizzes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.SelectClass = function (cls) {\r\n angular.forEach(cls.Students, function (stu) {\r\n if (cls.Selected == true) {\r\n stu.Selected = true\r\n }\r\n if (cls.Selected == false) {\r\n stu.Selected = false;\r\n }\r\n })\r\n }\r\n $scope.$watch('classes', function (c) {\r\n ////console.log(c)\r\n if ($scope.classes) {\r\n if ($scope.classes[0].Name !== 'All') {\r\n angular.forEach(c, function (cl) {\r\n if (cl.Class) {\r\n cl.Name = cl.Class\r\n }\r\n })\r\n\r\n $scope.classes.unshift({\r\n Name: 'All',\r\n Class: ''\r\n })\r\n }\r\n \r\n }\r\n })\r\n $scope.SetSameAssignees = function (v) {\r\n $scope.SameAssignees = v;\r\n };\r\n $scope.SetSingleDueDate = function (v) {\r\n $scope.SingleDueDate = v;\r\n if(v==true){\r\n $scope.DueDate = (new Date()).addDays(30);\r\n }\r\n };\r\n $scope.SetSingleEffDate = function (v) {\r\n $scope.SingleEffDate = v;\r\n if(v==true){\r\n $scope.EffectiveDate = new Date();\r\n }\r\n\r\n };\r\n $scope.SetSpecifyEffective = function(v) {\r\n $scope.SpecifyEffective = v;\r\n if(v==false){\r\n $scope.EffectiveDate = new Date();\r\n }\r\n }\r\n $scope.SetSameScore = function(v){\r\n\r\n }\r\n $scope.SetDisplayPracticeReview = function (v) {\r\n $scope.DisplayPracticeReview = v;\r\n }\r\n $scope.SetAssessmentViewablity = function (v) {\r\n $scope.AssessmentViewablity = v;\r\n }\r\n $scope.SetDisplayPrescription = function (v) {\r\n $scope.DisplayPrescription = v;\r\n }\r\n $scope.SetShowLeaderBoard = function (v) {\r\n $scope.ShowLeaderBoard = v;\r\n }\r\n $scope.SetNotifyNewAssignment = function (v) {\r\n $scope.NotifyNewAssignment = v;\r\n }\r\n $scope.SetNotifyUpdatedAssignment = function (v) {\r\n $scope.NotifyUpdatedAssignment = v;\r\n }\r\n $scope.SetReminderIncomplete = function (v) {\r\n $scope.ReminderIncomplete = v;\r\n }\r\n $scope.SetSendReminderHours = function (v) {\r\n $scope.SendReminderHours = v;\r\n }\r\n $scope.SetSendIncompletePending = function (v) {\r\n $scope.SendIncompletePending = v;\r\n if (v == false || v == 0) {\r\n var k = '';\r\n $scope.SetPendingEmails(k);\r\n //////console.log($scope.PendingEmails)\r\n }\r\n ////////console.log($scope.SendIncompletePending)\r\n }\r\n $scope.SetSendPendingHours = function (v) {\r\n $scope.SendPendingHours = v;\r\n ////////console.log($scope.SendPendingHours)\r\n }\r\n $scope.SetPendingEmails = function (v) {\r\n $scope.PendingEmails = v;\r\n }\r\n $scope.SetDueEmails = function (v) {\r\n $scope.DueEmails = v;\r\n }\r\n $scope.SetSendCompleted = function (v) {\r\n $scope.SendCompleted = v;\r\n }\r\n $scope.SetCompleteEmails = function (v) {\r\n $scope.CompleteEmails = v;\r\n }\r\n $scope.SetSendDue = function (v) {\r\n $scope.SendDue = v;\r\n }\r\n $scope.SetTimeLimit = function (v) {\r\n $scope.TimeLimit = v;\r\n }\r\n $scope.SetLimitTries = function (v) {\r\n $scope.LimitTries = v;\r\n }\r\n $scope.SetMinutesAllocated = function (v) {\r\n if (isNaN(v)) {\r\n $scope.MinutesAllocated = 0;\r\n //$scope.$apply();\r\n } else {\r\n $scope.MinutesAllocated = v;\r\n }\r\n\r\n }\r\n $scope.SetNumTries = function (v) {\r\n if (isNaN(v)) {\r\n $scope.NumTries = 0;\r\n //$scope.$apply();\r\n } else {\r\n $scope.NumTries = v;\r\n }\r\n }\r\n $scope.CheckValid = function (from, to) {\r\n var retval;\r\n ////console.log(from, to)\r\n if (from !== to) {\r\n switch (from) {\r\n case 0:\r\n $scope.AssessmentArray = [];\r\n angular.forEach($scope.Curricula, function (cur) {\r\n angular.forEach(cur.Courses, function (crs) {\r\n angular.forEach(crs.Assessments, function (ass) {\r\n if (ass.Selected) {\r\n $scope.AssessmentArray.push(ass);\r\n }\r\n });\r\n });\r\n });\r\n retval = true;\r\n if ($scope.AssessmentArray.length > 0 === false) {\r\n toastr['error']('You Must Select at least 1 Assessment/Exam');\r\n retval = false;\r\n }\r\n //////////console.log($scope.SingleDueDate);\r\n var now = new Date();\r\n \r\n if ($scope.SingleDueDate && $scope.SingleDueDate && $scope.EffectiveDate > $scope.DueDate) {\r\n toastr['error']('Due Date cannot be set before Effective Date');\r\n retval = false;\r\n }\r\n if ($scope.SingleDueDate && !$scope.SingleDueDate) {\r\n angular.forEach($scope.AssessmentArray, function (a) {\r\n if ($scope.EffectiveDate > a.DueDate) {\r\n toastr['error']('Invalid Due Date for ' + a.Name + '. Due Date may not come before the Effective Date.');\r\n retval = false;\r\n }\r\n });\r\n \r\n }\r\n if (!$scope.SingleDueDate && $scope.SingleDueDate) {\r\n angular.forEach($scope.AssessmentArray, function (a) {\r\n if (a.EffectiveDate > $scope.DueDate) {\r\n toastr['error']('Invalid Due Date for ' + a.Name + '. Due Date may not come before the Effective Date.');\r\n retval = false;\r\n }\r\n });\r\n\r\n }\r\n if (!$scope.SingleDueDate && !$scope.SingleDueDate) {\r\n angular.forEach($scope.AssessmentArray, function (a) {\r\n if (a.EffectiveDate > a.DueDate) {\r\n toastr['error']('Invalid Due Date for ' + a.Name + '. Due Date may not come before the Effective Date.');\r\n retval = false;\r\n }\r\n });\r\n\r\n }\r\n return retval;\r\n case 1:\r\n retval = false;\r\n $scope.Editing = true;\r\n if ($scope.SameAssignees) {\r\n if ((from == 1 && to == 0)) {\r\n retval = true\r\n }\r\n else {\r\n angular.forEach($scope.Students, function (s) {\r\n if (s.Selected) {\r\n retval = true;\r\n\r\n }\r\n });\r\n\r\n if (retval === false) {\r\n\r\n toastr['error']('Must have at least 1 Assignee');\r\n }\r\n }\r\n }\r\n if ($scope.SameAssignees == false) {\r\n if ((from == 1 && to == 0)) {\r\n retval = true\r\n }\r\n else {\r\n var maketruthy = 0;\r\n ////////console.log($scope.AssessmentArray)\r\n for (var i = 0; $scope.AssessmentArray.length > i; i++) {\r\n $scope.AssessmentArray[i].hasSelected = false;\r\n angular.forEach($scope.AssessmentArray[i].Students, function (s) {\r\n\r\n if (s.Selected) {\r\n $scope.AssessmentArray[i].hasSelected = true;\r\n }\r\n\r\n });\r\n if ($scope.AssessmentArray[i].hasSelected == true) {\r\n maketruthy++\r\n }\r\n }\r\n if (maketruthy == $scope.AssessmentArray.length) {\r\n retval = true;\r\n }\r\n ////////console.log(maketruthy + ', ' + $scope.AssessmentArray.length)\r\n if (retval === false) {\r\n toastr['error']('Each Assignment must have at least 1 Assignee');\r\n }\r\n }\r\n }\r\n \r\n return retval;\r\n case 2:\r\n retval = true;\r\n ////////console.log(retval)\r\n \r\n if ($scope.SameScore == true) {\r\n if ($scope.PassingScore == '' || $scope.PassingScore == undefined) {\r\n retval = false;\r\n toastr['error']('You must set a proper Passing Score');\r\n }\r\n }\r\n if ($scope.SameScore == false) {\r\n ////////console.log($scope.AssessmentArray)\r\n angular.forEach($scope.AssessmentArray, function (aa) {\r\n if (aa.PassingScore == undefined || aa.PassingScore < 0) {\r\n retval = false;\r\n \r\n }\r\n \r\n })\r\n if (retval == false) {\r\n toastr['error']('You must set a Passing Score for each Assignment');\r\n }\r\n }\r\n if ($scope.PassingScore > 100) {\r\n retval = false;\r\n if (retval == false) {\r\n toastr['error']('You must set a Passing Score below 100');\r\n }\r\n \r\n }\r\n \r\n if ($scope.PassingScore < 1) {\r\n retval = false;\r\n if (retval == false) {\r\n toastr['error']('You must set a Passing Score above 1');\r\n }\r\n }\r\n //if ($scope.PassingScore != undefined) {\r\n // retval = true;\r\n //}\r\n \r\n return retval;\r\n case 3:\r\n retval = true;\r\n ////console.log($scope.SendReminderHours, $scope.ReminderIncomplete)\r\n if ($scope.TimeLimit == true && (isNumeric($scope.MinutesAllocated) != true || $scope.MinutesAllocated <= 0)) {\r\n retval = false;\r\n toastr['error']('You must set a Time Limit at 0 or above');\r\n }\r\n if ($scope.LimitTries == true && (isNumeric($scope.NumTries) != true || $scope.NumTries <= 0)) {\r\n retval = false;\r\n toastr['error']('You must set the Number of Attempts at 0 or above');\r\n }\r\n if ($scope.ReminderIncomplete && ($scope.SendReminderHours <= 0 || $scope.SendReminderHours == '' || $scope.SendReminderHours == undefined)) {\r\n retval = false;\r\n toastr['error']('You must set the Reminder for Incomplete Assignments Day(s) Prior to Due Date at 1 or above');\r\n }\r\n if ($scope.SendIncompletePending && ($scope.SendPendingHours <= 0 || $scope.SendPendingHours == '' || $scope.SendPendingHours == undefined)) {\r\n retval = false;\r\n toastr['error']('You must set the Reminder for Pending Assignments Day(s) Prior to Due Date at 1 or above');\r\n }\r\n if ($scope.SendIncompletePending == true || $scope.SendDue == 1 || $scope.SendCompleted == 1) {\r\n //retval = false;\r\n if ($scope.PendingEmails.length > 0 && $scope.SendIncompletePending == true) {\r\n $scope.PendingEmails = replaceAll(',', ';', $scope.PendingEmails);\r\n $scope.PendingEmails = replaceAll(' ', ';', $scope.PendingEmails);\r\n angular.forEach($scope.PendingEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n retval = false;\r\n toastr['error']('Incomplete Notification Email ' + email + ' is not a valid email address');\r\n\r\n }\r\n\r\n });\r\n }\r\n else if ($scope.DueEmails.length > 0 && $scope.SendDue == 1) {\r\n $scope.DueEmails = replaceAll(',', ';', $scope.DueEmails);\r\n $scope.DueEmails = replaceAll(' ', ';', $scope.DueEmails);\r\n angular.forEach($scope.DueEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n retval = false;\r\n toastr['error']('Due Date Notification Email ' + email + ' is not a valid email address');\r\n\r\n }\r\n\r\n });\r\n }\r\n else if ($scope.CompleteEmails.length > 0 && $scope.SendCompleted == 1) {\r\n $scope.CompleteEmails = replaceAll(',', ';', $scope.CompleteEmails);\r\n $scope.CompleteEmails = replaceAll(' ', ';', $scope.CompleteEmails);\r\n angular.forEach($scope.CompleteEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n retval = false;\r\n toastr['error']('Completed Notification Email ' + email + ' is not a valid email address');\r\n }\r\n\r\n });\r\n }\r\n \r\n //else if (!$scope.PendingEmails) {\r\n // toastr['error']('Incomplete Notification Email is not valid');\r\n // var validateSave = false;\r\n //}\r\n ////////console.log(retval)\r\n }\r\n case 4:\r\n retval = true\r\n return retval;\r\n default:\r\n return true;\r\n }\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n if ($stateParams.Ids) {\r\n $scope.Ids = $stateParams.Ids.split(',');\r\n $scope.EditingAssignments = true;\r\n ////////console.log($scope.Ids)\r\n ////////console.log($rootScope.AssignmentDefinition)\r\n \r\n }\r\n else {\r\n $scope.EditingAssingments = false;\r\n }\r\n if ($rootScope.AssignmentDefinition) {\r\n ////////console.log([$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTime, p.EffectiveDate])\r\n $http.post('/Execute/GetAssignmentDefinition', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTime, p.EffectiveDate ]).success(function (d) {\r\n //d.RS_0[0] = populated values\r\n angular.forEach(d.RS_1, function (r) {\r\n $scope.IdArray.push(r.Id);\r\n });\r\n delete $rootScope.AssignmentDefinition;\r\n });\r\n \r\n }\r\n $scope.showProgress = false\r\n //$scope.buildingWaitNotification = function () {\r\n // $scope.assprogress = 0\r\n // $scope.updatethem = function () {\r\n // $scope.$watch('AssignmentProgressPercent', function (o) {\r\n // ////console.log(o)\r\n // return o\r\n // });\r\n // }\r\n // toastr['info']('', 'Getting Assignments Ready for Review...' + $scope.updatethem() + '', {\r\n // allowHtml: true,\r\n // autoDismiss: false,\r\n // timeOut: 0,\r\n // extendedTimeOut: 0,\r\n // extraData: $rootScope.msg,\r\n // onShown: function () {\r\n \r\n // //////console.log($scope.AssignmentProgressPercent)\r\n // $scope.BuildAssignments()\r\n // }\r\n\r\n // });\r\n \r\n \r\n //}\r\n $scope.savingWaitNotification = function () {\r\n toastr['info']('', 'Saving Assignments...', {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n timeOut: 0,\r\n extendedTimeOut: 0,\r\n onShown: function () {\r\n ////console.log($scope.AssignmentProgressPercent)\r\n $scope.SaveAssignment()\r\n }\r\n\r\n });\r\n }\r\n $scope.TabChanged = function (idx) {\r\n \r\n if (idx === 1 || idx === 2) {\r\n $scope.AssessmentArray = [];\r\n angular.forEach($scope.Curricula, function (cur) {\r\n angular.forEach(cur.Courses, function (crs) {\r\n angular.forEach(crs.Assessments, function (ass) {\r\n if (ass.Selected) {\r\n $scope.AssessmentArray.push(ass);\r\n }\r\n });\r\n });\r\n });\r\n ///////////console.log($scope.AssessmentArray)\r\n } else if (idx == 4) {\r\n $scope.BuildAssignments()\r\n //$scope.loadToaster();\r\n \r\n }\r\n };\r\n $scope.User = $rootScope.User;\r\n $scope.Curricula = [];\r\n $scope.Students = [];\r\n $scope.SelectedAssignees = [];\r\n $scope.PassingScore = 80;\r\n $scope.SameAssignees = true;\r\n $scope.SameScore = true;\r\n $scope.SingleDueDate = true;\r\n $scope.SingleEffDate = true;\r\n $scope.EffectiveDate = new Date();\r\n //$scope.EffectiveDate = $scope.EffectiveDate.setHours(0,1,0,0);\r\n //$scope.EffectiveDate = $filter('date')($scope.EffectiveDate, 'yyyy-MM-dd');\r\n ////////console.log($scope.EffectiveDate)\r\n $scope.DueDate = (new Date()).addDays(30);\r\n //$scope.DueDate = $scope.DueDate.setHours(0, 1, 0, 0);\r\n //$scope.DueDate = $filter('date')($scope.DueDate, 'yyyy-MM-dd');\r\n $scope.SpecifyEffective = false;\r\n $scope.DisplayChapterAssessments = true;\r\n $scope.DisplayTopicAssessments = true;\r\n $scope.UpdateDueDate = function (date) {\r\n $scope.DueDate = date;\r\n }\r\n $scope.UpdateEffectiveDate = function (date) {\r\n $scope.EffectiveDate = date;\r\n }\r\n $scope.UpdatePassingScore = function (score) {\r\n if (score > 100) {\r\n \r\n $scope.PassingScore = 100;\r\n }\r\n if (score < 1) {\r\n \r\n $scope.PassingScore = 1;\r\n }\r\n else {\r\n $scope.PassingScore = score;\r\n }\r\n \r\n ////////console.log(score)\r\n ////////console.log($scope.PassingScore)\r\n }\r\n $scope.UpdateAssessmentScore = function (assessment, score) {\r\n assessment.PassingScore = score;\r\n ////////console.log(assessment.PassingScore)\r\n }\r\n $scope.UpdateSameScore = function (same) {\r\n $scope.SameScore = same;\r\n // ////////console.log($scope.SameScore)\r\n }\r\n $scope.deleteInstSettings = function () {\r\n $scope.UserSettings = [];\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (d) {\r\n toastr['success']('Settings Deleted');\r\n ////////console.log(d)\r\n });\r\n }\r\n $http.post(\"/Execute/GetUserSettings\", [$scope.User.UserId]).success(function (d) {\r\n $scope.UserSettings = JSON.parse(d.RS_0[0].Settings);\r\n \r\n if ($scope.UserSettings.AssignmentDefaultOptions) {\r\n $scope.DisplayPracticeReview = $scope.UserSettings.AssignmentDefaultOptions.DisplayPracticeReview;\r\n $scope.DisplayPrescription = $scope.UserSettings.AssignmentDefaultOptions.DisplayPrescription;\r\n $scope.AssessmentViewablity = $scope.UserSettings.AssignmentDefaultOptions.AssessmentViewablity;\r\n $scope.ShowLeaderBoard = $scope.UserSettings.AssignmentDefaultOptions.ShowLeaderBoard;\r\n $scope.NumTries = $scope.UserSettings.AssignmentDefaultOptions.NumTries;\r\n $scope.MinutesAllocated = $scope.UserSettings.AssignmentDefaultOptions.MinutesAllocated;\r\n $scope.NotifyUpdatedAssignment = $scope.UserSettings.AssignmentDefaultOptions.NotifyUpdatedAssignment;\r\n $scope.NotifyNewAssignment = $scope.UserSettings.AssignmentDefaultOptions.NotifyNewAssignment;\r\n $scope.NotifyIncompletePending = $scope.UserSettings.AssignmentDefaultOptions.NotifyIncompletePending;\r\n $scope.NotifyDueDate = $scope.UserSettings.AssignmentDefaultOptions.NotifyDueDate;\r\n $scope.TimeLimit = $scope.UserSettings.AssignmentDefaultOptions.TimeLimit;\r\n $scope.LimitTries = $scope.UserSettings.AssignmentDefaultOptions.LimitTries;\r\n $scope.ReminderIncomplete = $scope.UserSettings.AssignmentDefaultOptions.ReminderIncomplete;\r\n $scope.SendReminderHours = $scope.UserSettings.AssignmentDefaultOptions.SendReminderHours;\r\n $scope.SendIncompletePending = $scope.UserSettings.AssignmentDefaultOptions.SendIncompletePending;\r\n $scope.SendPendingHours = $scope.UserSettings.AssignmentDefaultOptions.SendPendingHours;\r\n $scope.SendCompleted = ($scope.UserSettings.AssignmentDefaultOptions.SendCompleted) ? 1 : 0;\r\n $scope.SendDue = ($scope.UserSettings.AssignmentDefaultOptions.SendDue) ? 1 : 0;\r\n $scope.PendingEmails = ($scope.UserSettings.AssignmentDefaultOptions.PendingEmails) ? $scope.UserSettings.AssignmentDefaultOptions.PendingEmails : '';\r\n $scope.CompleteEmails = ($scope.UserSettings.AssignmentDefaultOptions.CompleteEmails) ? $scope.UserSettings.AssignmentDefaultOptions.CompleteEmails : '';\r\n $scope.DueEmails = ($scope.UserSettings.AssignmentDefaultOptions.DueEmails) ? $scope.UserSettings.AssignmentDefaultOptions.DueEmails : '';\r\n\r\n } else {\r\n $scope.DisplayPracticeReview = \"1\";\r\n $scope.DisplayPrescription = \"2\";\r\n $scope.AssessmentViewablity = \"1\";\r\n $scope.ShowLeaderBoard = \"0\";\r\n $scope.NumTries = 1;\r\n $scope.MinutesAllocated = 1;\r\n $scope.NotifyUpdatedAssignment = 1;\r\n $scope.NotifyNewAssignment = 1;\r\n $scope.NotifyIncompletePending = true;\r\n $scope.NotifyDueDate = true;\r\n $scope.TimeLimit = false;\r\n $scope.LimitTries = false;\r\n $scope.ReminderIncomplete = false;\r\n $scope.SendReminderHours = 1;\r\n $scope.SendIncompletePending = false;\r\n $scope.SendPendingHours = 1;\r\n $scope.SendCompleted = 0;\r\n $scope.SendDue = 0;\r\n $scope.PendingEmails = '';\r\n $scope.CompleteEmails = '';\r\n $scope.DueEmails = '';\r\n }\r\n ////console.log($scope.UserSettings)\r\n //////////console.log($scope.UserSettings);\r\n });\r\n $scope.SaveMyDefaultOptions = function () {\r\n var AssignmentDefaultOptions = {\r\n DisplayPracticeReview:$scope.DisplayPracticeReview,\r\n DisplayPrescription:$scope.DisplayPrescription,\r\n AssessmentViewablity:$scope.AssessmentViewablity,\r\n ShowLeaderBoard:$scope.ShowLeaderBoard,\r\n NumTries:$scope.NumTries,\r\n MinutesAllocated:$scope.MinutesAllocated,\r\n NotifyUpdatedAssignment:$scope.NotifyUpdatedAssignment,\r\n NotifyNewAssignment: $scope.NotifyNewAssignment,\r\n NotifyIncompletePending: $scope.NotifyIncompletePending,\r\n NotifyDueDate: $scope.NotifyDueDate,\r\n TimeLimit: $scope.TimeLimit,\r\n LimitTries: $scope.LimitTries,\r\n ReminderIncomplete: $scope.ReminderIncomplete,\r\n SendReminderHours: $scope.SendReminderHours,\r\n SendIncompletePending: $scope.SendIncompletePending,\r\n SendPendingHours: $scope.SendPendingHours,\r\n SendCompleted: $scope.SendCompleted,\r\n SendDue: $scope.SendDue,\r\n PendingEmails: $scope.PendingEmails,\r\n CompleteEmails: $scope.CompleteEmails,\r\n DueEmails: $scope.DueEmails,\r\n }\r\n //////////console.log($scope.PendingEmails)\r\n var validateSave = true;\r\n if ($scope.LimitTries == true && (isNumeric(AssignmentDefaultOptions.NumTries) != true || AssignmentDefaultOptions.NumTries <= 0)) {\r\n toastr['error']('Number of Tries must be a number greater than 0');\r\n validateSave = false;\r\n } \r\n //else if ($scope.LimitTries == true && ) {\r\n // toastr['error']('Number of Tries must be a number greater than 0');\r\n // validateSave = false;\r\n //}\r\n if ($scope.TimeLimit == true && (isNumeric(AssignmentDefaultOptions.MinutesAllocated) != true || AssignmentDefaultOptions.MinutesAllocated <= 0)) {\r\n toastr['error']('Minutes Allocated must be a number greater than 0');\r\n validateSave = false;\r\n } \r\n //else if ($scope.TimeLimit == true && ) {\r\n // toastr['error']('Minutes Allocated must be a number greater than 0');\r\n // validateSave = false;\r\n //}\r\n if (AssignmentDefaultOptions.ReminderIncomplete == true && isNumeric(AssignmentDefaultOptions.SendReminderHours) != true) {\r\n toastr['error']('Reminder Days must be a number greater than 0');\r\n var validateSave = false;\r\n }\r\n else if (AssignmentDefaultOptions.ReminderIncomplete == true && AssignmentDefaultOptions.SendReminderHours <= 0) {\r\n toastr['error']('Reminder Days must be a number greater than 0');\r\n validateSave = false;\r\n }\r\n if (AssignmentDefaultOptions.SendIncompletePending == true && isNumeric(AssignmentDefaultOptions.SendPendingHours) != true) {\r\n toastr['error']('Incomplete Pending Assignment Days must be a number greater than 0');\r\n validateSave = false;\r\n } else if (AssignmentDefaultOptions.SendIncompletePending == true && AssignmentDefaultOptions.SendPendingHours <= 0) {\r\n toastr['error']('Incomplete Pending Assignment Days must be a number greater than 0');\r\n validateSave = false;\r\n }\r\n \r\n if ($scope.SendIncompletePending == true || $scope.SendDue == 1 || $scope.SendCompleted == 1) {\r\n //validateSave = false;\r\n if (AssignmentDefaultOptions.PendingEmails.length > 0 && $scope.SendIncompletePending == true) {\r\n AssignmentDefaultOptions.PendingEmails = replaceAll(',', ';', AssignmentDefaultOptions.PendingEmails);\r\n AssignmentDefaultOptions.PendingEmails = replaceAll(' ', ';', AssignmentDefaultOptions.PendingEmails);\r\n angular.forEach(AssignmentDefaultOptions.PendingEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n validateSave = false;\r\n toastr['error']('Incomplete Notification Email ' + email + ' is not a valid email address');\r\n \r\n }\r\n \r\n });\r\n }\r\n else if (AssignmentDefaultOptions.DueEmails.length > 0 && $scope.SendDue == 1) {\r\n AssignmentDefaultOptions.DueEmails = replaceAll(',', ';', AssignmentDefaultOptions.DueEmails);\r\n AssignmentDefaultOptions.DueEmails = replaceAll(' ', ';', AssignmentDefaultOptions.DueEmails);\r\n angular.forEach(AssignmentDefaultOptions.DueEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n validateSave = false;\r\n toastr['error']('Due Date Notification Email ' + email + ' is not a valid email address');\r\n \r\n }\r\n \r\n });\r\n }\r\n else if (AssignmentDefaultOptions.CompleteEmails.length > 0 && $scope.SendCompleted == 1) {\r\n AssignmentDefaultOptions.CompleteEmails = replaceAll(',', ';', AssignmentDefaultOptions.CompleteEmails);\r\n AssignmentDefaultOptions.CompleteEmails = replaceAll(' ', ';', AssignmentDefaultOptions.CompleteEmails);\r\n angular.forEach(AssignmentDefaultOptions.CompleteEmails.split(\";\"), function (email) {\r\n if (email.length > 0 && validateEmail(email) == false) {\r\n validateSave = false;\r\n toastr['error']('Completed Notification Email ' + email + ' is not a valid email address');\r\n }\r\n \r\n });\r\n }\r\n \r\n //else if (!$scope.PendingEmails) {\r\n // toastr['error']('Incomplete Notification Email is not valid');\r\n // var validateSave = false;\r\n //}\r\n }\r\n //if () {\r\n // var validateSave = false;\r\n \r\n // else {\r\n // var validateSave = true;\r\n // }\r\n // //else if (!$scope.DueEmails) {\r\n // // toastr['error']('Due Date Notification Email is not valid');\r\n // // var validateSave = false;\r\n // //}\r\n //}\r\n //if () {\r\n // var validateSave = false;\r\n \r\n // else {\r\n // var validateSave = true;\r\n // }\r\n // //else if (!$scope.CompleteEmails) {\r\n // // toastr['error']('Completed Notification Email is not valid');\r\n // // var validateSave = false;\r\n // //}\r\n //}\r\n ////////////////console.log(validationText)\r\n if (validateSave == true) {\r\n //////console.log($scope.UserSettings.AssignmentDefaultOptions)\r\n $scope.UserSettings.AssignmentDefaultOptions = AssignmentDefaultOptions;\r\n ////////console.log($scope.SendPendingHours);\r\n ////////console.log($scope.SendIncompletePending);\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (d) {\r\n toastr['success']('Default Options Saved');\r\n ////////console.log(d)\r\n });\r\n }\r\n \r\n \r\n \r\n }\r\n\r\n\r\n $scope.ToggleChapterAssessments = function (v) {\r\n $scope.DisplayChapterAssessments = !$scope.DisplayChapterAssessments;\r\n var disp = \"none\";\r\n if ($scope.DisplayChapterAssessments) {\r\n disp = \"in-line\";\r\n }\r\n angular.forEach($scope.Curricula, function (cur) {\r\n angular.forEach(cur.Courses, function (crs) {\r\n var hiddencount = 0;\r\n angular.forEach(crs.Assessments, function (ass) {\r\n if (ass.IsChapterLevel) {\r\n ass.Display = disp;\r\n }\r\n if (ass.Display === \"none\") {\r\n hiddencount += 1;\r\n }\r\n });\r\n if (hiddencount === crs.Assessments.length) {\r\n crs.Display = \"none\";\r\n } else {\r\n crs.Display = \"in-line\";\r\n }\r\n });\r\n });\r\n };\r\n $scope.toggleAssignments = 0\r\n $scope.ToggleAssessmentDetail = function (assessment) {\r\n ////////console.log(assessment)\r\n var disp = \"none\";\r\n if (assessment.Selected) {\r\n disp = \"in-line\";\r\n $scope.toggleAssignments += 1\r\n }\r\n else {\r\n $scope.toggleAssignments -= 1\r\n }\r\n if ($scope.toggleAssignments < 0) {\r\n $scope.toggleAssignments = 0\r\n }\r\n assessment.DetailDisplay = disp;\r\n if (!$scope.$$phase) {\r\n $scope.$apply();\r\n }\r\n };\r\n \r\n $scope.ToggleTopicDetail = function (topic) {\r\n var disp = \"none\";\r\n if (topic.Selected) {\r\n disp = \"in-line\";\r\n $scope.Editing = true\r\n }\r\n else {\r\n $scope.Editing = false\r\n }\r\n topic.DetailDisplay = disp;\r\n if (!$scope.$$phase) {\r\n $scope.$apply();\r\n }\r\n };\r\n $scope.ToggleTopicAssessments = function () {\r\n $scope.DisplayTopicAssessments = !$scope.DisplayTopicAssessments;\r\n var disp = \"none\";\r\n if ($scope.DisplayTopicAssessments) {\r\n disp = \"in-line\";\r\n }\r\n angular.forEach($scope.Curricula, function (cur) {\r\n angular.forEach(cur.Courses, function (crs) {\r\n var hiddencount = 0;\r\n angular.forEach(crs.Assessments, function (ass) {\r\n if (ass.IsTopicLevel) {\r\n ass.Display = disp;\r\n }\r\n if (ass.Display === \"none\") {\r\n hiddencount += 1;\r\n }\r\n });\r\n if (hiddencount === crs.Assessments.length) {\r\n crs.Display = \"none\";\r\n } else {\r\n crs.Display = \"in-line\";\r\n }\r\n });\r\n });\r\n };\r\n \r\n $scope.SelectCourseChildren = function (course) {\r\n ////console.log(course)\r\n var disp = \"none\";\r\n if (course.Selected) {\r\n disp = \"in-line\";\r\n }\r\n course.DetailDisplay = disp;\r\n if (course.Assessments) {\r\n $.each(course.Assessments, function (idx, assess) {\r\n assess.Selected = course.Selected;\r\n if (assess.Selected == false) {\r\n course.Selected = false;\r\n }\r\n $scope.ToggleAssessmentDetail(assess);\r\n });\r\n }\r\n if (course.Topics) {\r\n $.each(course.Topics, function (idx, topic) {\r\n topic.Selected = course.Selected;\r\n if (topic.Selected == false) {\r\n course.Selected = false;\r\n }\r\n $scope.ToggleTopicDetail(topic);\r\n });\r\n }\r\n };\r\n //$scope.GetClasses = function (lst) {\r\n // var retval = {};\r\n // $.each(lst, function (idx, student) {\r\n // if (!retval[student.ClassName]) {\r\n // retval[student.ClassName] = {};\r\n // retval[student.ClassName].Name = student.ClassName;\r\n // retval[student.ClassName].Selected = false;\r\n // retval[student.ClassName].Students = {};\r\n // }\r\n // retval[student.ClassName].Students[student.UserID] = clone(student);\r\n // retval[student.ClassName].Students[student.UserID].Selected = false;\r\n // });\r\n // return retval;\r\n //};\r\n function GetCourseInCurriculum(assmnt) {\r\n var retval = null;\r\n if (!$scope.Curricula[assmnt.CourseId].Courses) { $scope.Curricula[assmnt.CourseId].Courses = []; }\r\n $.each($scope.Curricula[assmnt.CourseId].Courses, function (idx, course) {\r\n if (course.ChapterId === assmnt.ChapterId) {\r\n retval = course;\r\n }\r\n });\r\n if (retval === null) {\r\n retval = {};\r\n retval.Sequence = assmnt.ChapterSort;\r\n retval.ChapterId = assmnt.ChapterId;\r\n retval.Selected = false;\r\n retval.EffectiveDate = $scope.EffectiveDate;\r\n retval.DueDate = $scope.DueDate;\r\n retval.DetailDisplay = \"none\";\r\n retval.ClassesDisplay = \"none\";\r\n retval.AssessDisplay = \"in-line\";\r\n retval.TopicDisplay = \"in-line\";\r\n retval.Display = \"in-line\";\r\n retval.Name = assmnt.ChapterName;\r\n retval.Title = assmnt.ChapterName;\r\n retval.Classes = {};\r\n retval.Assessments = [];\r\n \r\n $scope.Curricula[assmnt.CourseId].Courses.push(retval);\r\n }\r\n return retval;\r\n }\r\n $http.post(\"/Execute/GetAssignableUsersForInstitution\", [$scope.User.InstitutionId]).success(function (data) {\r\n $scope.Students = [];\r\n //console.log(data)\r\n angular.forEach(data.RS_0, function (s) {\r\n s.ClassName = s.Class;\r\n delete s.Class;\r\n $scope.Students.push(s);\r\n });\r\n \r\n $scope.Classes = data.RS_1\r\n ////console.log($scope.Classes)\r\n //$scope.classFilter = $scope.Classes[0].Name\r\n //$scope.ActiveStudents = [];\r\n\r\n //if ($rootScope.InstitutionSettings) {\r\n // ////console.log($rootScope.InstitutionSettings)\r\n // if ($rootScope.InstitutionSettings.InactiveClasses) {\r\n // angular.forEach($scope.Students, function (stu) {\r\n // if (!$rootScope.InstitutionSettings.InactiveClasses.includes(stu.ClassName)) {\r\n // $scope.ActiveStudents.push(stu)\r\n // //////////console.log(stu)\r\n // }\r\n\r\n // })\r\n // $scope.Students = $scope.ActiveStudents;\r\n // }\r\n //}\r\n \r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n //////////console.log($scope.Students)\r\n //$scope.Students = $filter('ActiveInstititinalUser')($scope.Students, $scope.institutionsettings,$scope.IsOn)\r\n $rootScope.Students = $scope.Students;\r\n //$scope.Classes = $scope.GetClasses($scope.Students);\r\n //////////console.log($scope.Classes)\r\n \r\n $http.post('/Execute/GetInstitutionalAssessments', [$scope.User.InstitutionId]).success(function (d) {\r\n var defaultCurId = 0;\r\n //////////console.log(d.RS_0)\r\n \r\n angular.forEach(d.RS_0, function (Assessment, idx) {\r\n if (Assessment.CourseId == 0) {\r\n $scope.isCustom = 1;\r\n }\r\n else {\r\n $scope.isCustom = 0;\r\n }\r\n if (idx === 0) { defaultCurId = Assessment.CourseId; }\r\n $scope.LoadingText = \"Parsing \" + Assessment.CourseName;\r\n if (!$scope.Curricula[Assessment.CourseId]) {\r\n $scope.Curricula[Assessment.CourseId] = {};\r\n $scope.Curricula[Assessment.CourseId].Id = Assessment.CourseId;\r\n $scope.Curricula[Assessment.CourseId].Name = Assessment.CourseName;\r\n $scope.Curricula[Assessment.CourseId].DetailDisplay = \"none\";\r\n $scope.Curricula[Assessment.CourseId].Courses = [];\r\n $scope.Curricula[Assessment.CourseId].AssessmentCount = 0;\r\n \r\n }\r\n //$scope.Curricula[Assessment.CourseId].CUR_DESC = Assessment.CourseName;\r\n var crs = GetCourseInCurriculum(Assessment);\r\n $scope.Curricula[Assessment.CourseId].AssessmentCount += 1;\r\n var newass = {};\r\n newass.QuestionCount = 0;\r\n newass.Students = []\r\n $http.post('/Execute/QpCounts', [Assessment.AssessmentId, $scope.isCustom]).success(function (dta) {\r\n ////////console.log(dta.RS_0);\r\n \r\n newass.QuestionCount = dta.RS_0[0].QuestionCount;\r\n newass.TotalQuestions = dta.RS_0[0].TotalQuestions;\r\n ////////console.log($scope.Sections)\r\n //angular.forEach($scope.Sections, function (sec) {\r\n // ////////console.log(sec.QuestionCount)\r\n // newass.QuestionCount += sec.QuestionCount;\r\n //})\r\n ////////console.log(dta)\r\n //newass.QuestionCount = dta.d.QuestionCount;\r\n })\r\n newass.ChapterId = Assessment.ChapterId;\r\n newass.TopicId = parseInt(Assessment.TopicId);\r\n newass.SubTopicId = Assessment.SubTopicId;\r\n newass.Name = Assessment.AssessmentName;\r\n ////////////console.log(parseInt(Assessment.TopicId));\r\n if (isNaN(parseInt(Assessment.TopicId)) === true) {\r\n newass.AssessmentId = Assessment.AssessmentId;\r\n //newass.ChapterLabel = \"Chapter Assessment: \";\r\n newass.IsChapterLevel = true;\r\n newass.IsTopicLevel = false;\r\n newass.DisplayClass = \"chapter\";\r\n } else {\r\n newass.AssessmentId = Assessment.AssessmentId;\r\n newass.IsChapterLevel = false;\r\n newass.IsTopicLevel = true;\r\n newass.DisplayClass = \"topic\";\r\n }\r\n \r\n \r\n \r\n newass.DueDate = $scope.DueDate;\r\n newass.EffectiveDate = $scope.EffectiveDate;\r\n newass.Label = Assessment.AssessmentName;\r\n newass.Selected = false;\r\n newass.DetailDisplay = \"none\";\r\n newass.Classes = {};\r\n //////////console.log($scope.Students)\r\n \r\n if (newass.CourseId == \"0\") {\r\n ////////console.log(newass)\r\n }\r\n crs.Assessments.push(newass);\r\n });\r\n $scope.SelectedCourse = $scope.Curricula[defaultCurId];\r\n //////console.log($scope.Curricula)\r\n $scope.loaderizing = false;\r\n });\r\n\r\n\r\n });\r\n $scope.AssignmentProgress = 0\r\n $scope.AssignmentProgressPercent = 0\r\n var changing = function (event, next) {\r\n if ($scope.Editing == true || $scope.AssessmentArray.length > 0) {\r\n ////console.log('test listener')\r\n event.returnValue = function () {\r\n return true\r\n }\r\n }\r\n }\r\n $rootScope.$on('$stateChangeStart', function (event, next) {\r\n //console.log($scope.Editing, $scope.AssessmentArray.length)\r\n window.removeEventListener('beforeunload', changing)\r\n if ($scope.Editing == true || $scope.AssessmentArray.length > 0) {\r\n event.preventDefault();\r\n swal({\r\n title: \"You are still creating Assignments.\",\r\n text: \"Do you want to leave?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $scope.Curricula = [];\r\n $scope.Editing = false\r\n if (next.url.search(':Id') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':Id', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n window.location.href = next.overrideurl\r\n }\r\n else if (next.url.search(':CourseId') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':CourseId', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n //$window.location.href = next.url\r\n window.location.href = next.overrideurl\r\n }\r\n else {\r\n //console.log(next.overrideurl)\r\n window.location.href = next.url\r\n }\r\n //$window.location.href = next.url\r\n }\r\n else if (result.dismiss === 'cancel') {\r\n window.addEventListener('beforeunload', changing)\r\n event.preventDefault();\r\n }\r\n\r\n })\r\n }\r\n });\r\n window.addEventListener('beforeunload', changing)\r\n $scope.BuildAssignments = function () {\r\n $scope.WaitForBuild = true;\r\n $scope.classFilter = $scope.Classes[0].Class\r\n var confirmText;\r\n var TotalAssignments = [];\r\n var allValid = true;\r\n if ($scope.SingleEffDate == false) {\r\n $scope.EffectiveDate = '';\r\n }\r\n if ($scope.SingleDueDate == false) {\r\n $scope.DueDate = '';\r\n }\r\n //////////console.log($scope.EffectiveDate)\r\n //////////console.log($scope.DueDate)\r\n \r\n angular.forEach($scope.Curricula, function (cur) {\r\n if (cur.Courses) {\r\n $.each(cur.Courses, function (courseid, course) {\r\n var dt = new Date();\r\n if (course.Assessments) {\r\n $.each(course.Assessments, function (assid, Assessment) {\r\n \r\n if (Assessment.IsChapterLevel) {\r\n Assessment.DisplayClass = \"chapter\";\r\n } else {\r\n Assessment.DisplayClass = \"topic\";\r\n }\r\n if (Assessment.Selected) {\r\n //////////console.log(Assessment) \r\n Assessment.AssigneeCount = 0;\r\n if (Assessment.DueDate instanceof Date || $scope.SingleDueDate) {\r\n if ($scope.SameAssignees == true) {\r\n \r\n $.each($scope.Students, function (s_uid, student) {\r\n if (student.Selected) {\r\n Assessment.AssigneeCount += 1;\r\n var Ass = {\r\n Student_Id: student.UserID,\r\n CourseId: cur.Id,\r\n ChapterId: course.ChapterId,\r\n TopicId: (Assessment.TopicId) ? Assessment.TopicId : \"0\",\r\n SubTopicId: (Assessment.SubTopicId) ? Assessment.SubTopicId : \"0\",\r\n AssessmentId: Assessment.AssessmentId,\r\n Passing_Score: $scope.SameScore ? $scope.PassingScore : Assessment.PassingScore,\r\n EffectiveDateTime: $scope.SingleEffDate ? $scope.EffectiveDate : Assessment.EffectiveDate,\r\n DueDateTime: $scope.SingleDueDate ? $scope.DueDate : Assessment.DueDate,\r\n AssignedByUserId: $scope.User.UserId, Note: \"\", Curriculum: cur.Name, Title: course.Title + \"->\" + Assessment.Label,\r\n Match: false\r\n };\r\n //////////console.log(Ass);\r\n TotalAssignments.push(Ass);\r\n }\r\n });\r\n \r\n } else {\r\n \r\n $.each(Assessment.Students, function (s_uid, student) {\r\n if (student.Selected) {\r\n Assessment.AssigneeCount += 1;\r\n var Ass = {\r\n Student_Id: student.UserID,\r\n CourseId: cur.Id,\r\n ChapterId: course.ChapterId,\r\n TopicId: (Assessment.TopicId) ? Assessment.TopicId : \"0\",\r\n SubTopicId: (Assessment.SubTopicId) ? Assessment.SubTopicId : \"0\",\r\n AssessmentId: Assessment.AssessmentId,\r\n Passing_Score: $scope.SameScore ? $scope.PassingScore : Assessment.PassingScore,\r\n AssignedDateTime: dt.formatShortZulu(),\r\n EffectiveDateTime: $scope.SingleEffDate ? $scope.EffectiveDate : Assessment.EffectiveDate,\r\n DueDateTime: $scope.SingleDueDate ? $scope.DueDate : Assessment.DueDate,\r\n AssignedByUserId: $scope.User.UserId, Note: \"\",\r\n Curriculum: cur.Name, Title: course.Title + \"->\" + Assessment.Label,\r\n Match: false\r\n };\r\n //////////console.log(Ass);\r\n TotalAssignments.push(Ass);\r\n }\r\n });\r\n \r\n }\r\n\r\n }\r\n else {\r\n Assessment.DisplayClass = \"Invalid\";\r\n allValid = false;\r\n }\r\n }\r\n if (Assessment.AssigneeCount === 0) {\r\n Assessment.DisplayClass = \"Invalid\";\r\n allValid = false;\r\n }\r\n });\r\n }\r\n });\r\n //////console.log($scope.AssignmentProgress)\r\n \r\n }\r\n });\r\n \r\n\r\n ////////console.log(TotalAssignments);\r\n if (allValid) {\r\n $scope.AssignmentQueue = TotalAssignments;\r\n \r\n //$scope.filteredqueue = $scope.AssignmentQueue\r\n $scope.DuplicateAssignment = false;\r\n $scope.DeleteDupe = function (index) {\r\n $scope.AssignmentQueue.splice(index, 1);\r\n }\r\n $scope.checkForDuplicates = function (idx, total) {\r\n if (idx < total) {\r\n var aq = $scope.AssignmentQueue[idx]\r\n angular.forEach($rootScope.Students, function (stu) {\r\n if (aq.Student_Id == stu.UserID) {\r\n aq.Name = stu.FirstName + ' ' + stu.LastName;\r\n aq.ClassName = stu.ClassName\r\n }\r\n })\r\n if ($scope.AssignmentProgress < $scope.AssignmentQueue.length) {\r\n //$scope.confirmText = \"Readying Assignments for Review...\"\r\n $scope.AssignmentProgress += 1\r\n $scope.AssignmentProgressPercent = Math.round(($scope.AssignmentProgress / $scope.AssignmentQueue.length) * 100)\r\n\r\n }\r\n else {\r\n \r\n }\r\n\r\n aq.EffectiveDateTime = new Date(aq.EffectiveDateTime)\r\n aq.EffectiveDateTime = aq.EffectiveDateTime.setHours(0, 1, 0, 0)\r\n //aq.EffectiveDateTime = aq.EffectiveDateTime.toISOString()\r\n aq.DueDateTime = new Date(aq.DueDateTime)\r\n aq.DueDateTime = aq.DueDateTime.setHours(23, 59, 0, 0)\r\n //aq.DueDateTime = aq.DueDateTime.toISOString()\r\n //aq.DueDateTime = $filter('date')(aq.DueDateTime, 'short')\r\n //aq.EffectiveDateTime = $filter('date')(aq.EffectiveDateTime, 'short')\r\n aq.AssignName = aq.Title.substring(aq.Title.indexOf('->') + 2);\r\n aq.AssignName = aq.AssignName.replace(/Q & A<\\/b>:|Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A:|Q & A/g, \"\");\r\n //$http.post(\"/Execute/GetUserAssignmentDetail\", [aq.Student_Id, aq.CourseId, aq.ChapterId, aq.TopicId ? 0 : aq.TopicId.toString(), aq.SubTopicId ? 0 : aq.SubTopicId.toString(), aq.AssessmentId]).success(function (data) {\r\n // //////console.log(data)\r\n // aq.History = data.RS_0;\r\n\r\n //})\r\n\r\n //////console.log(new Date(aq.EffectiveDateTime).toISOString().replace('.000Z', ''), new Date(aq.EffectiveDateTime + ' UTC'))\r\n //////console.log($rootScope.User.InstitutionId, aq)\r\n $http.post('/Execute/GetAssignmentDetailv3', [$rootScope.User.InstitutionId, aq.CourseId, aq.ChapterId, aq.TopicId, aq.SubTopicId, aq.AssessmentId, new Date(aq.DueDateTime).toISOString().replace('.000Z', ''), new Date(aq.EffectiveDateTime).toISOString().replace('.000Z', '')]).success(function (data) {\r\n $scope.AssignDefinitition = data.RS_0;\r\n if ($scope.AssignDefinitition.length > 0) {\r\n angular.forEach($scope.AssignDefinitition, function (ad) {\r\n //////console.log(ad.Student_id, aq.Student_Id)\r\n if (ad.Student_id == aq.Student_Id) {\r\n aq.Match = true;\r\n $scope.DuplicateAssignment = true;\r\n }\r\n\r\n //else {\r\n // aq.Match = false;\r\n //}\r\n \r\n })\r\n \r\n //////console.log($scope.AssignmentQueue)\r\n }\r\n if ((idx + 1) < total) {\r\n $scope.checkForDuplicates(idx + 1, total)\r\n $scope.confirmText = \"Readying Assignments for Review...\"\r\n }\r\n else {\r\n $scope.WaitForBuild = false;\r\n if ($scope.AssignmentQueue.length > 1) {\r\n $scope.confirmText = \"You are submitting \" + $scope.AssignmentQueue.length + \" Assignments. Each assignee will be notified. Please confirm details and click Submit.\";\r\n }\r\n else {\r\n $scope.confirmText = \"You are submitting \" + $scope.AssignmentQueue.length + \" Assignment. The assignee will be notified. Please confirm details and click Submit.\";\r\n }\r\n //toastr.clear()\r\n //toastr['success']('Assignments Ready for Review!'), {\r\n // autoDismiss: true,\r\n // timeOut: 200,\r\n // extendedTimeOut: 0,\r\n // closeButton: true,\r\n //}\r\n }\r\n //////console.log(data)\r\n });\r\n\r\n\r\n\r\n }\r\n }\r\n //angular.forEach($scope.AssignmentQueue, function (aq) {\r\n \r\n \r\n //})\r\n \r\n $scope.checkForDuplicates(0, $scope.AssignmentQueue.length)\r\n if ($scope.AssignmentQueue.length > 0) {\r\n //if ($scope.AssignmentQueue.length > 1) {\r\n // confirmText = \"You are submitting \" + $scope.AssignmentQueue.length + \" Assignments. Each assignee will be notified. Please confirm details and click Submit.\";\r\n //}\r\n //else {\r\n // confirmText = \"You are submitting \" + $scope.AssignmentQueue.length + \" Assignment. The assignee will be notified. Please confirm details and click Submit.\";\r\n //}\r\n \r\n \r\n \r\n ////////console.log(confirmText)\r\n \r\n $scope.confirmText = confirmText\r\n //if (confirm(confirmText)) {\r\n // $scope.SavingDisplay = \"in-line\";\r\n // $scope.saveprogress = 0;\r\n // $scope.processed = 0;\r\n // $scope.SavingDisplay = \"in-line\";\r\n // $scope.LoadingText = '';\r\n // ////////console.log($scope.AssignmentQueue);\r\n // //$scope.SaveSingleAssignment(0, $scope.AssignmentQueue.length);\r\n //}\r\n }\r\n else {\r\n $scope.confirmText = 'You have No Valid assignments.';\r\n }\r\n } else {\r\n $scope.confirmText ='You have Invalid assignments.\\nAssignments must have a \"Due Date\" AND at least one \"Assignee\"';\r\n }\r\n\r\n };\r\n function SendNotification(msg, fn) {\r\n $http.post(\"/SendNotification\", msg).success(fn);\r\n }\r\n $scope.SendAssignmentNotifications = function () {\r\n $scope.saveprogress = 0;\r\n var recipients = {};\r\n var cnt = 0;\r\n var sent = 0;\r\n $.each($scope.AssignmentQueue, function (idx, assignment) {\r\n if (!recipients[assignment.Student_Id.toString()]) {\r\n cnt += 1;\r\n recipients[assignment.Student_Id.toString()] = {};\r\n recipients[assignment.Student_Id.toString()].Updated = [];\r\n recipients[assignment.Student_Id.toString()].New = [];\r\n }\r\n var obj = {}\r\n obj.CourseId = assignment.CourseId;\r\n obj.ChapterId = assignment.ChapterId;\r\n obj.TopicId = assignment.TopicId;\r\n obj.SubTopicId = assignment.SubTopicId;\r\n obj.AssessmentId = assignment.AssessmentId;\r\n obj.Title = assignment.Title;\r\n obj.Curriculum = assignment.Curriculum;\r\n obj.Eff = assignment.EffectiveDateTime;\r\n obj.Due = assignment.DueDateTime;\r\n ////////console.log(assignment.Action)\r\n if (assignment.Action == \"Update\") {\r\n recipients[assignment.Student_Id.toString()].Updated.push(obj);\r\n }\r\n else {\r\n recipients[assignment.Student_Id.toString()].New.push(obj);\r\n }\r\n });\r\n User.getInstitution($scope.User, function (i) {\r\n var Institution = i.d\r\n ////////console.log(Institution)\r\n $.each(recipients, function (idx, recipient) {\r\n User.getById(idx, function (data) {\r\n var res;\r\n if (data[0]) { res = data[0] } else { res = data }\r\n var msg = {};\r\n msg.ToName = res.DisplayName;\r\n msg.ToAddress = res.Email;\r\n \r\n ////////console.log($scope.User)\r\n if (Institution.ImpersonateEmail == true) {\r\n msg.FromName = $scope.User.DisplayName;\r\n msg.FromAddress = $scope.User.Email;\r\n }\r\n else {\r\n msg.FromName = \"Challenger CME\";\r\n msg.FromAddress = \"donotreply@challengercorporation.com\";\r\n }\r\n if (recipient.Updated.length > 0 && recipient.New.length > 0) {\r\n msg.Subject = 'Attention ' + res.DisplayName + ' - You Have Both New and Changed Challenger Course Assignments'; //for ' + $scope.UserInfo.Institution.Description;\r\n\r\n }\r\n else {\r\n if (recipient.Updated.length > 0) {\r\n msg.Subject = 'Attention ' + res.DisplayName + ' - You Have Updated Challenger Course Assignments'; //for ' + $scope.UserInfo.Institution.Description;\r\n } else if (recipient.New.length > 0) {\r\n msg.Subject = 'Attention ' + res.DisplayName + ' - You Have New Challenger Course Assignments'; //for ' + $scope.UserInfo.Institution.Description;\r\n }\r\n }\r\n var ucount = 0;\r\n var rooturl = document.domain;\r\n //if (Institution.Domain != null) {\r\n // if (Institution.Domain.length > 0) {\r\n // rooturl = $.trim(Institution.Domain);\r\n // }\r\n //}\r\n \r\n msg.Body = \"The following work has been assigned to you by \" + $scope.User.DisplayName;\r\n msg.Body += '

You can access your assignments by clicking \"My Assignments\" in the left side menu in your Challenger account at ' + rooturl + '. Or, if you\\'ve selected \"remember me\" on your Challenger account, simply click on the link below

';\r\n $.each(recipient.Updated, function (i, ass) {\r\n ////////console.log(ass)\r\n var topicstr = \"\"\r\n if (ass.TopicId) {\r\n topicstr = \"&topicid=\" + ass.TopicId;\r\n }\r\n if (ucount == 0) { msg.Body += \"

Updated Assignments

\" }\r\n if (ass.CourseId == 0 || ass.TopicId == 0) {\r\n msg.Body += \"\" + 'Go to ' + $scope.AssignmentName + \"
Start Date: \" + formatDateforEmail(ass.Eff) + \"
Due Date: \" + formatDateforEmail(ass.Due) + \"

\";\r\n }\r\n else {\r\n msg.Body += \"\" + 'Go to ' + ass.Title + \"
Start Date: \" + formatDateforEmail(ass.Eff) + \"
Due Date: \" + formatDateforEmail(ass.Due) + \"

\";\r\n }\r\n \r\n ucount += 1;\r\n });\r\n var ncount = 0;\r\n $.each(recipient.New, function (i, ass) {\r\n ////////console.log(new Date(ass.Due))\r\n ////////console.log(new Date(ass.Eff))\r\n var topicstr = \"\"\r\n if (ass.TopicId) {\r\n topicstr = \"&topicid=\" + ass.TopicId;\r\n }\r\n if (ncount == 0) { msg.Body += \"

New Assignments

\" }\r\n if (ass.CourseId == 0 || ass.TopicId == 0) {\r\n msg.Body += \"\" + 'Go to ' + $scope.AssignmentName + \"
Start Date: \" + formatDateforEmail(ass.Eff) + \"
Due Date: \" + formatDateforEmail(ass.Due) + \"

\";\r\n }\r\n else {\r\n msg.Body += \"\" + 'Go to ' + ass.Title + \"
Start Date: \" + formatDateforEmail(ass.Eff) + \"
Due Date: \" + formatDateforEmail(ass.Due) + \"

\";\r\n }\r\n ncount += 1;\r\n });\r\n \r\n SendNotification(msg, function (data) {\r\n if (data.Result == \"Sent\") {\r\n sent += 1;\r\n if (sent == cnt) {\r\n $scope.SavingDisplay = \"none\";\r\n $scope.saveprogress = (sent / cnt) * 100\r\n $window.history.back();\r\n } else {\r\n $scope.saveprogress = (sent / cnt) * 100\r\n }\r\n }\r\n });\r\n });\r\n });\r\n });\r\n }\r\n $scope.gotoassignactivity = function () {\r\n ////console.log('testing acitivity redirect')\r\n $location.url('/Program/assignment-activity')\r\n }\r\n $scope.SaveSingleAssignment = function (idx, total, fn) {\r\n \r\n $scope.confirmText = 'Saving Assignments...'\r\n if (idx < total) {\r\n //////////console.log($scope.AssignmentQueue[idx]);\r\n var assignment = $scope.AssignmentQueue[idx];\r\n var p = [];\r\n //assignment.EffectiveDateTime = assignment.EffectiveDateTime.setHours(1);\r\n ////////console.log(assignment)\r\n p[0] = assignment.Student_Id;\r\n p[1] = assignment.CourseId.toString();\r\n p[2] = ((assignment.ChapterId != null) ? assignment.ChapterId : 0).toString();\r\n p[3] = ((isNaN(assignment.TopicId) == false && assignment.TopicId != '') ? assignment.TopicId : 0).toString();\r\n p[4] = ((isNaN(assignment.SubTopicId) == false && assignment.SubTopicId != '') ? assignment.SubTopicId : 0).toString();\r\n p[5] = ((assignment.AssessmentId != null) ? assignment.AssessmentId : 0).toString();\r\n p[6] = assignment.Passing_Score;\r\n p[7] = new Date(assignment.EffectiveDateTime).toISOString().replace('.000Z', '');\r\n p[8] = new Date(assignment.DueDateTime).toISOString().replace('.000Z', '');\r\n p[9] = assignment.AssignedByUserId;\r\n p[10] = assignment.Note;\r\n p[11] = $scope.AssessmentViewablity;\r\n p[12] = $scope.TimeLimit ? $scope.MinutesAllocated : 0;\r\n p[13] = $scope.LimitTries ? $scope.NumTries: 0;\r\n p[14] = ($scope.ShowLeaderBoard) ? $scope.ShowLeaderBoard : \"0\";\r\n p[15] = $scope.DisplayPracticeReview;\r\n p[16] = $scope.DisplayPrescription;\r\n p[17] = $scope.IdArray.join().toString();\r\n p[18] = (($scope.ReminderIncomplete == true) ? $scope.SendReminderHours * 24 : 0); //ReminderHours\r\n p[19] = $scope.SendDue; //DueDateNotify\r\n p[20] = (($scope.SendIncompletePending == true) ? $scope.SendPendingHours * 24 : 0); //PendingHours\r\n p[21] = $scope.SendCompleted; //NotifyComplete\r\n p[22] = ($scope.DueEmails) ? $scope.DueEmails : ''; //DueDateRecipients\r\n p[23] = ($scope.PendingEmails) ? $scope.PendingEmails : ''; //PendingRecipients\r\n p[24] = ($scope.CompleteEmails) ? $scope.CompleteEmails : ''; //CompleteRecipients\r\n p[25] = $scope.NotifyNewAssignment; //NotifyCode\r\n ////console.log(p)\r\n $http.post(\"/Execute/SaveAssignmentWithNotify\", p).success(function (data) {\r\n ////////console.log(data)\r\n $scope.AssignmentQueue[idx].Action = data.RS_0[0].Action;\r\n $scope.processed = idx;\r\n $scope.saveprogress = ((idx + 1) / total) * 100\r\n if ((idx + 1) < total) {\r\n $scope.SaveSingleAssignment(idx + 1, total, fn);\r\n ////////console.log('Save ' + idx)\r\n }\r\n else {\r\n \r\n fn()\r\n \r\n }\r\n //else {\r\n // if ($scope.NotifyNewAssignment == 1 || $scope.NotifyNewAssignment == 3) {\r\n // ////////console.log('Sent')\r\n // $scope.SendAssignmentNotifications();\r\n // //$scope.Waiting = false;\r\n // }\r\n // else {\r\n // ////////console.log('No email')\r\n // $window.history.back();\r\n // }\r\n \r\n //}\r\n });\r\n\r\n }\r\n }\r\n $scope.Waiting = false;\r\n $scope.SaveAssignment = function () {\r\n if ($scope.WaitForBuild == false) {\r\n if ($scope.Waiting == false) {\r\n $scope.Waiting = true\r\n \r\n $scope.SaveSingleAssignment(0, $scope.AssignmentQueue.length, function () {\r\n $scope.Waiting = false\r\n\r\n //toastr.clear()\r\n $scope.Editing = false\r\n $scope.AssessmentArray = []\r\n toastr['success']('Assignments Saved!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n $scope.gotoassignactivity()\r\n });\r\n }\r\n }\r\n };\r\n })\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('assignment', {\r\n url: '/assignment/:Ids',\r\n templateUrl: 'app/pages/assignments/assignment.html',\r\n title: 'Assignment',\r\n controller: 'AssignmentCtrl'\r\n })\r\n .state('newassignment', {\r\n url: '/assignment',\r\n templateUrl: 'app/pages/assignments/assignment.html',\r\n title: 'Assignment',\r\n controller: 'AssignmentCtrl'\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 12/20/2018\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.authortools', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('author', {\r\n url: '/author',\r\n abstract: true,\r\n template: '

',\r\n title: 'Authoring Tools',\r\n sidebarMeta: {\r\n icon: 'fa fa-pencil-square-o',\r\n order: 250,\r\n secure: {Allow: [\"Authors\", \"Administrators\"]}\r\n }\r\n })\r\n .state('author.newexam', {\r\n url: '/exam',\r\n overrideurl: '/author/exam',\r\n templateUrl: 'app/pages/courseware/newexam.html',\r\n title: 'Exam Builder',\r\n controller: 'NewExamCtl',\r\n controllerAs: 'vm',\r\n sidebarMeta: {\r\n order: 20\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts', [\r\n 'BlurAdmin.pages.charts.amCharts',\r\n 'BlurAdmin.pages.charts.chartJs',\r\n 'BlurAdmin.pages.charts.chartist',\r\n 'BlurAdmin.pages.charts.morris',\r\n 'BlurAdmin.pages.charts.assign'\r\n ])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts', {\r\n url: '/charts',\r\n abstract: true,\r\n template: '
',\r\n title: 'Charts',\r\n sidebarMeta: {\r\n icon: 'ion-stats-bars',\r\n order: 150,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author d.lapoint\r\n * created on 08/23/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.cmes', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('cmeparent', {\r\n url: '/c',\r\n abstract: true,\r\n template: '
',\r\n title: 'CME Credits',\r\n sidebarMeta: {\r\n icon: 'ion-ribbon-b',\r\n order: 200,\r\n secure: {Allow: [\"Learner\",\"Program Manager\"]}\r\n }\r\n })\r\n /*.state('cmeparent.cmes', {\r\n url: '/my-cmes',\r\n title: 'Find & Claim',\r\n templateUrl: '/app/pages/cmes/cmes.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-certificate',\r\n order: 2\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n\r\n }\r\n })*/\r\n .state('cmeparent.cmefinder', {\r\n url: '/cme-finder',\r\n title: 'Find CME',\r\n templateUrl: '/app/pages/cmes/cmefinderpage.html',\r\n sidebarMeta: {\r\n order: '100'\r\n }\r\n })\r\n .state('cmeparent.cmeclaims', {\r\n url: '/claim-cme',\r\n title: 'Claim CME',\r\n templateUrl: '/app/pages/cmes/cmeclaim.html',\r\n sidebarMeta: {\r\n order: '200'\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author k.danovsky\r\n * created on 15.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components', [\r\n 'BlurAdmin.pages.components.mail',\r\n 'BlurAdmin.pages.components.timeline',\r\n 'BlurAdmin.pages.components.tree',\r\n ])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('components', {\r\n url: '/components',\r\n template : '',\r\n abstract: true,\r\n title: 'Components',\r\n sidebarMeta: {\r\n icon: 'ion-gear-a',\r\n order: 100,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.courseware', [])\r\n .controller('SimulatorHistoryChartCtrl', function ($scope, $rootScope, $http, baConfig, $element, $uibModal, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var datavalues = [];\r\n function pad(number) {\r\n if (number < 10) {\r\n return '0' + number;\r\n }\r\n return number;\r\n }\r\n $scope.$watch('Complete', function (v) {\r\n if ($scope.Complete) {\r\n //////console.log($scope.Complete)\r\n $scope.Complete.forEach(function (a) {\r\n var dt = new Date(a.EndDateTime)\r\n a.CompleteDateTime = pad(dt.getUTCMonth() + 1) +\r\n '/' + pad(dt.getUTCDate()) +\r\n '/' + dt.getUTCFullYear() +\r\n ' ' + pad(dt.getUTCHours()) +\r\n ':' + pad(dt.getUTCMinutes()) +\r\n ':' + pad(dt.getUTCSeconds())\r\n });\r\n datavalues = $scope.Complete;\r\n\r\n var lineChart = AmCharts.makeChart(id, {\r\n type: 'serial',\r\n theme: 'blur',\r\n color: layoutColors.defaultText,\r\n marginTop: 0,\r\n marginRight: 15,\r\n dataProvider: datavalues,\r\n valueAxes: [\r\n {\r\n axisAlpha: 0,\r\n position: 'left',\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n }\r\n ],\r\n graphs: [\r\n {\r\n id: 'g1',\r\n balloonText: '[[value]]',\r\n bullet: 'round',\r\n bulletSize: 8,\r\n lineColor: layoutColors.danger,\r\n lineThickness: 1,\r\n negativeLineColor: layoutColors.warning,\r\n //type: 'smoothedLine',\r\n valueField: 'Score'\r\n }\r\n ],\r\n chartCursor: {\r\n categoryBalloonDateFormat: 'YYYY MMM DD',\r\n cursorAlpha: 0,\r\n valueLineEnabled: true,\r\n valueLineBalloonEnabled: true,\r\n valueLineAlpha: 0.5,\r\n fullWidth: true\r\n },\r\n dataDateFormat: 'MM/DD/YYYY HH:NN:SS',\r\n categoryField: 'CompleteDateTime',\r\n categoryAxis: {\r\n dateFormats: [\r\n {\r\n period: 'DD',\r\n format: 'DD'\r\n },\r\n {\r\n period: 'WW',\r\n format: 'MMM DD'\r\n },\r\n {\r\n period: 'MM',\r\n format: 'MMM'\r\n },\r\n {\r\n period: 'YYYY',\r\n format: 'YYYY'\r\n }\r\n ],\r\n parseDates: true,\r\n minorGridAlpha: 0.1,\r\n minorGridEnabled: true,\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n },\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-right',\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n\r\n lineChart.addListener('rendered', zoomChart);\r\n if (lineChart.zoomChart) {\r\n lineChart.zoomChart();\r\n }\r\n }\r\n\r\n });\r\n\r\n function zoomChart() {\r\n lineChart.zoomToIndexes(Math.round(lineChart.dataProvider.length * 0.4), Math.round(lineChart.dataProvider.length * 0.55));\r\n }\r\n }).controller('ExamCtl',function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.AssessmentId = $stateParams.Id;\r\n $scope.User = $rootScope.User;\r\n })\r\n .controller('NewExamCtl', function ($scope, $rootScope, $http, $window, $stateParams, $uibModal, $filter, $state, $timeout, $location, toastr, toastrConfig) {\r\n var vm = this;\r\n $scope.qfilter = \"\";\r\n //console.log($scope.User)\r\n $scope.treeFilter = $filter('uiTreeFilterStatus');\r\n \r\n $scope.SelectedCustomQs = [];\r\n if ($window.location.pathname == '/examinst') {\r\n vm.IsIntitution = true;\r\n } else {\r\n vm.IsIntitution = false;\r\n }\r\n $scope.goToBuild = function () {\r\n $rootScope.$broadcast(\"buildme\", 3);\r\n }\r\n $scope.CheckAllChidlrenSelected = function (parent) {\r\n ////console.log(parent)\r\n var SelectedChilrenCount = 0\r\n parent.SelectedCount = 0\r\n parent.QuestionCount = 0\r\n angular.forEach(parent.nodes, function (child) {\r\n if (child.nodes) {\r\n child.Selected = $scope.CheckAllChidlrenSelected(child)\r\n parent.SelectedCount += child.SelectedCount\r\n parent.QuestionCount += child.QuestionCount\r\n if (child.Selected){\r\n SelectedChilrenCount += 1\r\n }\r\n } else {\r\n\r\n parent.QuestionCount += 1\r\n if (child.Selected) {\r\n parent.SelectedCount += 1\r\n child.Parentname = parent.Name\r\n $scope.SelectedCustomQs.push(child)\r\n SelectedChilrenCount += 1\r\n }\r\n }\r\n });\r\n if (parent.nodes) {\r\n ////console.log(SelectedChilrenCount)\r\n return (SelectedChilrenCount == parent.nodes.length);\r\n } \r\n }\r\n $scope.SetNodeSelected = function (n, p) {\r\n //console.log(n,p)\r\n angular.forEach(n.nodes, function (nd) {\r\n nd.Selected = n.Selected;\r\n //console.log(nd)\r\n if (n.nodes) {\r\n $scope.parentname = n.Name\r\n $scope.SetNodeSelected(nd, n);\r\n }\r\n else {\r\n nd.parent = $scope.parentname\r\n $scope.parentname = ''\r\n }\r\n })\r\n if (p == null) {\r\n $scope.SelectedCustomQs = [];\r\n angular.forEach($scope.QuestionTree, function (nd) {\r\n if (nd.nodes) {\r\n //console.log(nd)\r\n $scope.parentname = n.Name\r\n nd.Selected = $scope.CheckAllChidlrenSelected(nd)\r\n }\r\n else {\r\n nd.parentname = $scope.parentname\r\n $scope.parentname = ''\r\n }\r\n })\r\n $scope.SelectedFavorites = [];\r\n angular.forEach($scope.Favorites, function (nd) {\r\n if (nd.Selected) {\r\n $scope.SelectedFavorites.push(nd)\r\n }\r\n if (nd.nodes) {\r\n \r\n //console.log(nd)\r\n $scope.parentname = n.Name\r\n nd.Selected = $scope.CheckAllChidlrenSelected(nd)\r\n }\r\n else {\r\n nd.parentname = $scope.parentname\r\n $scope.parentname = ''\r\n }\r\n\r\n })\r\n \r\n }\r\n //console.log($scope.SelectedCustomQs)\r\n //console.log($scope.SelectedFavorites)\r\n }\r\n $scope.CheckAllChildSelected = function (parent) {\r\n ////console.log(parent)\r\n var SelectedChilrenCount = 0\r\n parent.SelectedCount = 0\r\n parent.QuestionCount = 0\r\n angular.forEach(parent.nodes, function (child) {\r\n if (child.nodes) {\r\n child.Selected = $scope.CheckAllChildSelected(child)\r\n parent.SelectedCount += child.SelectedCount\r\n parent.QuestionCount += child.QuestionCount\r\n if (child.Selected) {\r\n SelectedChilCount += 1\r\n }\r\n } else {\r\n parent.QuestionCount += 1\r\n if (child.Selected) {\r\n parent.SelectedCount += 1\r\n child.Parentname = parent.Name\r\n $scope.SelectedCustomQs.push(child)\r\n SelectedChildCount += 1\r\n }\r\n }\r\n });\r\n if (parent.nodes) {\r\n ////console.log(SelectedChilrenCount)\r\n return (SelectedChilCount == parent.nodes.length);\r\n }\r\n }\r\n $scope.DistinctCount = function () {\r\n console.log(\"Distinct Count\");\r\n var FavCount = 0\r\n var CustCount = 0\r\n var RegCount = 0\r\n //console.table([$scope.SelectedFavorites,$scope.SelectedCustomQs])\r\n if (Array.isArray($scope.SelectedFavorites)) {\r\n FavCount = $scope.SelectedFavorites.length\r\n if ($scope.SelectedQuestions) {\r\n angular.forEach($scope.SelectedQuestions, function (reg) {\r\n var found = false\r\n angular.forEach($scope.SelectedFavorites, function (fav) {\r\n //console.log(reg,fav)\r\n if (fav.SourceId == 1 && fav.Id == reg) {\r\n found = true;\r\n }\r\n })\r\n if (found == false) {\r\n RegCount += 1\r\n }\r\n })\r\n }\r\n if (Array.isArray($scope.SelectedCustomQs)) {\r\n angular.forEach($scope.SelectedCustomQs, function (cus) {\r\n var found = false\r\n angular.forEach($scope.SelectedFavorites, function (fav) {\r\n if (fav.SourceId == 0 && fav.Id == cus.Id) {\r\n found = true;\r\n }\r\n })\r\n if (found == false) {\r\n CustCount += 1\r\n }\r\n })\r\n }\r\n //console.log(CustCount,RegCount,FavCount)\r\n return CustCount + RegCount + FavCount\r\n } else {\r\n return ($scope.SelectedCustomQs.length + $scope.SelectedQuestions.length)\r\n }\r\n \r\n }\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n \r\n vm.Exam = { Name: \"Custom Exam\", QCount: 20 };\r\n vm.Exam.Simple = true\r\n vm.Sectionize = false\r\n vm.SectionizeMethod = \"Chapter\"\r\n $scope.oldtab = 0\r\n $scope.tabcontent = []\r\n $scope.tabcontent.Id = ''\r\n $rootScope.active = 0\r\n $scope.removeQuestion = function (q) {\r\n angular.forEach($rootScope.SelectedQuestions, function (sel) {\r\n if (q == sel) {\r\n // ////console.log(sel)\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + q, true)\r\n // $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n }\r\n\r\n })\r\n \r\n }\r\n $scope.removeTab = function (idx, c) {\r\n $scope.numberSelected = 0\r\n $scope.GetAnswer = function () {\r\n swal({\r\n title: \"You have selected questions from this course.\",\r\n text: \"Removing this Course will remove all selected questions from this course unless the questions are contained in another course currently in use in this Custom Exam. Do you want to proceed?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $scope.removeTabQs(idx, c)\r\n //$scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n $scope.courseTabs.splice(idx, 1)\r\n $scope.activeTab($scope.courseTabs[0], $scope.courseList, 0)\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n }\r\n })\r\n }\r\n angular.forEach(c.Chapters, function (chap) {\r\n angular.forEach(chap.Topics, function (top) {\r\n angular.forEach(top.Assessments, function (ass) {\r\n angular.forEach(ass.Questions, function (ques) {\r\n if (ques.Selected == true) {\r\n \r\n $scope.numberSelected++\r\n \r\n }\r\n })\r\n })\r\n \r\n })\r\n })\r\n if ($scope.numberSelected == 0) {\r\n //$scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n $scope.courseTabs.splice(idx, 1)\r\n $scope.activeTab($scope.courseTabs[0], $scope.courseList, 0)\r\n }\r\n else {\r\n $scope.GetAnswer()\r\n }\r\n //////console.log($scope.SelectedQuestions.length, $rootScope.SelectedQuestions.length)\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n }\r\n $scope.ViewNode = function (node) {\r\n node.isCollapsed = !node.isCollapsed\r\n }\r\n $scope.removeTabQs = function (idx, c) {\r\n $scope.QsToRemove = []\r\n angular.forEach(c.Chapters, function (chap) {\r\n angular.forEach(chap.Topics, function (top) {\r\n angular.forEach(top.Assessments, function (ass) {\r\n angular.forEach(ass.Questions, function (ques) {\r\n if (ques.Selected == true) {\r\n $scope.QsToRemove.push(ques.QuestionId)\r\n\r\n\r\n //angular.forEach($rootScope.SelectedQuestions, function (sel) {\r\n // if (ques.QuestionId == sel) {\r\n // $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n // }\r\n //})\r\n }\r\n })\r\n })\r\n\r\n })\r\n })\r\n ////console.log($scope.QsToRemove)\r\n angular.forEach($scope.courseTabs, function (ct) {\r\n if (ct.Id !== c.Id) {\r\n //////console.log(ct.Id, c.Id)\r\n angular.forEach(ct.Chapters, function (ctchp) {\r\n angular.forEach(ctchp.Topics, function (cttop) {\r\n angular.forEach(cttop.Assessments, function (ctass) {\r\n angular.forEach(ctass.Questions, function (ctq) {\r\n if (ctq.Selected == true) {\r\n angular.forEach($scope.QsToRemove, function (qs) {\r\n if (ctq.QuestionId == qs) {\r\n ////console.log(qs)\r\n $scope.QsToRemove = $filter('filter')($scope.QsToRemove, '!' + qs, true)\r\n }\r\n })\r\n }\r\n })\r\n })\r\n })\r\n })\r\n }\r\n })\r\n ////console.log($scope.QsToRemove)\r\n angular.forEach($scope.QsToRemove, function (quess) {\r\n $scope.removeQuestion(quess)\r\n })\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n }\r\n $scope.tempcoursecheck = \"\"\r\n\r\n $scope.activeTab = function (ct, cl, idx) {\r\n if (ct.Name == '+ Add Course') {\r\n ct.Name = 'Select Course'\r\n ct.Id = -1\r\n ct.Chapters = []\r\n $scope.courseTabs.push({\r\n Name: '+ Add Course',\r\n Id: -2,\r\n Chapters: []\r\n })\r\n }\r\n $scope.setDisabled(cl, idx)\r\n $scope.ChangeMe(ct)\r\n $scope.setActiveTab(idx)\r\n $timeout(function () {\r\n $('.inlineselect').selectpicker('refresh')\r\n })\r\n //////console.log($scope.courseTabs)\r\n //////console.log($scope.courseList)\r\n }\r\n $scope.setActiveTab = function (tab) {\r\n $rootScope.active = tab\r\n //////console.log(tab)\r\n }\r\n $scope.setDisabled = function (courses, idx) {\r\n angular.forEach(courses, function (cr) {\r\n cr.trialAlert = false\r\n })\r\n //console.log(courses)\r\n for (var i = $scope.courseTabs.length-1;i >= 0; i--) {\r\n for (var x = courses.length-1; x >= 0; x--) {\r\n ////console.log($scope.courseTabs[i].Id, courses[x].Id)\r\n if ($scope.courseTabs[i]) {\r\n if ($scope.courseTabs[i].Id.toString()) {\r\n ////console.log($scope.courseTabs[i].Id)\r\n if (($scope.courseTabs[i].Id.toString() == courses[x].Id.toString() && i !== idx) || courses[x].IsTrial == \"1\") {\r\n ////console.log($scope.courseTabs[i].Id, courses[x].Id)\r\n //////console.log(courses[x])\r\n courses[x].trialAlert = true\r\n }\r\n }\r\n }\r\n \r\n else {\r\n return\r\n }\r\n }\r\n }\r\n ////console.log(courses)\r\n }\r\n $scope.SaveExam = function () {\r\n //////console.log(vm.Exam.QCount)\r\n if ($scope.Questions.length == 0) {\r\n toastr['error']('This exam contains 0 questions. You need at least 1 question to create an exam.')\r\n }\r\n if ($scope.Questions.length >= 1) {\r\n //////console.log(JSON.stringify(vm.Exam));\r\n $scope.ExamSubmitted = true;\r\n vm.Exam.QCount = 1 * vm.Exam.QCount;\r\n $http.post(\"/SaveCustomExam\", vm.Exam).success(function (data) {\r\n //////console.log(data);\r\n $rootScope.NewCustomExamId = data;\r\n $scope.ExamCreated = true;\r\n $scope.ExamSubmitted = false;\r\n swal({\r\n title:'Your custom exam has been created!',\r\n text: 'You\\'ll now be taken to your list of custom exams. Your new exam will be at the top of the list.',\r\n type:'success'\r\n }, function () {\r\n window.removeEventListener('beforeunload', changing)\r\n $window.location.href = \"/e/customexams\";\r\n })\r\n\r\n });\r\n } \r\n };\r\n $scope.CalculateTotal = function (total) {\r\n if (total > 300) {\r\n total = 300;\r\n }\r\n \r\n vm.Exam.QCount = total;\r\n //////console.log(vm.Exam.QCount)\r\n }\r\n $scope.CalculateQCount = function (e,section) {\r\n ////////console.log(e);\r\n ////console.log(vm.Exam.Sections)\r\n if (!isNumeric(section.QCount)) {\r\n section.QCount = 1;\r\n }\r\n if (section.QCount > section.Questions.length) {\r\n section.QCount = section.Questions.length;\r\n } \r\n vm.Exam.QCount = 0;\r\n angular.forEach(vm.Exam.Sections, function (s) {\r\n if (section.QCount < 1) {\r\n section.QCount = 1\r\n }\r\n vm.Exam.QCount += parseInt(s.QCount);\r\n });\r\n //console.log(section)\r\n }\r\n $scope.Questions = [];\r\n $scope.BuildQuestions = function () {\r\n console.log(\"Build Questions\")\r\n $scope.Questions = [];\r\n //if (vm.Exam.QCount > $rootScope.SelectedQuestions.length) {\r\n // vm.Exam.QCount = $rootScope.SelectedQuestions.length;\r\n //}\r\n //console.log($scope.courseTabs)\r\n angular.forEach($scope.courseTabs, function (ct) {\r\n ct.SelectedCount = 0\r\n angular.forEach(ct.Chapters, function (chapter) {\r\n angular.forEach(chapter.Assessments, function (assessment) {\r\n angular.forEach(assessment.Questions, function (question) {\r\n if (question.Selected) {\r\n ct.SelectedCount += 1\r\n //vm.Exam.Sections[0].Questions.push(question);\r\n $scope.Questions.push(\r\n {\r\n \"QuestionId\": question.QuestionId,\r\n \"TopicId\": question.TopicId,\r\n \"TopicName\": question.TopicName,\r\n \"ChapterId\": question.ChapterId,\r\n \"ChapterName\": question.ChapterName,\r\n \"CourseName\": question.CourseName,\r\n \"CourseId\": question.CourseId,\r\n \"SourceId\": 1\r\n });\r\n }\r\n });\r\n });\r\n angular.forEach(chapter.Topics, function (topic) {\r\n angular.forEach(topic.Assessments, function (assessment) {\r\n angular.forEach(assessment.Questions, function (question) {\r\n if (question.Selected) {\r\n ct.SelectedCount += 1\r\n //vm.Exam.Sections[0].Questions.push(question);\r\n $scope.Questions.push(\r\n {\r\n \"QuestionId\": question.QuestionId,\r\n \"TopicId\": question.TopicId,\r\n \"TopicName\": question.TopicName,\r\n \"ChapterId\": question.ChapterId,\r\n \"ChapterName\": question.ChapterName,\r\n \"CourseName\": question.CourseName,\r\n \"CourseId\": question.CourseId,\r\n \"SourceId\": 1\r\n });\r\n }\r\n });\r\n });\r\n });\r\n \r\n });\r\n if (ct.Id == 0) {\r\n ct.SelectedCount = $scope.SelectedCustomQs.length\r\n }\r\n if (ct.Id == -10) {\r\n ct.SelectedCount = $scope.Favorites.length\r\n }\r\n })\r\n vm.Topics = [];\r\n vm.Chapters = [];\r\n vm.CustomQSections = []\r\n vm.CourseCount = 0;\r\n angular.forEach($scope.SelectedCustomQs, function (cq) {\r\n ////console.log(cq);\r\n $scope.Questions.push(\r\n {\r\n \"QuestionId\": cq.Id,\r\n \"TopicId\": 0,\r\n \"TopicName\": \"Custom Questions\",\r\n \"ChapterId\": 0,\r\n \"ChapterName\": \"Custom Questions\",\r\n \"CourseName\": \"Custom Questions\",\r\n \"CourseId\": 0,\r\n \"SourceId\": 0,\r\n \"Parentname\": cq.Parentname\r\n });\r\n\r\n });\r\n //console.log($scope.SelectedFavorites)\r\n angular.forEach($scope.SelectedFavorites, function (cq) {\r\n //console.log(cq);\r\n $scope.Questions.push(\r\n {\r\n \"QuestionId\": cq.Id,\r\n \"TopicId\": -2,\r\n \"TopicName\": \"Favorite Questions\",\r\n \"ChapterId\": -2,\r\n \"ChapterName\": \"Favorite Questions\",\r\n \"CourseName\": \"Favorite Questions\",\r\n \"CourseId\": 0,\r\n \"SourceId\": cq.SourceId,\r\n \"Parentname\": \"Favorites\"\r\n });\r\n\r\n })\r\n angular.forEach($scope.courseTabs, function (ct) {\r\n if (ct.Id > -1) {\r\n vm.CourseCount += 1\r\n }\r\n })\r\n console.log($scope.Questions)\r\n angular.forEach($scope.Questions, function (q) {\r\n if ((q.TopicId > 0 && q.CourseId > 0) || q.CourseId == 0 || !q.Parentname) {\r\n var topic = null\r\n\r\n angular.forEach(vm.Topics, function (t) {\r\n if (t.Id == q.TopicId) {\r\n topic = t;\r\n }\r\n });\r\n if (topic == null) {\r\n topic = { Id: q.TopicId, Name: q.TopicName }\r\n vm.Topics.push(topic);\r\n }\r\n\r\n } \r\n if ((q.ChapterId > 0 && q.CourseId > 0) || q.CourseId == 0 || !q.Parentname) {\r\n // //////console.log(q)\r\n var chapter = null\r\n angular.forEach(vm.Chapters, function (ch) {\r\n ////////console.log(vm.Chapters)\r\n if (ch.Id == q.ChapterId) {\r\n chapter = ch;\r\n }\r\n });\r\n if (chapter == null) {\r\n chapter = { Id: q.ChapterId, Name: q.ChapterName }\r\n vm.Chapters.push(chapter);\r\n ////////console.log(vm.Chapters)\r\n }\r\n }\r\n if (q.Parentname) {\r\n var custom = null\r\n angular.forEach(vm.CustomQSections, function (cq) {\r\n if (cq.Parentname == q.Parentname) {\r\n custom = cq;\r\n }\r\n });\r\n if (custom == null) {\r\n custom = { Parentname: q.Parentname }\r\n vm.CustomQSections.push(custom);\r\n }\r\n //console.log(vm.CustomQSections)\r\n }\r\n\r\n });\r\n \r\n $scope.BuildSections(vm.Sectionize, vm.SectionizeMethod);\r\n }\r\n $scope.TabChanged = function (t) {\r\n //////console.log(t, $scope.Questions.length, ($rootScope.SelectedQuestions.length + $scope.SelectedCustomQs.length) > 1)\r\n //if ((t == 3 || t == 2) && ($rootScope.SelectedQuestions.length + $scope.SelectedCustomQs.length + $scope.SelectedFavorites.length) > 1) {\r\n if ((t == 3 || t == 2) && $scope.DistinctCount() > 1) {\r\n if (t == 3) {\r\n $scope.CheckValid(1, 3)\r\n if ($scope.oldtab == 1) {\r\n $scope.BuildQuestions();\r\n }\r\n }\r\n if (t == 2) {\r\n $scope.CheckValid(1, 2)\r\n if ($scope.oldtab !== 3) {\r\n $scope.BuildQuestions();\r\n }\r\n \r\n }\r\n \r\n };\r\n $scope.oldtab = t\r\n };\r\n $scope.ClearQuestions = function (course, idx) {\r\n swal({\r\n title: \"This will clear all selected questions across all tabs/courses.\",\r\n text: \"Are you sure you want to clear all questions from currently selected courses?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $rootScope.SelectedQuestions = [];\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n $scope.ChangeMe($scope.courseTabs[$rootScope.active]);\r\n }\r\n\r\n })\r\n \r\n }\r\n $scope.StartOver = function () {\r\n swal({\r\n title: \"This will clear all selected questions and remove all currently selected courses from this custom exam.\",\r\n text: \"Are you sure you want to reset this custom exam?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $rootScope.SelectedQuestions = [];\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n //$scope.ChangeMe($scope.courseTabs[$rootScope.active]);\r\n $('.inlineselect').selectpicker('refresh')\r\n $scope.courseTabs = []\r\n $scope.beginCustom()\r\n $timeout(function () {\r\n $scope.ChangeMe($scope.courseTabs[0])\r\n $scope.setActiveTab(0)\r\n }, 100)\r\n }\r\n })\r\n }\r\n function CheckSectionTotalQCount(sections) {\r\n var q = 0\r\n angular.forEach(sections, function (s) {\r\n q= q + s.QCount\r\n })\r\n return q\r\n }\r\n $scope.BuildSections = function (Sectionize, SectionizeMethod) {\r\n //console.log(vm.Exam.QCount)\r\n vm.Exam.Sections = [];\r\n if (Sectionize) {\r\n if (SectionizeMethod == \"Topic\") {\r\n angular.forEach(vm.Topics, function (t) {\r\n //console.log(t)\r\n var s = { Name: t.Name, QCount: Math.floor(vm.Exam.QCount / vm.Topics.length), Questions: [] };\r\n //console.log(s)\r\n angular.forEach($scope.Questions, function (q) {\r\n if (q.TopicId == t.Id) {\r\n s.Questions.push(q);\r\n }\r\n });\r\n if (s.QCount > s.Questions.length) {\r\n s.QCount = s.Questions.length\r\n }\r\n vm.Exam.Sections.push(s);\r\n });\r\n \r\n } else if (SectionizeMethod == \"Chapter\") {\r\n //console.log(vm.Chapters)\r\n angular.forEach(vm.Chapters, function (ch) {\r\n //////console.log(vm.Chapters)\r\n var s = { Name: ch.Name, QCount: Math.floor(vm.Exam.QCount / vm.Chapters.length), Questions: [] };\r\n //console.log(s)\r\n angular.forEach($scope.Questions, function (q) {\r\n if (q.ChapterId == ch.Id) {\r\n s.Questions.push(q);\r\n }\r\n });\r\n if (s.QCount > s.Questions.length) {\r\n s.QCount = s.Questions.length\r\n }\r\n vm.Exam.Sections.push(s);\r\n //////console.log(vm.Exam)\r\n });\r\n }\r\n while (CheckSectionTotalQCount(vm.Exam.Sections) < vm.Exam.QCount) {\r\n angular.forEach(vm.Exam.Sections, function (s) {\r\n if (s.QCount < s.Questions.length) {\r\n if (CheckSectionTotalQCount(vm.Exam.Sections) < vm.Exam.QCount) {\r\n s.QCount += 1;\r\n }\r\n }\r\n })\r\n }\r\n //if (vm.CustomQSections) {\r\n // angular.forEach(vm.CustomQSections, function (c) {\r\n // var s = { Name: c.Parentname, QCount: Math.round(vm.Exam.QCount / vm.Topics.length), Questions: [] };\r\n // angular.forEach($scope.Questions, function (q) {\r\n // if (c.Parentname == q.Parentname) {\r\n // s.Questions.push(q);\r\n // }\r\n // });\r\n\r\n // if (s.QCount > s.Questions.length) {\r\n // s.QCount = s.Questions.length\r\n // }\r\n // vm.Exam.Sections.push(s);\r\n // })\r\n //}\r\n vm.Exam.QCount = 0;\r\n angular.forEach(vm.Exam.Sections, function (s) {\r\n if (s.QCount < 1) {\r\n s.QCount = 1;\r\n }\r\n vm.Exam.QCount += parseInt(s.QCount);\r\n });\r\n ////console.log(vm.Exam)\r\n } else {\r\n vm.Exam.Sections = [{\r\n QCount: vm.Exam.QCount\r\n }]\r\n vm.Exam.Sections[0].Questions = []\r\n vm.Exam.Sections[0].CourseNames = []\r\n \r\n vm.Exam.Sections.Name = ''\r\n angular.forEach($scope.courseTabs, function (ct) {\r\n \r\n if (ct.Id > -1) {\r\n //$scope.ChangeMe(ct)\r\n //////console.log(ct)\r\n vm.Exam.Sections[0].Name = vm.Exam.Sections.Name + ', ' + ct.Name\r\n if (ct.SelectedCount)\r\n var s = {\r\n CourseNames: ct.Name,\r\n QCount: ct.SelectedCount\r\n }\r\n // vm.Exam.Sections = [{ Name: ct.Name, QCount: vm.Exam.QCount }]\r\n angular.forEach($scope.Questions, function (q) {\r\n if (q.CourseId == ct.Id) {\r\n vm.Exam.Sections[0].Questions.push(q);\r\n }\r\n\r\n });\r\n \r\n //s.QCount = s.Questions.length\r\n vm.Exam.Sections[0].CourseNames.push(s)\r\n }\r\n else if (ct.Id == -10) {\r\n vm.Exam.Sections[0].Name = 'Favorites';\r\n vm.Exam.Sections[0].CourseNames.push('Favorites')\r\n angular.forEach($scope.Questions, function (q) {\r\n if (q.CourseId == 0 && q.ChapterId == -2 && q.TopicId == -2) {\r\n vm.Exam.Sections[0].Questions.push(q);\r\n }\r\n\r\n });\r\n }\r\n })\r\n \r\n }\r\n //console.log(vm.Exam)\r\n }\r\n $rootScope.SelectedQuestions = [];\r\n $rootScope.SelectedCourses = [];\r\n var changing = function (event, next) {\r\n if ($rootScope.SelectedQuestions.length + $scope.SelectedCustomQs.length > 0) {\r\n ////console.log('test listener')\r\n event.returnValue = function () {\r\n return true\r\n }\r\n }\r\n }\r\n $rootScope.$on('$stateChangeStart', function (event, next) {\r\n // //console.log(next)\r\n window.removeEventListener('beforeunload', changing)\r\n if ($rootScope.SelectedQuestions.length + $scope.SelectedCustomQs.length > 0) {\r\n event.preventDefault();\r\n swal({\r\n title:\"You are still building an exam.\",\r\n text:\"Do you want to leave?\",\r\n type:\"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $rootScope.SelectedQuestions = [];\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n if (next.url.search(':Id') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':Id', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n window.location.href = next.overrideurl\r\n }\r\n else if (next.url.search(':CourseId') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':CourseId', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n //$window.location.href = next.url\r\n window.location.href = next.overrideurl\r\n }\r\n else {\r\n //console.log(next.overrideurl)\r\n window.location.href = next.url\r\n }\r\n //$window.location.href = next.url\r\n }\r\n else if (result.dismiss === 'cancel') {\r\n window.addEventListener('beforeunload', changing)\r\n event.preventDefault();\r\n }\r\n \r\n })\r\n \r\n }\r\n });\r\n\r\n \r\n \r\n window.addEventListener('beforeunload', changing)\r\n\r\n //$window.onbeforeunload = function () {\r\n // if ($rootScope.SelectedQuestions !== []) {\r\n // return 'Are you sure you want to leave?';\r\n // }\r\n //};\r\n\r\n $scope.CheckValid = function (from, to) {\r\n console.log(from+\",\"+to);\r\n var retval;\r\n if (from !== to) {\r\n switch (from) {\r\n case 1:\r\n if ($rootScope.SelectedQuestions.length > vm.Exam.QCount && $scope.customexamsearch == true) {\r\n toastr['error']('Hit the Save button to add searched questions');\r\n retval = false;\r\n }\r\n else {\r\n retval = true;\r\n }\r\n if (0 >= vm.Exam.QCount) {\r\n toastr['error']('Your Custom Exam needs at least 1 question.');\r\n retval = false;\r\n }\r\n if ($scope.SelectedCustomQs) {\r\n if ($scope.SelectedFavorites) {\r\n //if (vm.Exam.QCount > ($scope.SelectedQuestions.length + $scope.SelectedCustomQs.length + $scope.SelectedFavorites.length)) {\r\n if (vm.Exam.QCount > $scope.DistinctCount()) {\r\n toastr['error']('Questions to appear cannot be greater than the total number of questions.');\r\n retval = false;\r\n }\r\n } else {\r\n //if (vm.Exam.QCount > ($scope.SelectedQuestions.length + $scope.SelectedCustomQs.length + $scope.SelectedFavorites.length)) {\r\n if (vm.Exam.QCount > $scope.DistinctCount()) {\r\n toastr['error']('Questions to appear cannot be greater than the total number of questions.');\r\n retval = false;\r\n }\r\n }\r\n\r\n }\r\n else {\r\n if (Array.isArray($scope.SelectedFavorites)) {\r\n if (vm.Exam.QCount > ($scope.SelectedQuestions.length + $scope.SelectedFavorites.length)) {\r\n toastr['error']('Questions to appear cannot be greater than the total number of questions.');\r\n retval = false;\r\n }\r\n } else {\r\n if (vm.Exam.QCount > ($scope.SelectedQuestions.length)) {\r\n toastr['error']('Questions to appear cannot be greater than the total number of questions.');\r\n retval = false;\r\n }\r\n }\r\n }\r\n return retval;\r\n default:\r\n return true;\r\n }\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n $scope.SelectQuestion = function (ques, v) {\r\n\r\n ques.Selected = v;\r\n if (ques.Selected === true) {\r\n //$rootScope.TotalSelected++\r\n $rootScope.SelectedQuestions.push(ques.QuestionId)\r\n }\r\n if (ques.Selected === false) {\r\n //$rootScope.TotalSelected--\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n }\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n ////////console.log($parent.ques)\r\n }\r\n $scope.SetAssessmentSelected = function (Assessment) {\r\n \r\n angular.forEach(Assessment.Questions, function (q) {\r\n if (q.Selected) {\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + q.QuestionId, true)\r\n \r\n }\r\n q.Selected = Assessment.Selected;\r\n \r\n $scope.SelectQuestion(q, q.Selected)\r\n });\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n //////console.log($rootScope.SelectedQuestions)\r\n };\r\n $scope.SetTopicSelected = function (Topic) {\r\n angular.forEach(Topic.Assessments, function (a) {\r\n a.Selected = Topic.Selected;\r\n $scope.SetAssessmentSelected(a);\r\n });\r\n };\r\n $scope.SetChapterSelected = function (Chapter) {\r\n angular.forEach(Chapter.Assessments, function (a) {\r\n a.Selected = Chapter.Selected;\r\n $scope.SetAssessmentSelected(a);\r\n });\r\n angular.forEach(Chapter.Topics, function (t) {\r\n t.Selected = Chapter.Selected;\r\n $scope.SetTopicSelected(t);\r\n });\r\n //console.log(Chapter)\r\n };\r\n $scope.SetCourseSelected = function (Course) {\r\n angular.forEach(Course.Chapters, function (ch) {\r\n ch.Selected = Course.Selected\r\n $scope.SetChapterSelected(ch)\r\n })\r\n ////console.log(Course)\r\n }\r\n $scope.User = $rootScope.User;\r\n angular.forEach($rootScope.UserRoles, function (ur) {\r\n if (ur.RoleID == '37' || ur.RoleID == '40') \r\n {\r\n $scope.PreviewQuestions = true;\r\n }\r\n })\r\n $scope.CheckSelectedQs = function (qu) {\r\n angular.forEach(qu, function (rq) {\r\n rq.Selected = false;\r\n angular.forEach($rootScope.SelectedQuestions, function (sq) {\r\n if (rq.QuestionId === sq) {\r\n rq.Selected = true;\r\n //////console.log('true')\r\n }\r\n //else {\r\n // rq.Selected = false;\r\n //}\r\n if (sq.length=== 0) {\r\n rq.Selected = false;\r\n //////console.log('false')\r\n }\r\n })\r\n\r\n })\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n ////////console.log(qu)\r\n ////////console.log($rootScope.SelectedQuestions)\r\n }\r\n $scope.CurrentCourse = [];\r\n $scope.SelectTemplate = function (v) {\r\n $scope.selectedExam = v;\r\n }\r\n $scope.ChapterExamTemplate = function (c, tab) {\r\n $http.get('/api/Assessments(' + c.AssessmentId + 'L)/Sections?$expand=SectionQuestions').success(function (dta) {\r\n $scope.Assessment = dta.d\r\n angular.forEach($scope.Assessment, function (as) {\r\n angular.forEach(as.SectionQuestions, function (sq) {\r\n if ($rootScope.SelectedQuestions.indexOf(sq.Questions_Id) == -1) {\r\n $rootScope.SelectedQuestions.push(sq.Questions_Id)\r\n }\r\n })\r\n })\r\n //vm.Exam.QCount = parseInt($scope.Assessment.length)\r\n $scope.ChangeMe(tab)\r\n ////////console.log($rootScope.SelectedQuestions)\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n })\r\n }\r\n $scope.trialAlert = false\r\n $scope.ChangeMe = function (c) {\r\n $scope.CustomQuestions = true;\r\n $scope.Bookmarks = false;\r\n $scope.ChapterExams = [];\r\n //console.log(c.Id)\r\n if (c.Id>0) {\r\n //console.log('zz')\r\n $scope.CustomQuestions = false;\r\n $http.post('/Execute/GetCourseChaptersAndQuestionPools', [c.Id]).success(function (data) {\r\n $scope.CourseAssess = data.RS_1;\r\n //console.log(data)\r\n angular.forEach($scope.CourseAssess, function (ca) {\r\n if (ca.AssessmentType == 'Baseline Exam') {\r\n $scope.ChapterExams.push({\r\n Name: ca.Name,\r\n AssessmentId: ca.Assessment_Id\r\n })\r\n }\r\n })\r\n });\r\n $http.get('/api/Courses(' + c.Id + 'L)/CourseChapters?$expand=Chapter').success(function (dta) {\r\n //////console.log(dta)\r\n $scope.HasSelectedQs = false\r\n c.Chapters = []\r\n c.ChaptersLoadedCount = 0;\r\n angular.forEach(dta.d, function (cc) {\r\n var ch = cc.Chapter;\r\n var types = '4';\r\n ch.SortOrder = cc.SortOrder;\r\n c.Chapters.push(ch);\r\n var proc = '/Execute/GetQuestionsInCourseChapterByType'\r\n $http.post(proc, [$scope.User.UserName, c.Id, ch.Id, types]).success(function (qdata) {\r\n ch.Topics = [];\r\n ch.Assessments = [];\r\n ch.Selected = false;\r\n angular.forEach(qdata.RS_0, function (q) {\r\n if (q.TopicId > 0) {\r\n var topic = null\r\n angular.forEach(ch.Topics, function (t) {\r\n if (t.Id == q.TopicId) {\r\n topic = t;\r\n }\r\n });\r\n if (topic == null) {\r\n topic = {\r\n Id: q.TopicId,\r\n Name: q.TopicName,\r\n Assessments: [],\r\n Selected: false,\r\n TimesAnswered: 0,\r\n TimesCorrect: 0,\r\n TimesSeen: 0,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n ch.Topics.push(topic);\r\n }\r\n var tassessment = null\r\n angular.forEach(topic.Assessments, function (a) {\r\n if (a.Id == q.AssessmentId) {\r\n tassessment = a;\r\n }\r\n });\r\n if (tassessment == null) {\r\n tassessment = {\r\n Id: q.AssessmentId,\r\n Name: q.AssessmentName,\r\n Questions: [],\r\n Selected: false,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n topic.Assessments.push(tassessment);\r\n }\r\n tassessment.Questions.push(q);\r\n //var TimesAnsweredas = 0;\r\n //var TimesCorrectas = 0;\r\n var TimesSeenas = 0;\r\n var SelectedCounts = 0;\r\n angular.forEach(tassessment.Questions, function (tq) {\r\n //TimesAnsweredas += parseInt(tq.TimesAnswered);\r\n //TimesCorrectas += parseInt(tq.TimesCorrect);\r\n //TimesSeenas += parseInt(tq.TimesSeen);\r\n tq.Selected = false;\r\n angular.forEach($rootScope.SelectedQuestions, function (sel) {\r\n if (sel == tq.QuestionId) {\r\n tq.Selected = true;\r\n $scope.HasSelectedQs = true\r\n //console.log($scope.HasSelectedQs)\r\n }\r\n\r\n });\r\n });\r\n tassessment.SelectedCount = 0;\r\n tassessment.QuestionCount = tassessment.Questions.length;\r\n for (var i = 0; i < tassessment.Questions.length; i++) {\r\n if (tassessment.Id == '1100') {\r\n }\r\n if (tassessment.Questions[i].Selected == true) {\r\n tassessment.SelectedCount++\r\n }\r\n }\r\n if (tassessment.SelectedCount == tassessment.Questions.length) {\r\n tassessment.Selected = true;\r\n }\r\n else {\r\n tassessment.Selected = false;\r\n }\r\n } else {\r\n var assessment = null\r\n angular.forEach(ch.Assessments, function (a) {\r\n if (a.Id == q.AssessmentId) {\r\n assessment = a;\r\n }\r\n });\r\n if (assessment == null) {\r\n assessment = {\r\n Id: q.AssessmentId,\r\n Name: q.AssessmentName,\r\n Questions: [],\r\n Selected: false,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n ch.Assessments.push(assessment);\r\n }\r\n assessment.Questions.push(q);\r\n }\r\n var TimesSeenas = 0;\r\n var QuestionCount = 0;\r\n var SelectedCount = 0;\r\n if (topic != undefined) {\r\n angular.forEach(topic.Assessments, function (chtop) {\r\n QuestionCount += chtop.QuestionCount;\r\n SelectedCount += chtop.SelectedCount;\r\n\r\n });\r\n for (i = 0; i < topic.Assessments.length; i++) {\r\n if (topic.Assessments[i].Selected == false) {\r\n topic.Selected = false;\r\n break;\r\n }\r\n else {\r\n topic.Selected = true;\r\n }\r\n }\r\n topic.QuestionCount = QuestionCount;\r\n topic.SelectedCount = SelectedCount;\r\n }\r\n });\r\n var TimesSeenas = 0;\r\n var QuestionCount = 0;\r\n var SelectedCount = 0;\r\n angular.forEach(ch.Topics, function (chtop) {\r\n QuestionCount += chtop.QuestionCount;\r\n SelectedCount += chtop.SelectedCount;\r\n });\r\n ch.QuestionCount = QuestionCount;\r\n ch.SelectedCount = SelectedCount;\r\n if (ch.SelectedCount === ch.QuestionCount) {\r\n ch.Selected = true;\r\n }\r\n c.ChaptersLoadedCount += 1;\r\n $scope.SearchString = \"\";\r\n $scope.customexamsearch = false;\r\n $scope.StartSearch = false;\r\n });\r\n });\r\n ////console.log('changeme hasselected: ', $scope.HasSelectedQs)\r\n });\r\n $scope.tabcontent = c\r\n \r\n } else {\r\n if (c.Id == -10) {\r\n $scope.CustomQuestions = false;\r\n $scope.Bookmarks = true;\r\n }\r\n }\r\n //if (vm.Exam.Simple == true) {\r\n // $timeout(function () {\r\n // c.Selected = true\r\n // $scope.SetCourseSelected(c)\r\n // }, 4000)\r\n //}\r\n \r\n }\r\n $scope.ExecuteSearch = function (c, s) {\r\n $scope.SelectAlls = false;\r\n $scope.customexamsearch = true;\r\n $scope.StartSearch = true;\r\n $scope.SearchWait = true;\r\n $scope.CourseArray = parseInt(c.Id);\r\n $scope.SearchString = s;\r\n //console.log([$scope.SearchString, $scope.CourseArray])\r\n $http.post('/Execute/SearchQuestionsForStringByCourse', [$scope.SearchString, $scope.CourseArray]).success(function (rslt) {\r\n $scope.SearchResults = $scope.SearchString;\r\n $rootScope.Results = {};\r\n $rootScope.Results.Questions = rslt.RS_0;\r\n angular.forEach($rootScope.Results.Questions, function (qu) {\r\n qu.Selected = false;\r\n })\r\n $scope.CheckSelectedQs($rootScope.Results.Questions);\r\n $scope.SelectAll = function () {\r\n $scope.SelectAlls = !$scope.SelectAlls;\r\n if ($scope.SelectAlls) {\r\n angular.forEach($rootScope.Results.Questions, function (rq) {\r\n if (!rq.Selected) {\r\n rq.Selected = true;\r\n //$rootScope.TotalSelected++;\r\n $rootScope.SelectedQuestions.push(rq.QuestionId)\r\n }\r\n })\r\n }\r\n if (!$scope.SelectAlls) {\r\n angular.forEach($rootScope.Results.Questions, function (rq) {\r\n if (rq.Selected === true) {\r\n rq.Selected = false;\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + rq.QuestionId, true)\r\n }\r\n })\r\n }\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n }\r\n $scope.ClearAll = function () {\r\n\r\n\r\n }\r\n $rootScope.Results.QuestionsTotal = $rootScope.Results.Questions.length;\r\n $rootScope.Results.AllTotal = ($rootScope.Results.QuestionsTotal + $rootScope.Results.PagesTotal + $rootScope.Results.SubTopicsTotal + $rootScope.Results.TopicsTotal + $rootScope.Results.ChaptersTotal + $rootScope.Results.CoursesTotal);\r\n $scope.AddQuestions = function (c) {\r\n $scope.customexamsearch = false;\r\n $scope.CourseChanged(c)\r\n }\r\n $scope.ClearSearch = function (c) {\r\n $scope.SearchString = '';\r\n $scope.CourseChanged(c);\r\n }\r\n $scope.SearchWait = false;\r\n });\r\n }\r\n $scope.ShowAssessment = function (Assessment) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/tpls/CustomExam-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.Assessment = Assessment;\r\n $scope.TotalAssessSelected = 0;\r\n angular.forEach($scope.Assessment.Questions, function (aq) {\r\n aq.Answers = JSON.parse(aq.AnswersJSON);\r\n });\r\n if ($scope.Assessment.Selected === false) {\r\n angular.forEach($scope.Assessment.Questions, function (aq) {\r\n if (aq.Selected === true) {\r\n $scope.TotalAssessSelected++\r\n }\r\n });\r\n }\r\n else {\r\n $scope.TotalAssessSelected = $scope.Assessment.QuestionCount;\r\n }\r\n $scope.SelectQuestion = function (ques, Selected) {\r\n ques.Selected = Selected;\r\n if (ques.Selected == true) {\r\n $rootScope.SelectedQuestions.push(ques.QuestionId)\r\n }\r\n if (ques.Selected == false) {\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n }\r\n \r\n //console.log(ques)\r\n }\r\n $scope.cancel = function (Assessment, SelectedQuestions) {\r\n //$scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n //console.log($rootScope.SelectedQuestions.length)\r\n modalInstance.close();\r\n \r\n };\r\n $scope.SetAssessmentSelected = function (Assessment, sel) {\r\n Assessment.Selected = sel\r\n angular.forEach(Assessment.Questions, function (q) {\r\n q.Selected = sel;\r\n if (q.Selected == true) {\r\n $rootScope.SelectedQuestions.push(q.QuestionId)\r\n }\r\n if (q.Selected == false) {\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + q.QuestionId, true)\r\n }\r\n });\r\n //$scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n };\r\n\r\n //////console.log($scope.Assessment);\r\n },\r\n scope: $scope,\r\n resolve: {\r\n items: {\r\n SelectedQuestions: $scope.SelectedQuestions\r\n }\r\n }\r\n });\r\n modalInstance.result.then(function () {\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n })\r\n }\r\n \r\n $scope.ShowQuestion = function (Question) {\r\n angular.forEach($rootScope.SelectedQuestions, function (sq) {\r\n if (Question.QuestionId === sq) {\r\n Question.Selected = true;\r\n }\r\n })\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/tpls/CustomExam-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.SelectQuestion = function (ques, Selected) {\r\n ques.Selected = !ques.Selected;\r\n }\r\n if (!Question.HTML) {\r\n $http.get(\"/api/Questions(\" + Question.QuestionId + \"L)\").success(function (data) {\r\n $scope.Question = data.d;\r\n $http.get(\"/api/Questions(\" + $scope.Question.Id + \"L)/Answers\").success(function (datas) {\r\n $scope.Question.Answers = datas.d;\r\n $scope.QuestionBody = $scope.Question.HTML;\r\n if (Question.AnswersJSON) {\r\n $scope.QuestionAnswsers = JSON.parse(Question.AnswersJSON);\r\n }\r\n $scope.Question.Selected = Question.Selected;\r\n $scope.Question.QuestionId = $scope.Question.Id;\r\n $scope.QuestionAnswers = $scope.Question.Answers;\r\n angular.forEach($rootScope.SelectedQuestions, function (sq) {\r\n if ($scope.Question.Id === sq) {\r\n $scope.Question.Selected = true;\r\n }\r\n });\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n $scope.Question.Searched = true;\r\n\r\n $scope.QuestionRemediation = $scope.Question.CorrectRemediation;\r\n });\r\n })\r\n }\r\n else {\r\n $scope.Question = Question;\r\n $scope.QuestionBody = Question.HTML;\r\n $scope.QuestionAnswers = JSON.parse(Question.AnswersJSON);\r\n $scope.QuestionRemediation = Question.CorrectRemediation;\r\n $scope.Question.Selected = Question.Selected;\r\n $scope.Question.Searched = false;\r\n }\r\n $scope.cancel = function (ques) {\r\n if (ques.Selected === true) {\r\n $rootScope.SelectedQuestions.push(ques.QuestionId);\r\n }\r\n if (ques.Selected === false) {\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n }\r\n if (ques.Searched === true) {\r\n $scope.CheckSelectedQs($rootScope.Results.Questions)\r\n }\r\n $scope.SelectedQuestions = $rootScope.SelectedQuestions\r\n modalInstance.close();\r\n };\r\n\r\n },\r\n scope: $scope,\r\n resolve: {}\r\n });\r\n }\r\n $scope.CourseChanged = function (c, cl, idx) {\r\n \r\n //console.log('changing ', c)\r\n // console.log(vm.SelectedCourse)\r\n //$scope.ChangeMe(c)\r\n //if (c) {\r\n $scope.ChapterExams = [];\r\n ////console.log($rootScope.SelectedQuestions.length, (c.Id.toString() !== $scope.courseTabs[idx].Id.toString(), $scope.courseTabs[idx].Id > -1))\r\n if (c) {\r\n if (($scope.SelectedCustomQs.length + $rootScope.SelectedQuestions.length > 0) && (c.Id.toString() !== $scope.courseTabs[idx].Id.toString() && $scope.courseTabs[idx].Id > -1)) {\r\n ////console.log(c)\r\n ////////console.log(next)\r\n event.preventDefault();\r\n event.stopPropagation()\r\n swal({\r\n title: \"You have selected questions from this course.\",\r\n text: \"Changing the course will erase current selections unless the questions are contained in another course currently in use in this Custom Exam. Do you want to proceed?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n if ($scope.courseTabs[idx].Id.toString() == 0) {\r\n \r\n //$scope.SelectedCustomQs = []\r\n //$scope.QuestionTree[0].Selected = false\r\n angular.forEach($scope.QuestionTree, function (qt) {\r\n qt.Selected = false\r\n $scope.SetNodeSelected(qt, null)\r\n })\r\n \r\n $scope.SelectedCustomQs = []\r\n //console.log('custom removed', $scope.SelectedCustomQs.length, $scope.SelectedQuestions.length)\r\n }\r\n $scope.removeTabQs(idx, $scope.courseTabs[idx])\r\n //$rootScope.SelectedQuestions = [];\r\n //$scope.CurrentCourse = c;\r\n if (c) {\r\n $scope.ChangeMe(c)\r\n $scope.courseTabs[idx] = c\r\n $scope.setDisabled(cl)\r\n $scope.setActiveTab(idx)\r\n }\r\n ////console.log(idx)\r\n $timeout(function () {\r\n\r\n $('.inlineselect').selectpicker('refresh')\r\n })\r\n }\r\n else {\r\n //$scope.removeTabQs(idx, $scope.courseTabs[idx])\r\n if (c) {\r\n $scope.oldc = $scope.courseTabs[idx]\r\n $scope.courseTabs[idx] = null\r\n $scope.ChangeMe(c)\r\n $scope.setDisabled(cl)\r\n }\r\n $timeout(function () {\r\n $scope.courseTabs[idx] = $scope.oldc\r\n $scope.ChangeMe($scope.courseTabs[idx])\r\n $scope.setDisabled(cl)\r\n $scope.setActiveTab(idx)\r\n $('.inlineselect').selectpicker('refresh')\r\n //console.log(c, $scope.courseTabs[idx])\r\n })\r\n }\r\n\r\n })\r\n }\r\n else {\r\n if (c) {\r\n $scope.ChangeMe(c)\r\n $scope.courseTabs[idx] = c\r\n $scope.setDisabled(cl)\r\n $scope.setActiveTab(idx)\r\n }\r\n ////console.log(idx)\r\n $timeout(function () {\r\n \r\n $('.inlineselect').selectpicker('refresh')\r\n })\r\n //////console.log($scope.courseTabs)\r\n }\r\n //}\r\n }\r\n }\r\n $('select').selectpicker('data-hide-disabled', false)\r\n $scope.courseList = []\r\n $scope.RemoveNonPublished = function (parent, lst) {\r\n angular.forEach(parent.nodes, function (child, idx) {\r\n if (!parent.QCount) {\r\n }\r\n if (child.nodes) {\r\n if (child.nodes.length > 0) {\r\n $scope.RemoveNonPublished(child, lst)\r\n }\r\n } else {\r\n var removed = false;\r\n if (child.StatusId) {\r\n if (child.StatusId != \"1\") {\r\n parent.nodes = $filter('filter')(parent.nodes, '!' + child.Id, true)\r\n removed = true;\r\n }\r\n }\r\n if (!removed) {\r\n if (child.OwnerId) {\r\n if (child.PrivacyModeId == \"1\" && child.OwnerId != $rootScope.User.UserId) {\r\n parent.nodes = $filter('filter')(parent.nodes, '!' + child.Id, true)\r\n removed = true;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n $scope.beginCustom = function () {\r\n $http.post('/Execute/GetUserQuestions', [$rootScope.User.UserId]).success(function (uq) {\r\n $scope.QuestionTree = []\r\n console.log(uq)\r\n if (uq.RS_1[0]) {\r\n var uNodes = JSON.parse(uq.RS_1[0].TreeJSON);\r\n var itemsToRemove = []\r\n\r\n uNodes.DelCount = 0;\r\n var QCount = 0\r\n $scope.parentname = ''\r\n var HiddenCount = 0\r\n //console.log(uNodes)\r\n angular.forEach(uNodes, function (nd, idx) {\r\n if (nd.StatusId) {\r\n if (nd.StatusId != \"1\") {\r\n\r\n //uNodes = $filter('filter')(uNodes, '!' + nd.Id, true)\r\n }\r\n else {\r\n nd.parentname = $scope.parentname\r\n $scope.parentname = ''\r\n }\r\n }\r\n else {\r\n $scope.parentname = nd.Name\r\n }\r\n $scope.RemoveNonPublished(nd, uNodes);\r\n });\r\n console.log(uNodes)\r\n $scope.QuestionTree.push({ Name: \"My Question Library\", Id: 0, nodes: uNodes });\r\n console.log($scope.QuestionTree)\r\n }\r\n var otherpeoplesQs = angular.copy(uq.RS_2)\r\n ////console.log(otherpeoplesQs)\r\n angular.forEach(otherpeoplesQs, function (qt) {\r\n $scope.tempNodes = angular.copy(JSON.parse(qt.TreeJSON))\r\n var itemsToRemove = []\r\n angular.forEach($scope.tempNodes, function (nd, idx) {\r\n var removed = false;\r\n if (nd.StatusId) {\r\n if (nd.StatusId != \"1\") {\r\n $scope.tempNodes = $filter('filter')($scope.tempNodes, '!' + nd.Id, true)\r\n removed = true;\r\n }\r\n if (!removed) {\r\n if (nd.OwnerId) {\r\n if (nd.PrivacyModeId == \"1\") {\r\n //HiddenCount += 1\r\n ////console.log('private', nd)\r\n $scope.tempNodes = $filter('filter')($scope.tempNodes, '!' + nd.Id, true)\r\n }\r\n }\r\n }\r\n }\r\n $scope.RemoveNonPublished(nd, $scope.tempNodes);\r\n })\r\n ////console.log('tempnode', $scope.tempNodes, 'QCount', QCount)\r\n\r\n $scope.QuestionTree.push({ Name: qt.DisplayName + \"'s Questions\", Id: qt.UserId * -1, nodes: $scope.tempNodes });\r\n })\r\n var TotalCustomQuestionCount = 0;\r\n //console.log($scope.QuestionTree)\r\n angular.forEach($scope.QuestionTree, function (nd, idx) {\r\n nd.Selected = $scope.CheckAllChidlrenSelected(nd)\r\n TotalCustomQuestionCount += nd.QuestionCount\r\n })\r\n angular.forEach($rootScope.Courses, function (c) {\r\n if (c.Id != 745 && c.Id != 1106) {\r\n if ($scope.trialAlert == false) {\r\n\r\n if (c.IsTrial == '1') {\r\n c.trialAlert = true;\r\n c.Name = c.Name + ' *(Trial)'\r\n $scope.courseList.push(c);\r\n $scope.trialAlert = true\r\n }\r\n else {\r\n c.trialAlert = false;\r\n $scope.courseList.push(c);\r\n $scope.trialAlert = false\r\n }\r\n }\r\n else {\r\n c.trialAlert = false;\r\n $scope.courseList.push(c);\r\n }\r\n\r\n }\r\n });\r\n //$scope.masterCourseList = $scope.courseList\r\n ////console.log($scope.courseList)\r\n $scope.courseTabs = []\r\n $scope.courseTabs.push({\r\n Name: 'Select Course',\r\n Chapters: [],\r\n Id: -1,\r\n\r\n })\r\n $scope.courseTabs.push({\r\n Name: '+ Add Course',\r\n Chapters: [],\r\n Id: -2,\r\n //Courses: $scope.courseList\r\n\r\n })\r\n \r\n\r\n if (TotalCustomQuestionCount > 0){// && $scope.User.isAuthor == true) {\r\n $scope.courseList.unshift({ Name: \"Custom Questions\", Id: 0, nodes: $scope.QuestionTree })\r\n }\r\n $scope.Favorites = [];\r\n if (uq.RS_3.length > 0) {\r\n $scope.Favorites = angular.copy(uq.RS_3)\r\n console.log($scope.Favorites)\r\n $scope.courseList.unshift({ Name: \"Favorites\", Id: -10, nodes: $scope.Favorites })\r\n }\r\n console.log($scope.courseList)\r\n });\r\n }\r\n ////console.log($scope.User)\r\n $scope.beginCustom()\r\n \r\n })\r\n \r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('courseware', {\r\n url: '/MyDashboard/Assets',\r\n //templateUrl: 'app/pages/courseware/courseware.html',\r\n title: 'Courses',\r\n controller: function ($scope, $rootScope, $http, $location) {\r\n //document.location.href=\"/MyDashBoard/Assets\";\r\n $scope.User = $rootScope.User;\r\n $scope.Courses = $rootScope.Courses;\r\n //////console.log($scope.Courses);\r\n $scope.GoToCME = function (id) {\r\n $location.path('/c/cme/' + id)\r\n }\r\n $scope.GoToExams = function (id) {\r\n $location.path('/e/exams/' + id)\r\n }\r\n $scope.SelectedCourse = $scope.Courses[0];\r\n $rootScope.SelectedCourse = $scope.Courses[0];\r\n }/*,\r\n sidebarMeta: {\r\n icon: 'ion-briefcase',\r\n order: 100,\r\n secure: { Allow: [\"Learner\", \"Administrators\"] }\r\n },*/\r\n })\r\n .state('exams.customexams', {\r\n url: '/customexams',\r\n overrideurl: '/e/customexams',\r\n templateUrl: 'app/pages/courseware/myexams.html',\r\n title: 'Custom Exams',\r\n controller: function ($scope, $rootScope, $http, $location) {\r\n $scope.User = $rootScope.User;\r\n $scope.Courses = $rootScope.Courses;\r\n ////////console.log($scope.User)\r\n $scope.SelectedCourse = $scope.Courses[0];\r\n $rootScope.SelectedCourse = $scope.Courses[0];\r\n $http.post('/Execute/GetUserCustomExams', [$scope.User.UserId]).success(function (data) {\r\n $scope.CustomExams = data.RS_0;\r\n //////console.log($scope.CustomExams)\r\n });\r\n },\r\n sidebarMeta: {\r\n icon: 'ion-briefcase',\r\n order: 20\r\n },\r\n })\r\n .state('customexam', {\r\n url: '/customexam/:Id',\r\n templateUrl: 'app/pages/courseware/exams.html',\r\n title: 'customexam',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.ExamId = $stateParams.Id;\r\n $scope.User = $rootScope.User;\r\n },\r\n secure: { Allow: [\"Learner\"] }\r\n })\r\n .state('review', {\r\n url: '/customexam/:Id/review',\r\n templateUrl: 'app/pages/courseware/customexamreview.htm',\r\n title: 'Review',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.ExamId = $stateParams.Id;\r\n $scope.User = $rootScope.User;\r\n },\r\n secure: { Allow: [\"Learner\"] }\r\n })\r\n .state('newexaminst', {\r\n url: '/examinst',\r\n templateUrl: 'app/pages/courseware/newexam.html',\r\n title: 'New Custom Exam',\r\n controller: 'NewExamCtl',\r\n controllerAs: 'vm'\r\n })\r\n .state('exams.newexam', {\r\n url: '/exam',\r\n overrideurl: '/e/exam',\r\n templateUrl: 'app/pages/courseware/newexam.html',\r\n title: 'Exam Builder',\r\n controller: 'NewExamCtl',\r\n controllerAs: 'vm',\r\n sidebarMeta: {\r\n order: 30\r\n }\r\n })\r\n .state('exam', {\r\n url: '/exam/:Id',\r\n templateUrl: 'app/pages/courseware/exam.html',\r\n title: 'Custom Exam',\r\n controller: 'ExamCtl',\r\n secure: { Allow: [\"Learner\"] }\r\n })\r\n .state('cmeparent.cmeland', {\r\n url: '/cme',\r\n overrideurl: '/c/cme',\r\n template: '',\r\n title: 'Earn CME',\r\n controller: function ($rootScope,$location) {\r\n if($rootScope.UserSettings.PersistentCourseId) {\r\n $location.path('/c/cme/'+$rootScope.UserSettings.PersistentCourseId);\r\n }else{\r\n $location.url('/launch/cme');\r\n }\r\n }\r\n })\r\n .state('cmeparent.cme', {\r\n url: '/cme/:CourseId',\r\n overrideurl: '/c/cme/:CourseId',\r\n templateUrl: 'app/pages/courseware/cme.html',\r\n title: 'Earn CME',\r\n sidebarMeta: {\r\n order: 50\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.User = $rootScope.User;\r\n if(!$stateParams.CourseId) {\r\n /** If the user has gone directly to /cme/ with no CourseID,\r\n * check for stored CourseID and send them to /cme/[CourseID]\r\n * If the user has never selected a course, send them to /launch/cme to select one\r\n */\r\n if($rootScope.UserSettings.PersistentCourseId) {\r\n $location.path('/c/cme/'+$rootScope.UserSettings.PersistentCourseId);\r\n }else{\r\n $location.url('/launch/cme');\r\n }\r\n\r\n }\r\n }\r\n })\r\n .state('cmet', {\r\n url: '/cme/:CourseId/:TopicId',\r\n templateUrl: 'app/pages/courseware/cme.html',\r\n title: 'Earn CME',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n $scope.User = $rootScope.User;\r\n },\r\n secure: { Allow: [\"Learner\"] }\r\n })\r\n .state('cmetopic', {\r\n url: '/CMETopic/:CourseId/:ChapterId/:TopicId',\r\n templateUrl: 'app/pages/courseware/cmetopic.html',\r\n title: 'Earn CME',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.ChapterId = $stateParams.ChapterId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n $scope.User = $rootScope.User;\r\n $scope.SelectedTab = $stateParams.SelectedTab;\r\n },\r\n secure: { Allow: [\"Learner\"], Deny: [\"NoSelfStudy\"]}\r\n })\r\n .state('cmesubtopic', {\r\n url: '/CMESubTopic/:CourseId/:ChapterId/:TopicId/:SubTopicId',\r\n templateUrl: 'app/pages/courseware/cmesubtopic.html',\r\n title: 'Earn CME',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.ChapterId = $stateParams.ChapterId;\r\n $scope.TopicId = $stateParams.TopicId;\r\n $scope.SubTopicId = $stateParams.SubTopicId;\r\n $scope.User = $rootScope.User;\r\n // $scope.SelectedTab = $stateParams.SelectedTab;\r\n },\r\n secure: { Allow: [\"Learner\"], Deny: [\"NoSelfStudy\"]}\r\n })\r\n .state('exams', {\r\n url: '/e',\r\n abstract: true,\r\n template: '
',\r\n title: 'Study & Review',\r\n sidebarMeta: {\r\n icon: 'fa fa-graduation-cap',\r\n order: 100,\r\n secure: { Allow: [\"Learner\", \"Program Manager\"], Deny: [\"NoSelfStudy\"]}\r\n }\r\n })\r\n .state('exams.examland', {\r\n url: '/exams',\r\n overrideurl: '/e/exams',\r\n template: '',\r\n title: 'Sims & Topics',\r\n controller: function($rootScope,$location){\r\n if($rootScope.UserSettings.PersistentCourseId) {\r\n $location.url('/e/exams/'+$rootScope.UserSettings.PersistentCourseId);\r\n }else{\r\n $location.url('/launch/exams');\r\n }\r\n }\r\n })\r\n .state('exams.topics', {\r\n url: '/topics/:CourseId',\r\n overrideurl: '/e/topics/:CourseId',\r\n templateUrl: 'app/pages/courseware/topics.html',\r\n title: 'Study by Topic',\r\n sidebarMeta: {\r\n order: 15\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.CourseId = $stateParams.CourseId;\r\n $scope.studytopics =\r\n $scope.User = $rootScope.User;\r\n if(!$stateParams.CourseId) {\r\n /** If the user has gone directly to /cme/ with no CourseID,\r\n * check for stored CourseID and send them to /cme/[CourseID]\r\n * If the user has never selected a course, send them to /launch/cme to select one\r\n */\r\n if($rootScope.UserSettings.PersistentCourseId) {\r\n $location.path('/e/topics/'+$rootScope.UserSettings.PersistentCourseId);\r\n }else{\r\n $location.url('/launch/topics');\r\n }\r\n\r\n }\r\n }\r\n })\r\n .state('exams.examsims', {\r\n url: '/exams/:Id',\r\n overrideurl: '/e/exams/:Id',\r\n templateUrl: 'app/pages/courseware/exams.html',\r\n title: 'Exam Sims',\r\n sidebarMeta : {\r\n order:10,\r\n\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.CourseId = $stateParams.Id;\r\n $scope.User = $rootScope.User;\r\n if(!$stateParams.Id) {\r\n /** If the user has gone directly to /exams/ with no CourseID,\r\n * check for stored CourseID and send them to /exams/[CourseID]\r\n * If the user has never selected a course, send them to /launch/exams to select one\r\n */\r\n if($rootScope.UserSettings.PersistentCourseId) {\r\n $location.url('/e/exams/'+$rootScope.UserSettings.PersistentCourseId);\r\n }else{\r\n $location.url('/launch/exams');\r\n }\r\n\r\n }\r\n },\r\n \r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n\r\n .state('dashboard', {\r\n url: '/MyDashboard',\r\n templateUrl: 'app/pages/dashboard/mydashboard.html',\r\n title: 'My Dashboard',\r\n /*sidebarMeta: {\r\n icon: 'ion-android-home',\r\n order: 0,\r\n secure: { Allow: [\"Learner\"] }\r\n },*/\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.SelectedTab = 0;\r\n\r\n }\r\n })\r\n .state('mydashboard', {\r\n url: '/MyDashboard/:SelectedTab',\r\n templateUrl: 'app/pages/dashboard/mydashboard.html',\r\n title: 'My Dashboard',\r\n secure: { Allow: [\"Learner\"] },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.SelectedTab = $stateParams.SelectedTab;\r\n }\r\n })\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.discussions', [])\r\n .config(routeConfig,[]);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('discuss', {\r\n url: '/discuss',\r\n abstract: false,\r\n template: '',\r\n title: 'Discussions',\r\n sidebarMeta: {\r\n icon: 'fa fa-pencil-square-o',\r\n order: 350,\r\n secure: { Allow: [\"Platform Admin\", \"Administrators\", \"Testers\"]}\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n },\r\n })\r\n $stateProvider\r\n .state(\r\n 'discuss.invitationresponse',\r\n {\r\n url: '/acceptinvitation/:groupID/:inviteGUID',\r\n abstract: false,\r\n template: '
Error :(
',\r\n title: 'Discussions',\r\n controller: function($scope,$rootScope,$stateParams,$http,$window) {\r\n $scope.action = 'accept';\r\n $scope.actref = $stateParams.inviteGUID;\r\n $scope.Id = $stateParams.groupID;\r\n $scope.InvitationGUID = $stateParams.inviteGUID;\r\n }\r\n }\r\n )\r\n //$http.post(\"/CurrentUser\").success(function (u) {\r\n // console.log(u);\r\n\r\n //});\r\n // for (i = 0; i < 4; i++) {\r\n // $stateProvider.state('discuss.group' + i, {\r\n // url: '/studygroup/' + i,\r\n // template: '
'+i+'
',\r\n // title: 'Study Group ' + i,\r\n // sidebarMeta: {\r\n // order: 20\r\n // }\r\n // })\r\n\r\n //}\r\n dgroups.forEach(function (g) {\r\n //console.log(g)\r\n $stateProvider.state('discuss.' + g.Id, {\r\n url: '/studygroup/' + g.Id,\r\n abstract: false,\r\n template: '
{{Id}}
',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n },\r\n title: g.Name,\r\n sidebarMeta: {\r\n order: 20\r\n }\r\n })\r\n $stateProvider.state('discuss.act' + g.Id, {\r\n url: '/studygroup/' + g.Id + '/:action/:actref',\r\n abstract: false,\r\n template: '
{{Id}}
',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n console.log(\"discuss.act\")\r\n $scope.Id = g.Id;\r\n $scope.action = $stateParams.action;\r\n $scope.actref = $stateParams.actref;\r\n },\r\n title: g.Name,\r\n })\r\n })\r\n //.state('discuss.group', {\r\n // url: '/studygroup',\r\n // //overrideurl: '/author/exam',\r\n // templateUrl: 'app/pages/courseware/newexam.html',\r\n // title: 'Study Group',\r\n // controller: 'NewExamCtl',\r\n // controllerAs: 'vm',\r\n // sidebarMeta: {\r\n // order: 20\r\n // }\r\n //});\r\n }\r\n})();\n/**\r\n * @author k.danovsky\r\n * created on 15.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.editor', [\r\n\r\n ])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('editor', {\r\n url: '/editor',\r\n template: '',\r\n title: 'Editor',\r\n sidebarMeta: {\r\n icon: 'ion-edit',\r\n order: 105,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n })\r\n .state('editor.editcontent', {\r\n url: '/editcontent',\r\n templateUrl: 'app/pages/editor/editcontent/editcourse.htm',\r\n title: 'Topic Tracking',\r\n sidebarMeta: {\r\n order: 100,\r\n \r\n },\r\n })\r\n .state('editor.editcme', {\r\n url: '/editcme',\r\n templateUrl: 'app/pages/editor/editcontent/searchmedia.htm',\r\n title: 'Edit CME',\r\n sidebarMeta: {\r\n order: 200,\r\n \r\n },\r\n })\r\n .state('editor.searchmedia', {\r\n url: '/searchmedia',\r\n templateUrl: 'app/pages/editor/searchmedia.htm',\r\n title: 'Search Media',\r\n sidebarMeta: {\r\n order: 300,\r\n \r\n },\r\n })\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('form', {\r\n url: '/form',\r\n template : '',\r\n abstract: true,\r\n title: 'Form Elements',\r\n sidebarMeta: {\r\n icon: 'ion-compose',\r\n order: 250,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n })\r\n .state('form.inputs', {\r\n url: '/inputs',\r\n templateUrl: 'app/pages/form/inputs/inputs.html',\r\n title: 'Form Inputs',\r\n sidebarMeta: {\r\n order: 0\r\n }\r\n })\r\n .state('form.layouts', {\r\n url: '/layouts',\r\n templateUrl: 'app/pages/form/layouts/layouts.html',\r\n title: 'Form Layouts',\r\n sidebarMeta: {\r\n order: 100,\r\n },\r\n })\r\n .state('form.wizard',\r\n {\r\n url: '/wizard',\r\n templateUrl: 'app/pages/form/wizard/wizard.html',\r\n controller: 'WizardCtrl',\r\n controllerAs: 'vm',\r\n title: 'Form Wizard',\r\n sidebarMeta: {\r\n order: 200,\r\n },\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @author d.lapoint\r\n * created on 12/15/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.help', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('help', {\r\n url: '/help',\r\n title: 'Help',\r\n abstract: true,\r\n template: '
',\r\n sidebarMeta: {\r\n icon: 'fa fa-ambulance',\r\n order: 800\r\n }\r\n })\r\n .state('help.home', {\r\n url: '/home',\r\n title: 'Help & Support',\r\n templateUrl: '/app/pages/help/help.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-ambulance',\r\n order: 100\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, $location, $timeout) {\r\n\r\n\r\n }\r\n });\r\n }\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.institution', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('inst', {\r\n url: '/inst/:Id',\r\n templateUrl: 'app/pages/institution/institution.html',\r\n title: 'Institution Administration',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.InstitutionId = $stateParams.Id;\r\n }\r\n })\r\n .state('instTabs', {\r\n url: '/inst/:Id/:SelectedTab',\r\n templateUrl: 'app/pages/institution/institution.html',\r\n title: 'Institution Administration',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.InstitutionId = $stateParams.Id;\r\n $scope.SelectedTab = $stateParams.SelectedTab;\r\n }\r\n })\r\n /*.state('progdashTabs', {\r\n reloadOnSearch: false,\r\n abstract: true,\r\n url: '/ProgramDashboard/:SelectedTab',\r\n templateUrl: 'app/pages/institution/progdash.html',\r\n title: 'Program',\r\n secure: { Allow: [\"Program Manager\"] },\r\n\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.SelectedTab = $stateParams.SelectedTab;\r\n }\r\n })*/\r\n /*.state('progdashNoTabs', {\r\n url: '/ProgramDashboard',\r\n abstract: true,\r\n reloadOnSearch: true,\r\n templateUrl: 'app/pages/institution/progdash.html',\r\n title: 'My Program',\r\n sidebarMeta: {\r\n icon: 'ion-android-home',\r\n order: 1,\r\n secure: { Allow: [\"Program Manager\"] }\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.SelectedTab = 0;\r\n }\r\n })*/\r\n .state('progDash', {\r\n url: '/Program',\r\n abstract: true,\r\n template: '
',\r\n title: 'My Program',\r\n sidebarMeta: {\r\n icon: 'fa fa-users',\r\n order: 40,\r\n secure: { Allow: [\"Program Manager\"] },\r\n color: '#90b900'\r\n }\r\n })\r\n .state('progDash.UserProgress', {\r\n url: '/my-users',\r\n /*title: 'Proficiency',\r\n sidebarMeta: {\r\n order: 125\r\n },*/\r\n templateUrl: '/app/pages/institution/my-users.html',\r\n scope: {\r\n\r\n }\r\n })\r\n .state('progDash.Home', {\r\n url: '/overview',\r\n title: 'Program Overview',\r\n /*sidebarMeta: {\r\n order: 9\r\n },*/\r\n template: ''\r\n })\r\n .state('progDash.AssignmentActivity', {\r\n url: '/assignment-activity',\r\n title: 'Assignment Activity',\r\n sidebarMeta: {\r\n order: 110\r\n },\r\n template: ''\r\n })\r\n .state('progDash.UserActivity', {\r\n url: '/user-activity',\r\n title: 'User Activity',\r\n sidebarMeta: {\r\n order: 120\r\n },\r\n template: ''\r\n })\r\n .state('progDash.CourseActivity', {\r\n url: '/course-activity',\r\n title: 'Course Activity',\r\n sidebarMeta: {\r\n order: 130\r\n },\r\n template: ''\r\n })\r\n .state('progDash.AssignmentManager', {\r\n url: '/assignment-manager',\r\n title: 'Assignment Manager',\r\n sidebarMeta: {\r\n order: 100\r\n },\r\n template: ''\r\n })\r\n .state('progDash.QuickQuizData', {\r\n url: '/quickquiz-data',\r\n title: 'Quick Quiz Data',\r\n sidebarMeta: {\r\n order: 150\r\n },\r\n template: ''\r\n })\r\n .state('progDash.ManageUsers', {\r\n url: '/users',\r\n title: 'Manage Users',\r\n /*sidebarMeta: {\r\n order: 16\r\n },*/ /**** HIDDEN FOR LAUNCH */\r\n templateUrl: 'app/pages/progdash/manage-users.html',\r\n controller: 'progdashManageUsersCtrl'\r\n })\r\n .state('progDash.Milestones', {\r\n url: '/milestones',\r\n title: 'Milestones',\r\n sidebarMeta: {\r\n order: 140\r\n },\r\n templateUrl: 'app/pages/institution/Milestones.html'\r\n })\r\n /*\r\n .state('progdashNoTabs.Home', {\r\n url: '/',\r\n title: 'Overview',\r\n sidebarMeta: {\r\n order: 10\r\n }\r\n })\r\n .state('progdashNoTabs.AssignmentActivity', {\r\n url: '/Assignment Activity',\r\n title: 'Assignment Activity',\r\n sidebarMeta: {\r\n order: 11\r\n }\r\n })\r\n .state('progdashNoTabs.UserActivity', {\r\n url: '/User Activity',\r\n title: 'User Activity',\r\n sidebarMeta: {\r\n order: 12\r\n }\r\n })\r\n .state('progdashNoTabs.ActivitybyCourse', {\r\n url: '/Activity by Course',\r\n title: 'Course Activity',\r\n sidebarMeta: {\r\n order: 13\r\n }\r\n })\r\n .state('progdashNoTabs.AssignmentManager', {\r\n url: '/Assignment Manager',\r\n title: 'Assignment Manager',\r\n sidebarMeta: {\r\n order: 14\r\n }\r\n })\r\n .state('progdashNoTabs.QuickQuizData', {\r\n url: '/Quick Quiz Data',\r\n title: 'Quick Quiz Data',\r\n sidebarMeta: {\r\n order: 15\r\n }\r\n })\r\n .state('progdashNoTabs.ManageUsers', {\r\n url: '/Manage Users',\r\n title: 'Manage Users',\r\n sidebarMeta: {\r\n order: 16\r\n }\r\n });*/\r\n }\r\n})();\r\n\n/**\r\n * @author d.lapoint\r\n * created on 15 Sep 2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.launchcme', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('launchcme', {\r\n url: '/launch/cme',\r\n title: 'Launch CME',\r\n templateUrl: '/app/pages/launchcme/launchcme.html',\r\n /*sidebarMeta: {\r\n icon: 'fa fa-graduation-cap',\r\n order: 0,\r\n secure: { Allow: [\"Learner\"] }\r\n },*/\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.Courses = $rootScope.Courses;\r\n $scope.csel = {};\r\n $scope.csel.SelCourse = '';\r\n //console.log($scope.Courses);\r\n $scope.courseSelectChangeHandler = function() {\r\n var newCourseId = $scope.csel.SelCourse;\r\n $rootScope.UserSettings.PersistentCourseId = newCourseId;\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (dataff) {\r\n //$rootScope.UserSettings = $scope.USettings;\r\n $location.url('/c/cme/'+newCourseId);\r\n });\r\n\r\n };\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 15 Sep 2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.launchexams', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('launchexams', {\r\n url: '/launch/exams',\r\n title: 'Exams',\r\n templateUrl: '/app/pages/launchexams/launchexams.html',\r\n /*sidebarMeta: {\r\n icon: 'fa fa-calendar-check-o',\r\n order: 0,\r\n secure: { Allow: [\"Learner\"] }\r\n },*/\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.Courses = $rootScope.Courses;\r\n $scope.csel = {};\r\n $scope.csel.SelCourse = '';\r\n //console.log($scope.Courses);\r\n $scope.courseSelectChangeHandler = function() {\r\n var newCourseId = $scope.csel.SelCourse;\r\n $rootScope.UserSettings.PersistentCourseId = newCourseId;\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (dataff) {\r\n //$rootScope.UserSettings = $scope.USettings;\r\n $location.url('/e/exams/'+newCourseId);\r\n });\r\n\r\n };\r\n }\r\n })\r\n .state('launch', {\r\n url: '/',\r\n title: 'Dashboard',\r\n hideMeta: true,\r\n templateUrl: '/app/pages/launch/launch.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-home',\r\n order: 0,\r\n secure: {Allow: [\"Learner\",\"Program Manager\"]}\r\n },\r\n\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location, $timeout, $window, $filter, ngIntroService) {\r\n $scope.User = $rootScope.User;\r\n //console.log($scope.User);\r\n if(filterIt($rootScope.UserRoles,'Assignee').length || filterIt($rootScope.UserRoles,'Program Manager').length || filterIt($rootScope.UserRoles,'Instructor').length) {\r\n if(!$rootScope.UserSettings.HideAssigneeWelcome){\r\n swal({\r\n title: \"Welcome!\",\r\n html: true,\r\n text: \"Welcome to Med-Challenger! Please take a moment to check out our getting started page.

Getting Started\",\r\n type: 'success',\r\n showCancelButton: true,\r\n confirmButtonText: 'Maybe Later',\r\n cancelButtonText: 'Don\\'t Show Again',\r\n allowEscapeKey: false\r\n },\r\n function(isConfirm){\r\n if(isConfirm){\r\n swal.close();\r\n\r\n }else{\r\n $rootScope.UserSettings.HideAssigneeWelcome=true;\r\n $rootScope.SaveUserSettings();\r\n }\r\n\r\n });\r\n }\r\n }\r\n var introSteps;\r\n var isProgMan = $filter('getByProperty')('RoleName', 'Program Manager', $rootScope.UserRoles);\r\n var isAssignee = $filter('getByProperty')('RoleName', 'Assignee', $rootScope.UserRoles);\r\n if(isProgMan) {\r\n introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Dashboard

\" +\r\n \"

Welcome to the dashboard. This is your \\\"home base\\\", from where you can directly access commonly-used features and tools, and view quick information about your progress and status.

You'll also see additional group administration features for assignment management, activity tracking, and more.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#user-menu-drop',\r\n intro: \"

User Menu

\" +\r\n \"

Click or tap the user icon at the top right of any page to open the user menu.

\" +\r\n \"

User Menu Screenshot

\" +\r\n \"
    \" +\r\n \"
  1. User Profile: Change your password, manage payment methods, and update professional and personal information like your medical degree, specialty, gaming alias, phone number, address, etc.
  2. \" +\r\n \"
  3. Theme Switcher: Toggle between dark and light display themes. This feature is also available in your User Profile.
  4. \" +\r\n \"
  5. Sign Out: Signs you out of Med-Challenger on the current device. Don't forget to sign out when finished if using a shared computer.
  6. \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#main-nav-tree',\r\n intro: \"

Main Navigation

\" +\r\n \"

Access all parts of the app from this menu.

\"\r\n },\r\n {\r\n element: '#pm-manage-assignments',\r\n intro: \"

Manage Assignments

\" +\r\n \"

Create and modify assignments for your organization.

\"\r\n },\r\n {\r\n element: '#pm-assignment-activity',\r\n intro: \"

Assignment Activity

\" +\r\n \"

View results and user progress for existing assignments within your organization.

\"\r\n },\r\n {\r\n element: '#pm-user-activity',\r\n intro: \"

User Activity

\" +\r\n \"

View per-user progress and completion stats for your organization.

\"\r\n },\r\n {\r\n element: '#pm-course-activity',\r\n intro: \"

Course Activity

\" +\r\n \"

View per-asset completion stats for your organization.

\"\r\n },\r\n {\r\n element: '#what-do',\r\n intro: \"These quick-launch buttons provide an easy way to jump right in and start working with your assets.\"\r\n },\r\n {\r\n element: '#gtm-btn-study',\r\n intro: \"

Exam Study & Knowledge Review

\" +\r\n \"
  • Adaptive board exam sims
  • \" +\r\n \"
  • Chapter exams
  • \" +\r\n \"
  • Topic-based learning segments
  • \" +\r\n \"
  • Automatic remediation guidance
  • \" +\r\n \"
  • Custom Exam Builder
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-earn',\r\n intro: \"

Find, Earn, & Claim CME Credits

\" +\r\n \"
  • Find earnable CME by type
  • \" +\r\n \"
  • Earn CME by completing CME assessments
  • \" +\r\n \"
  • Claim CME and download PDF certificates
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-play',\r\n intro: \"

Weekly Free CME Quick Quiz

\" +\r\n \"
  • Earn free CME every week
  • \" +\r\n \"
  • Peer leaderboards
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-explore',\r\n intro: \"

See & Learn What's New

\" +\r\n \"
  • Latest posts from our Medical Education blog
  • \" +\r\n \"
  • Our social media feeds
  • \" +\r\n \"
  • Curated medical news from around the Web
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#account-info',\r\n intro: \"

Account Info

\" +\r\n \"
  • Your login ID and basic account information/status
  • \" +\r\n \"
  • Premium status
  • \" +\r\n \"
  • Trial status
  • \" +\r\n \"
  • View/edit profile
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#recent-activity',\r\n intro: \"

Recent Activity

\" +\r\n \"

Pick up where you left off, and see recently completed work.

\"\r\n },\r\n {\r\n element: '#my-cmes',\r\n intro: \"

My CMEs

\" +\r\n \"

Summary of CME credits available, earned, and claimed.

\"\r\n },\r\n {\r\n element: '#latest-news',\r\n intro: \"

Latest News

\" +\r\n \"

The latest article from our Medical Education Blog.

\"\r\n },\r\n {\r\n element: '#quickquiz-dash',\r\n intro: \"

Quick Quiz Dashboard

\" +\r\n \"
  • Quick access to the 5 latest Quick Quizzes
  • \" +\r\n \"
  • Summary of your rank, points, and high scores on the 5 latest Quick Quizzes
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Dashboard tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ]\r\n } else if(isAssignee) {\r\n introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Dashboard

\" +\r\n \"

Welcome to the dashboard. This is your \\\"home base\\\", from where you can directly access commonly-used features and tools, and view quick information about your progress and status.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#user-menu-drop',\r\n intro: \"

User Menu

\" +\r\n \"

Click or tap the user icon at the top right of any page to open the user menu.

\" +\r\n \"

User Menu Screenshot

\" +\r\n \"
    \" +\r\n \"
  1. User Profile: Change your password, manage payment methods, and update professional and personal information like your medical degree, specialty, gaming alias, phone number, address, etc.
  2. \" +\r\n \"
  3. Theme Switcher: Toggle between dark and light display themes. This feature is also available in your User Profile.
  4. \" +\r\n \"
  5. Sign Out: Signs you out of Med-Challenger on the current device. Don't forget to sign out when finished if using a shared computer.
  6. \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#main-nav-tree',\r\n intro: \"

Main Navigation

\" +\r\n \"

Access all parts of the Med-Challenger app from this menu.

\"\r\n },\r\n {\r\n element: '#what-do',\r\n intro: \"These quick-launch buttons provide an easy way to jump right in and start working.\"\r\n },\r\n {\r\n element: '#gtm-btn-work',\r\n intro: \"

My Assignments

\" +\r\n \"

View and work on your assignments.

\"\r\n },\r\n {\r\n element: '#gtm-btn-study',\r\n intro: \"

Exam Study & Knowledge Review

\" +\r\n \"
  • Adaptive board exam sims
  • \" +\r\n \"
  • Chapter exams
  • \" +\r\n \"
  • Topic-based learning segments
  • \" +\r\n \"
  • Automatic remediation guidance
  • \" +\r\n \"
  • Custom Exam Builder
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-earn',\r\n intro: \"

Find, Earn, & Claim CME Credits

\" +\r\n \"
  • Find earnable CME by type
  • \" +\r\n \"
  • Earn CME by completing CME assessments
  • \" +\r\n \"
  • Claim CME and download PDF certificates
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-play',\r\n intro: \"

Weekly Free CME Quick Quiz

\" +\r\n \"
  • Earn free CME every week
  • \" +\r\n \"
  • Peer leaderboards
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#account-info',\r\n intro: \"

Account Info

\" +\r\n \"
  • Your login ID and basic account information/status
  • \" +\r\n \"
  • Premium status
  • \" +\r\n \"
  • Trial status
  • \" +\r\n \"
  • View/edit profile
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#recent-activity',\r\n intro: \"

Recent Activity

\" +\r\n \"

Pick up where you left off, and see recently completed work.

\"\r\n },\r\n {\r\n element: '#my-cmes',\r\n intro: \"

My CMEs

\" +\r\n \"

Summary of CME credits available, earned, and claimed.

\"\r\n },\r\n {\r\n element: '#latest-news',\r\n intro: \"

Latest News

\" +\r\n \"

The latest article from our Medical Education Blog.

\"\r\n },\r\n {\r\n element: '#quickquiz-dash',\r\n intro: \"

Quick Quiz Dashboard

\" +\r\n \"
  • Quick access to the 5 latest Quick Quizzes
  • \" +\r\n \"
  • Summary of your rank, points, and high scores on the 5 latest Quick Quizzes
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Dashboard tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ]\r\n } else {\r\n introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Dashboard

\" +\r\n \"

Welcome to the dashboard. This is your \\\"home base\\\", from where you can directly access commonly-used features and tools, and view quick information about your progress and status.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#user-menu-drop',\r\n intro: \"

User Menu

\" +\r\n \"

Click or tap the user icon at the top right of any page to open the user menu.

\" +\r\n \"

User Menu Screenshot

\" +\r\n \"
    \" +\r\n \"
  1. User Profile: Change your password, manage payment methods, and update professional and personal information like your medical degree, specialty, gaming alias, phone number, address, etc.
  2. \" +\r\n \"
  3. Theme Switcher: Toggle between dark and light display themes. This feature is also available in your User Profile.
  4. \" +\r\n \"
  5. Sign Out: Signs you out of Med-Challenger on the current device. Don't forget to sign out when finished if using a shared computer.
  6. \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#main-nav-tree',\r\n intro: \"

Main Navigation

\" +\r\n \"

Access all parts of the Med-Challenger app from this menu.

\"\r\n },\r\n {\r\n element: '#what-do',\r\n intro: \"These quick-launch buttons provide an easy way to jump right in and start working.\"\r\n },\r\n {\r\n element: '#gtm-btn-study',\r\n intro: \"

Exam Study & Knowledge Review

\" +\r\n \"
  • Adaptive board exam sims
  • \" +\r\n \"
  • Chapter exams
  • \" +\r\n \"
  • Topic-based learning segments
  • \" +\r\n \"
  • Automatic remediation guidance
  • \" +\r\n \"
  • Custom Exam Builder
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-earn',\r\n intro: \"

Find, Earn, & Claim CME Credits

\" +\r\n \"
  • Find earnable CME by type
  • \" +\r\n \"
  • Earn CME by completing CME assessments
  • \" +\r\n \"
  • Claim CME and download PDF certificates
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-play',\r\n intro: \"

Weekly Free CME Quick Quiz

\" +\r\n \"
  • Earn free CME every week
  • \" +\r\n \"
  • Peer leaderboards
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#gtm-btn-explore',\r\n intro: \"

See & Learn What's New

\" +\r\n \"
  • Latest posts from our Medical Education blog
  • \" +\r\n \"
  • Med-Challenger social media feeds
  • \" +\r\n \"
  • Curated medical news from around the Web
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#account-info',\r\n intro: \"

Account Info

\" +\r\n \"
  • Your login ID and basic account information/status
  • \" +\r\n \"
  • Premium status
  • \" +\r\n \"
  • Trial status
  • \" +\r\n \"
  • View/edit profile
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#recent-activity',\r\n intro: \"

Recent Activity

\" +\r\n \"

Pick up where you left off, and see recently completed work.

\"\r\n },\r\n {\r\n element: '#my-cmes',\r\n intro: \"

My CMEs

\" +\r\n \"

Summary of CME credits available, earned, and claimed.

\"\r\n },\r\n {\r\n element: '#latest-news',\r\n intro: \"

Latest News

\" +\r\n \"

The latest article from our Medical Education Blog.

\"\r\n },\r\n {\r\n element: '#quickquiz-dash',\r\n intro: \"

Quick Quiz Dashboard

\" +\r\n \"
  • Quick access to the 5 latest Quick Quizzes
  • \" +\r\n \"
  • Summary of your rank, points, and high scores on the 5 latest Quick Quizzes
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Dashboard tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ]\r\n }\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.PersistentCourseId = $rootScope.UserSettings.PersistentCourseId || '';\r\n $scope.rosterFilter = '';\r\n $scope.IsOn = true;\r\n\r\n //$scope.UserSettings = $rootScope.UserSettings;\r\n /*$scope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (data) {\r\n //$scope.LoadSettings();\r\n //console.log('Settings Saved')\r\n });\r\n }*/\r\n $scope.DismissHelp = function(){\r\n $rootScope.UserSettings.HelpDashboard_Hide = 'True';\r\n $rootScope.SaveUserSettings();\r\n }\r\n $scope.NowDate = new Date();\r\n $scope.LastLogin = new Date(1*$scope.User.LastLoginDate.replace(/\\D/g,''));\r\n $scope.Courses = $rootScope.Courses;\r\n $http.post(\"/Execute/GetUserCourses\", [$scope.User.UserName]).success(function (data) {\r\n $scope.UserCourses = data.RS_0;\r\n $scope.ExpiredTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"True\" && e.IsTrial == \"1\");\r\n })\r\n $scope.ActiveTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"False\" && e.IsTrial==\"1\");\r\n })\r\n $scope.IsExpiredTrial = function(id) {\r\n var find = jQuery.grep($scope.ExpiredTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.IsActiveTrial = function(id) {\r\n var find = jQuery.grep($scope.ActiveTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.TrialExpires = function(id) {\r\n var course = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.Id == id.toString);\r\n });\r\n return course.Expires;\r\n }\r\n //console.log($scope.ExpiredTrials)\r\n });\r\n $scope.WaitNews = true;\r\n $scope.ChallFeed = {};\r\n if($rootScope.InstitutionUserList){\r\n $scope.InstitutionUserList = $rootScope.InstitutionUserList;\r\n }\r\n if($rootScope.InstitutionSettings){\r\n $scope.InstitutionSettings = $rootScope.InstitutionSettings;\r\n }\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n if(filterIt($rootScope.UserRoles,'Program Manager').length) {\r\n $scope.IsProgMgr = true;\r\n } else {\r\n $scope.IsProgMgr = false;\r\n }\r\n $scope.IsAssignee = $rootScope.IsAssignee;\r\n RSSParser.parseURL('https://www.challengercme.com/feed/', function(err, parsed){\r\n $timeout(function(){\r\n $scope.LastRSS = parsed.feed.entries[0];\r\n $scope.LastRSS.intDate = Date.parse($scope.LastRSS.pubDate);\r\n $scope.WaitNews = false;\r\n })\r\n\r\n });\r\n $http.post(\"/Execute/GetAssessmentActivity\", [$scope.User.UserName, 1, \"1\"]).success(function (dta) {\r\n $scope.InProgress = dta.RS_0;\r\n \r\n $scope.Completed = dta.RS_1\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n $http.post('/Execute/GetAssessmentViewability', [ass.Assessment_Id, ass.CourseId, ass.ChapterId, ass.TopicId, $rootScope.User.UserId]).success(function (data) {\r\n ass.Assignments = data.RS_0[0];\r\n });\r\n });\r\n //console.log($scope.Completed)\r\n });\r\n $scope.StartAssessment = function (ASS) {\r\n $scope.ShowLoad = ASS.Id;\r\n ASS.custom = ((ASS.custom==\"1\") ? 1 : 0);\r\n var params = [$rootScope.User.UserName, ASS.CourseId, ASS.ChapterId, ASS.TopicId, ASS.SubTopicId || \"0\", ASS.Assessment_Id, CurrentUserTZoffsett]\r\n //////console.log(params)\r\n /////////////////////////////////////////////////\r\n var AHparams = [$rootScope.User.UserName, ASS.CourseId, ASS.ChapterId, ASS.TopicId || \"0\", ASS.SubTopicId || \"0\", ASS.Assessment_Id, ASS.custom]\r\n //////console.log(params)\r\n $http.post(\"/Execute/GetAssessmentHistory\", AHparams).success(function (data) {\r\n //console.log(data)\r\n $scope.Complete = data.RS_0;\r\n\r\n angular.forEach($scope.Complete, function (com) {\r\n com.EndDateTime = new Date(com.EndDateTime + \" UTC\");\r\n com.StartDateTime = new Date(com.StartDateTime + \" UTC\");\r\n });\r\n $scope.InProgress = data.RS_1;\r\n angular.forEach($scope.InProgress, function (inp) {\r\n inp.StartDateTime = new Date(inp.StartDateTime + \" UTC\");\r\n });\r\n\r\n if (data.RS_3) {\r\n ////console.log('ok')\r\n $scope.Viewabilty = data.RS_3[0];\r\n $scope.Assignments = data.RS_2[0] || {};\r\n \r\n \r\n\r\n //$scope.HasViewability = true;\r\n if ($scope.Assignments.EffectiveDateTime) {\r\n $scope.Assignments.EffectiveDateTime = new Date($scope.Assignments.EffectiveDateTime + ' UTC');\r\n }\r\n if ($scope.Assignments.DueDateTime) {\r\n $scope.Assignments.DueDateTime = new Date($scope.Assignments.DueDateTime + ' UTC')\r\n }\r\n \r\n if ($scope.Assignments.Viewablity == 3) {\r\n\r\n //console.log($scope.Assignments.EffectiveDateTime, $scope.Assignments.DueDateTime, Today)\r\n if ($scope.Assignments.EffectiveDateTime < Today && $scope.Assignments.DueDateTime > Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false;\r\n ////console.log($scope.Assignments.HasViewability)\r\n }\r\n }\r\n if ($scope.Assignments.Viewablity == 2) {\r\n\r\n if ($scope.Assignments.EffectiveDateTime < Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false\r\n }\r\n //console.log($scope.Assignments)\r\n\r\n }\r\n if ($scope.Assignments.Viewablity == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n\r\n }\r\n }\r\n else {\r\n $scope.Assignments = data.RS_2[0];\r\n if ($scope.Assignments.Viewable && $scope.Assignments.Viewable == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n }\r\n\r\n\r\n ////console.log(data)\r\n\r\n\r\n ////console.log($scope.Assignments)\r\n if ($scope.Viewabilty) {\r\n if ($scope.Viewabilty.ShowLeaderBoard == '') {\r\n $scope.Viewabilty.ShowLeaderBoard = '0'\r\n }\r\n if ($scope.Viewabilty.PrescriptiveReport == '') {\r\n $scope.Viewabilty.PrescriptiveReport = '1'\r\n }\r\n if ($scope.Viewabilty.MinutesAllocated == '') {\r\n $scope.Viewabilty.MinutesAllocated = '0'\r\n }\r\n }\r\n ////console.log($scope.Viewabilty)\r\n if ($scope.Assignments.HasViewability && $scope.Viewabilty && $scope.Viewabilty.MinutesAllocated && $scope.Viewabilty.MinutesAllocated > 0 && new Date($scope.Assignments.EffectiveDateTime + ' UTC') > Today && new Date($scope.Assignments.DueDateTime + ' UTC') < Today) {\r\n if (confirm(\"This Assessment will be automatically scored in \" + $scope.Viewabilty.MinutesAllocated +\" Minute. Are you ready to start?\")) {\r\n if (ASS.custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n if (ASS.custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n });\r\n ///////////////////////////////////////\r\n\r\n }\r\n $scope.ResumeAssessment = function (InProgress) {\r\n $location.path(\"/QuestionPool/\" + InProgress.Assessment_Id + \"/\" + InProgress.CourseId + \"/\" + InProgress.ChapterId + \"/\" + InProgress.TopicId + \"/Assessment\");\r\n }\r\n $scope.DeleteAssessment = function (assessment) {\r\n swal({\r\n title: \"Are You Sure?\",\r\n text: \"You are about to delete an Assessment attempt.
This action CANNOT be undone.
Are you sure you want to delete and lose all progress for this attempt?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete Attempt\",\r\n closeOnConfirm: false,\r\n html: true\r\n },\r\n function () {\r\n $http.post(\"/Execute/DeleteUserAssessment\", [assessment.Id]).success(function (dta) {\r\n swal(\"Deleted!\", \"Assessment attempt successfully deleted.\", \"success\");\r\n $http.post(\"/Execute/GetLastActivity\", [$scope.User.UserName]).success(function (dtaa) {\r\n $scope.InProgress = dtaa.RS_0;\r\n $scope.Completed = dtaa.RS_1;\r\n $scope.Profile = dtaa.RS_2[0];\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n });\r\n });\r\n };\r\n $scope.Goto = function (Assessment) {\r\n $window.location.href = \"/QuestionPool/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\";\r\n }\r\n $http.post(\"/Execute/GetCMETypes\").success(function (data) {\r\n $scope.CMETypes = data.RS_0;\r\n angular.forEach($scope.CMETypes, function (cmeAttributes) {\r\n $http.post(\"/Execute/GetCMEDataForClaims\", [$scope.User.UserName, CurrentUserTZoffsett, cmeAttributes.Id]).success(function (data) {\r\n //////console.log(data)\r\n if (parseInt(data.RS_1[0].Available) > 0 || parseInt(data.RS_1[0].EarnedHours) > 0) {\r\n cmeAttributes.getCMEStats = data.RS_1[0];\r\n cmeAttributes.getCMEStats.totalUnclaimed = cmeAttributes.getCMEStats.EarnedHours - cmeAttributes.getCMEStats.ClaimedHours;\r\n //console.log(cmeAttributes.getCMEStats)\r\n \r\n }\r\n $scope.cmeSelect = $scope.CMETypes[0];\r\n \r\n //cmeAttributes.getCMEStats.AvailableNum = parseInt(cmeAttributes.getCMEStats.Available)\r\n \r\n \r\n \r\n //cmeAttributes.getCMEStats = $filter('filter')(cmeAttributes.getCMEStats, parseInt(cmeAttributes.getCMEStats.Available) > 0 )\r\n //angular.forEach(cmeAttributes.getCMEStats, function (stat) {\r\n // stat = $filter('filter')(stat, parseInt(stat.Available > 0))\r\n //})\r\n \r\n // cmeAttributes = $filter('filter')(cmeAttributes.getCMEStats, cmeAttributes.getCMEStats.AvailableNum != 0)\r\n \r\n \r\n });\r\n });\r\n });\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 12 Oct 2018\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.launchtopics', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('launchtopics', {\r\n url: '/launch/topics',\r\n title: 'Launch Topics',\r\n templateUrl: '/app/pages/launchtopics/launchtopics.html',\r\n /*sidebarMeta: {\r\n icon: 'fa fa-graduation-cap',\r\n order: 0,\r\n secure: { Allow: [\"Learner\"] }\r\n },*/\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n $scope.Courses = $rootScope.Courses;\r\n $scope.csel = {};\r\n $scope.csel.SelCourse = '';\r\n //console.log($scope.Courses);\r\n $scope.courseSelectChangeHandler = function() {\r\n var newCourseId = $scope.csel.SelCourse;\r\n $rootScope.UserSettings.PersistentCourseId = newCourseId;\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (dataff) {\r\n //$rootScope.UserSettings = $scope.USettings;\r\n $location.url('/e/topics/'+newCourseId);\r\n });\r\n\r\n };\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.maps', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('maps', {\r\n url: '/maps',\r\n templateUrl: 'app/pages/maps/maps.html',\r\n abstract: true,\r\n title: 'Maps',\r\n sidebarMeta: {\r\n icon: 'ion-ios-location-outline',\r\n order: 500,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n })\r\n .state('maps.gmap', {\r\n url: '/gmap',\r\n templateUrl: 'app/pages/maps/google-maps/google-maps.html',\r\n controller: 'GmapPageCtrl',\r\n title: 'Google Maps',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n })\r\n .state('maps.leaflet', {\r\n url: '/leaflet',\r\n templateUrl: 'app/pages/maps/leaflet/leaflet.html',\r\n controller: 'LeafletPageCtrl',\r\n title: 'Leaflet Maps',\r\n sidebarMeta: {\r\n order: 100,\r\n },\r\n })\r\n .state('maps.bubble', {\r\n url: '/bubble',\r\n templateUrl: 'app/pages/maps/map-bubbles/map-bubbles.html',\r\n controller: 'MapBubblePageCtrl',\r\n title: 'Bubble Maps',\r\n sidebarMeta: {\r\n order: 200,\r\n },\r\n })\r\n .state('maps.line', {\r\n url: '/line',\r\n templateUrl: 'app/pages/maps/map-lines/map-lines.html',\r\n controller: 'MapLinesPageCtrl',\r\n title: 'Line Maps',\r\n sidebarMeta: {\r\n order: 300,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author d.lapoint\r\n * created on 08/30/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.myassignments', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('myassignments', {\r\n url: '/my-assignments',\r\n title: 'My Assignments',\r\n templateUrl: '/app/pages/myassignments/myassignments.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-tasks',\r\n order: 50,\r\n secure: { Allow: [\"Assignee\"] }\r\n },\r\n\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 12/01/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.news', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('news', {\r\n url: '/news',\r\n title: 'News & Updates',\r\n templateUrl: '/app/pages/news/news.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-newspaper-o',\r\n order: 600,\r\n secure: { Allow: [\"Learner\",\"Program Manager\"] }\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, $location, $timeout) {\r\n $scope.WaitLoading = true;\r\n $scope.ChallFeed = {};\r\n RSSParser.parseURL('https://www.challengercme.com/feed/', function(err, parsed){\r\n $timeout(function(){\r\n $scope.ChallFeed = parsed.feed;\r\n //console.log($scope.ChallFeed)\r\n angular.forEach($scope.ChallFeed.entries, function(itm){\r\n itm.intDate = Date.parse(itm.pubDate);\r\n itm.content = itm.content.replace(/class=\"more-link\"/,\"class=\\\"more-link btn btn-success btn-sm\\\" target=\\\"_blank\\\"\");\r\n itm.content = itm.content.replace(/... 0) {\r\n $http.post(\"/Execute/GetInstitutionMembers\", [$rootScope.User.InstitutionId]).success(function(r){\r\n Note.ShareableList = jQuery.grep(r.RS_0, function(s){\r\n return s.UserID != $rootScope.User.UserId;\r\n });\r\n angular.forEach(Note.ShareableList, function(s){\r\n //console.log(s)\r\n if(Note.ShareArray.includes(s.UserID)){\r\n s.ShareWith=true;\r\n }\r\n })\r\n Note.ShowShare = true;\r\n });\r\n }\r\n }\r\n $scope.ToggleShare = function(Note, UserId) {\r\n\r\n }\r\n $scope.CancelShare = function(Note) {\r\n delete Note.ShowShare;\r\n delete Note.ShareableList;\r\n }\r\n $scope.SaveShare = function(Note) {\r\n console.log(Note)\r\n Note.ShareArray = [];\r\n Note.ShareArrayTmp = [];\r\n angular.forEach(Note.ShareableList, function(u){\r\n if(u.ShareWith) {\r\n Note.ShareArrayTmp.push(1*u.UserID);\r\n }\r\n });\r\n Note.ShareArray = Note.ShareArrayTmp.join();\r\n delete Note.ShowShare;\r\n delete Note.ShareableList;\r\n delete Note.ShareArrayTmp;\r\n Note = Notes.Touch(Note);\r\n }\r\n $scope.DeleteMe = function(Note) {\r\n swal({\r\n title: \"Delete Note?\",\r\n text: \"Are you sure? There is no undo.\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete Note\",\r\n cancelButtonText: \"Cancel\",\r\n html: true,\r\n //closeOnConfirm: false\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n Notes.Delete(Note);\r\n var index = $scope.AllNotes.OwnedNotes.indexOf(Note);\r\n if(index != -1) {\r\n $scope.AllNotes.OwnedNotes.splice(index,1);\r\n }\r\n }\r\n });\r\n }\r\n $scope.DeleteMark = function(Mark) {\r\n swal({\r\n title: \"Remove From Bookmarks?\",\r\n text: \"Are you sure?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Remove\",\r\n cancelButtonText: \"Cancel\",\r\n html: true,\r\n //closeOnConfirm: false\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n Bookmarks.Delete(Mark);\r\n var index = $scope.AllMarks.MyMarked.indexOf(Mark);\r\n if(index != -1) {\r\n $scope.AllMarks.MyMarked.splice(index,1);\r\n }\r\n }\r\n });\r\n }\r\n $scope.RenderBMType = function(BMTypeId) {\r\n var BMOut;\r\n switch(BMTypeId) {\r\n case \"1\":\r\n BMOut = \"Bookmarked\";\r\n break;\r\n case \"2\":\r\n BMOut = \"Need Info\";\r\n break;\r\n case \"3\":\r\n BMOut = \"Has Issue\";\r\n break;\r\n case \"4\":\r\n BMOut = \"Favorite\";\r\n }\r\n return BMOut;\r\n }\r\n $scope.BMGo = function(path) {\r\n $location.url(path);\r\n }\r\n $scope.GetQuestion = function(QId,QType) {\r\n console.log(QId+':'+QType)\r\n if(QId>0){\r\n if(QType==1){\r\n $http.get('/api/Questions('+QId+'L)?$expand=Answers').success(function(r){\r\n //console.log(r)\r\n $scope.ShowBMDetail.Question = r.d;\r\n })\r\n }else if(QType==2){\r\n /** REPLACE WITH CUSTOM QUESTION GETTER */\r\n $http.post('/Execute/GetQuestion',[QId,0]).success(function(r){\r\n //console.log(r)\r\n $scope.ShowBMDetail.Question = JSON.parse(r.RS_0[0].Question);\r\n $scope.ShowBMDetail.Question.CorrectRemediation = r.RS_0[0].CorrectRemediation;\r\n })\r\n }\r\n }else{\r\n return false;\r\n }\r\n //return QOut;\r\n }\r\n $scope.ApplyFilter = function (fil) {\r\n switch (fil) {\r\n case '-1':\r\n $scope.NoteTypeFilter = '';\r\n break;\r\n case '1':\r\n $scope.NoteTypeFilter = '1';\r\n break;\r\n case '2':\r\n $scope.NoteTypeFilter = '2';\r\n break;\r\n case '3':\r\n $scope.NoteTypeFilter = '3';\r\n break;\r\n case '5':\r\n $scope.NoteTypeFilter = '5';\r\n break;\r\n default:\r\n $scope.NoteTypeFilter = 'all';\r\n }\r\n }\r\n $scope.BMApplyFilter = function (fil) {\r\n switch (fil) {\r\n case '-1':\r\n $scope.BMTypeFilter = '';\r\n break;\r\n case '1':\r\n $scope.BMTypeFilter = '1';\r\n break;\r\n case '2':\r\n $scope.BMTypeFilter = '2';\r\n break;\r\n case '3':\r\n $scope.BMTypeFilter = '3';\r\n break;\r\n case '5':\r\n $scope.BMTypeFilter = '5';\r\n break;\r\n default:\r\n $scope.BMTypeFilter = 'all';\r\n }\r\n }\r\n $scope.LoadNotes();\r\n $scope.LoadMarks();\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author c.nicholson \r\n * created on 11/30/2016\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.products', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('usertrials', {\r\n url: '/trialproducts',\r\n title: 'Trial Products',\r\n //templateUrl: '/app/pages/products/usertrials.html'\r\n template: ''\r\n })\r\n .state('products', {\r\n url: '/store',\r\n title: 'Store',\r\n displayTitle: 'Med-Challenger Store',\r\n useDisplayTitle: false,\r\n hideMeta: true,\r\n templateUrl: '/app/pages/products/storelistview.html',\r\n sidebarMeta: {\r\n icon: 'fa fa-shopping-cart',\r\n order: 700\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.tagfilter = $stateParams.tagfilter;\r\n }\r\n })\r\n .state('conversion', {\r\n url: '/conversion',\r\n title: 'Order Complete',\r\n templateUrl: '/app/pages/products/conversion.html'\r\n })\r\n .state('trialconversion', {\r\n url: '/trialconversion',\r\n title: 'Trial Ready',\r\n templateUrl: '/app/pages/products/trialconversion.html',\r\n controller: function ($scope,$rootScope,$http,$stateParams) {\r\n $scope.SubscriptionId = $stateParams.sid;\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $rootScope.UserSettings = $scope.UserSettings;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.UserSettings.HideTrialBar=false;\r\n $scope.SaveUserSettings();\r\n }\r\n })\r\n .state('product', {\r\n url: '/store/product/:Id/:Slug',\r\n title: 'Product',\r\n templateUrl: '/app/pages/products/products.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.Id = $stateParams.Id;\r\n $scope.Slug = $stateParams.Slug;\r\n }\r\n })\r\n .state('reqp', {\r\n url:'/store/RequiredPurchase',\r\n title:'Required Purchases',\r\n templateUrl: '/app/pages/products/requiredpurchase.html',\r\n controller: function($scope, $rootScope, $http, $stateParams, $location, $window) {\r\n\r\n /*$scope.reqp = [];\r\n $http.post('/Execute/GetRequiredProductsNotPurchased', [$rootScope.User.UserId]).success(function(data){\r\n $scope.reqp = data.RS_0;\r\n });*/\r\n }\r\n })\r\n .state('directaddtocart', {\r\n url: '/AddCart/:Id',\r\n title: 'Add To Cart',\r\n templateUrl: '/app/pages/products/CartDirect.html',\r\n controller: function($scope,$http,$rootScope,$window,$cookies,$cookieStore,$stateParams,dataService){\r\n $scope.LoadyBaloney = true;\r\n $scope.dacproceed = true;\r\n $scope.ProductId = $stateParams.Id;\r\n $scope.User = $rootScope.User;\r\n $scope.PremiumRenewDate = new Date(new Date().setFullYear(new Date().getFullYear() + 1));\r\n $scope.PremiumRenewDate.setDate($scope.PremiumRenewDate.getDate() + 1);\r\n $scope.Cart = $cookies.getObject('Cart');\r\n if (!$scope.Cart || typeof ($scope.Cart) === \"undefined\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n }\r\n $scope.CalculateCart = function () {\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n $scope.Cart.PremiumIncluded = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.IncludesPremium == true) {\r\n $scope.Cart.PremiumIncluded = true;\r\n }\r\n });\r\n if ($scope.Cart.PremiumIncluded == true) {\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == 1) {\r\n ////////console.log(itm)\r\n itm.Price = 0.0;\r\n itm.PriceIncluded = true;\r\n }\r\n });\r\n }\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n $scope.Cart.TotalPrice += parseFloat(itm.Price);\r\n });\r\n }\r\n $http.post('/Execute/UAP_GetProduct', [$scope.ProductId]).success(function (data) {\r\n $scope.Product = data.RS_0[0];\r\n $scope.Product.Modifiers = JSON.parse($scope.Product.Modifiers);\r\n angular.forEach($scope.Product.Modifiers, function(mod){\r\n mod.SelectedOption = mod.Options[0].Id;\r\n })\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == $scope.Product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n if($scope.Product.Modifiers.length){\r\n //var dacproceed = true;\r\n angular.forEach($scope.Product.Modifiers, function(mod){\r\n if(mod.Options.length>1){\r\n $scope.dacproceed = false;\r\n $window.location.href='/store/product/'+$scope.ProductId+'/dacselmod';\r\n }else{\r\n mod.SelectedOption = mod.Options[0].Id;\r\n }\r\n })\r\n if($scope.dacproceed){\r\n var itm = {};\r\n itm.Id = $scope.Product.Id;\r\n itm.Price = $scope.Product.Price;\r\n itm.Modifiers = $scope.Product.Modifiers;\r\n itm.NoDiscount = ($scope.Product.NoDiscount==\"True\");\r\n itm.Name = $scope.Product.Name;\r\n itm.IncludesPremium = ($scope.Product.IncludesPremium == \"True\");\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n $scope.Product.IsInCart = true;\r\n\r\n }\r\n }else{\r\n var itm = {};\r\n itm.Id = $scope.Product.Id;\r\n itm.Price = $scope.Product.Price;\r\n itm.Name = $scope.Product.Name;\r\n itm.IncludesPremium = ($scope.Product.IncludesPremium == \"True\");\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n $scope.Product.IsInCart = true;\r\n\r\n }\r\n\r\n }\r\n if($scope.User.UserName){\r\n $http.post(\"/GetProducts\").success(function (datb) {\r\n $scope.Products = datb.RS_0;\r\n\r\n angular.forEach($scope.Products, function (prd) {\r\n prd.HasTrial = (prd.HasTrial == \"True\" || prd.HasTrial == \"1\")\r\n prd.TrialHasExpired = (prd.TrialHasExpired == \"True\" || prd.TrialHasExpired == \"1\");\r\n if (prd.Id == $scope.Product.Id) {\r\n $scope.Product.HasProduct = (prd.HasProduct == \"True\" || prd.HasProduct == \"1\");\r\n $scope.Product.HasTrial = prd.HasTrial;\r\n $scope.Product.TrialHasExpired = prd.TrialHasExpired;\r\n $scope.Product.Tags = JSON.parse(prd.Tags);\r\n }\r\n });\r\n\r\n if($scope.Product.HasProduct && $scope.Product.HasTrial != true){\r\n ////console.log($scope.Product.HasTrial)\r\n $scope.AlreadyOwnStop = true;\r\n\r\n }else{\r\n $scope.AlreadyOwnStop = false;\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n\r\n }\r\n\r\n });\r\n } else {\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n\r\n }\r\n if($scope.dacproceed) {\r\n $scope.LoadyBaloney = false;\r\n }\r\n\r\n });\r\n }\r\n })\r\n .state('cart', {\r\n url: '/cart',\r\n title: 'Your Cart',\r\n template: function (urlattr) {\r\n return \"
\";\r\n }\r\n })\r\n .state('checkout', {\r\n url: '/checkout',\r\n title: 'Check Out',\r\n templateUrl: '/app/pages/products/checkout.html',\r\n controller: function ($scope, $http, $rootScope, $window, $location, $cookies, $cookieStore) {\r\n $scope.PaymentOption = false;\r\n $scope.TermsAccepted = false;\r\n $scope.ExplainPremium = function() {\r\n swal(\r\n {\r\n title: \"Premium Membership\",\r\n text: \"

This product includes a complimentary year of Premium.

\" +\r\n \"

As a Premium member, your courses and assets stay updated, so you never have to re-buy.

\" +\r\n \"Includes free content updates to all assets, CME claims, annual CME credit usage renewal, and any new course editions.

\" +\r\n \"Upon expiry of your free year, Premium Membership renews automatically for another year. $199 plus applicable tax will be charged to your primary payment method at that time. Auto-renewal can be disabled by checking \\\"Auto Renew Opt Out\\\" in your profile.

\" +\r\n \"If you already have an existing Premium membership, your current subscription's expiration date will be extended by one year.\" +\r\n \"

\",\r\n type: \"success\",\r\n confirmButtonText: \"Okay\",\r\n html: true\r\n }\r\n )\r\n }\r\n if(!$rootScope.User.UserName){\r\n $window.location.href='/auth.html?returnurl=/checkout';\r\n }\r\n $scope.searchObj = $location.search();\r\n $scope.IsExpired = function(exp) {\r\n if(exp){\r\n var expArr = exp.split('/');\r\n var now = new Date();\r\n var disMonth = new Date(now.getFullYear(),now.getMonth(),1);\r\n var expD = new Date(expArr[1],(expArr[0]-1),1);\r\n return (expD < disMonth);\r\n }else{\r\n return false;\r\n }\r\n }\r\n $scope.ProcessingOrder = false;\r\n $scope.ProcessOrder = function () {\r\n $scope.ProcessingOrder = true;\r\n var discCode = '';\r\n var SOBid = '';\r\n if ($scope.Discount) {\r\n discCode = $scope.Discount.Code;\r\n SOBid = $scope.Discount.SalesForceReferenceId\r\n }\r\n var po = 0\r\n if ($scope.PaymentOption) {\r\n po = $scope.PaymentOption;\r\n }\r\n var optionIds = $scope.Cart.SelectedModifiers.join(',');\r\n var order = { PaymentOptionId: po, Items: $scope.Cart.Items, DiscountCode: discCode, SOB: SOBid, OptionIds: optionIds }; // OptionIds: Comma delimited string of IDs\r\n //console.log(JSON.stringify(order));\r\n if ($scope.IsValid = true) {\r\n $scope.Wait = true;\r\n $http.post(\"/ProcessOrder\", order).success(function (data) {\r\n $scope.ProcessResult = data;\r\n $scope.Wait = false;\r\n if (data.ResultMessage == \"APPROVAL\" || data.ResultMessage == \"SUCCESS\") {\r\n /*$scope.fireConversion = function () {\r\n $window.google_trackConversion({\r\n google_conversion_id: 1024723395,\r\n google_conversion_language: \"en\",\r\n google_conversion_format: \"3\",\r\n google_conversion_color: \"ffffff\",\r\n google_conversion_label: \"uRzNCKKd9mAQw5PQ6AM\",\r\n google_conversion_value: $scope.ProcessResult.TotalAmount,\r\n google_remarketing_only: false\r\n });\r\n }*/\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $scope.ProcessingOrder = false;\r\n //$scope.fireConversion();\r\n if($window.google_trackConversion){\r\n $window.google_trackConversion({\r\n google_conversion_id: 1024723395,\r\n google_conversion_language: \"en\",\r\n google_conversion_format: \"3\",\r\n google_conversion_color: \"ffffff\",\r\n google_conversion_label: \"uRzNCKKd9mAQw5PQ6AM\",\r\n google_conversion_value: $scope.ProcessResult.TotalAmount,\r\n google_remarketing_only: false\r\n });\r\n }\r\n $window.location.href = \"/conversion\"\r\n } else {\r\n $scope.ProcessingOrder = false;\r\n swal({\r\n title: \"Transaction incomplete!\",\r\n text: \"Something happened while processing your order. Please check your payment information and try again.\",\r\n type: \"warning\",\r\n closeOnConfirm: true\r\n });\r\n }\r\n });\r\n }\r\n }\r\n $scope.LookupCode = function (code) {\r\n delete $scope.Discount;\r\n delete $scope.InvalidDiscount;\r\n $http.post(\"/Execute/GetDiscountByCode\", [code]).success(function (data) {\r\n if (data.RS_0[0]) {\r\n $scope.CartRev = angular.copy($scope.Cart);\r\n $scope.Discount = data.RS_0[0];\r\n $scope.Discount.Expires = new Date($scope.Discount.Expires)\r\n var dt = new Date()\r\n $scope.Discount.HasExpired = (dt > $scope.Discount.Expires);\r\n $scope.Discount.UsedUp = ($scope.Discount.UsedUp == \"1\")\r\n }else{\r\n $scope.InvalidDiscount = true;\r\n }\r\n $scope.ValidateOrder();\r\n //console.log($scope.Discount)\r\n });\r\n }\r\n $scope.User = $rootScope.User\r\n $scope.Cart = $cookies.getObject('Cart');\r\n $scope.Cart.SelectedModifiers = [];\r\n $scope.Cart.NoDiscount = false;\r\n $scope.Cart.PremiumInCart = false;\r\n angular.forEach($scope.Cart.Items, function(itm){\r\n if(itm.NoDiscount) {\r\n $scope.Cart.NoDiscount=true;\r\n }\r\n if(itm.Id == 1) {\r\n $scope.Cart.PremiumInCart = true;\r\n }\r\n angular.forEach(itm.Modifiers, function(mod){\r\n $scope.Cart.SelectedModifiers.push(mod.SelectedOption);\r\n })\r\n })\r\n $scope.$on('TransactionPayment', function (evt,id) {\r\n $scope.PaymentOption = id;\r\n $scope.ValidateOrder()\r\n })\r\n $scope.$on('DeletePayment', function(evt,data){\r\n $scope.PaymentOption = false;\r\n })\r\n $scope.$on('TransactionPaymentExp', function(evt,exp) {\r\n if($scope.IsExpired(exp)) {\r\n $scope.PaymentExpired = true;\r\n }else{\r\n $scope.PaymentExpired = false;\r\n }\r\n })\r\n $scope.ValidateOrder = function (fn) {\r\n if(!$scope.Cart.Items.length){\r\n $window.location.href=\"/cart\";\r\n }\r\n var itemIds = [];\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n itemIds.push(itm.Id.toString());\r\n });\r\n var optionIds = $scope.Cart.SelectedModifiers.join(',');\r\n var discCode = '';\r\n if ($scope.Discount) {\r\n discCode = $scope.Discount.Code;\r\n }\r\n var po = 0\r\n if ($scope.PaymentOption) {\r\n po = $scope.PaymentOption;\r\n //console.log($scope.PaymentOption)\r\n }\r\n //console.log([(typeof ($scope.User.UserId) == 'undefined') ? \"0\" : $scope.User.UserId, po, itemIds.join(\",\"), discCode])\r\n $http.post(\"/Execute/ValidateOrder\", [(typeof ($scope.User.UserId) == 'undefined') ? \"0\" : $scope.User.UserId, po, itemIds.join(\",\"), discCode, optionIds]).success(function (data) { // Last param = OptionIds\r\n $scope.Cart.ItemsRemoved = false;\r\n $scope.Cart.DiscountTotal = parseFloat(\"0.0\");\r\n var owned = data.RS_0;\r\n angular.forEach(owned, function (itm) {\r\n if (itm.AlreadyHas != \"\" && itm.AlreadyHas != null) {\r\n angular.forEach($scope.Cart.Items, function (cItem) {\r\n if (cItem.Id == itm.ProductId) {\r\n //cItem.Price = 0\r\n //cItem.Discount = 0\r\n //cItem.AlreadyHas = true;\r\n //$scope.Cart.ItemsRemoved = true;\r\n $scope.RemoveFromCart(cItem);\r\n }\r\n });\r\n } else {\r\n angular.forEach($scope.Cart.Items, function (cItem) {\r\n if (cItem.Id == itm.ProductId) {\r\n cItem.Price = itm.Price\r\n cItem.Discount = parseFloat(itm.Discount)\r\n if(itm.NoDiscount==\"True\"){\r\n cItem.NoDiscount=\"True\";\r\n $scope.Cart.NoDiscount=true;\r\n }\r\n if($scope.Cart.NoDiscount){\r\n $scope.Cart.DiscountTotal = 0;\r\n }else{\r\n $scope.Cart.DiscountTotal += cItem.Discount\r\n }\r\n\r\n }\r\n ////console.log(cItem)\r\n });\r\n }\r\n });\r\n CalculateCart($scope);\r\n\r\n if ($scope.Cart.TotalPrice > 0) {\r\n if (po != 0) {\r\n $scope.IsValid = true;\r\n }\r\n else {\r\n $scope.IsValid = false;\r\n }\r\n } else {\r\n if ($scope.Cart.Items.length > 0) {\r\n $scope.IsValid = true;\r\n }\r\n else {\r\n $scope.IsValid = false;\r\n }\r\n\r\n }\r\n //console.log($scope.Cart);\r\n if (fn) {\r\n fn();\r\n }\r\n });\r\n }\r\n $scope.RemoveFromCart = function (itm) {\r\n var index = -1\r\n angular.forEach($scope.Cart.Items, function (prd, idx) {\r\n if (prd.Id == itm.Id) {\r\n index = idx;\r\n }\r\n });\r\n\r\n if (index > -1) {\r\n $scope.Cart.Items.splice(index, 1);\r\n }\r\n //////console.log($scope.Cart);\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n $scope.ValidateOrder();\r\n }\r\n $scope.ValidateOrder();\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author c.nicholson \r\n * created on 11/30/2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.profile', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('profile', {\r\n url: '/profile',\r\n title: 'Profile',\r\n templateUrl: 'app/pages/profile/profile.html',\r\n controller: 'ProfilePageCtrl'\r\n })\r\n .state('cmeprofile', {\r\n url: '/cmeprofile',\r\n title: 'Required CME Information',\r\n templateUrl: 'app/pages/profile/cmeprofile.html',\r\n controller: 'CMEProfilePageCtrl'\r\n });\r\n }\r\n\r\n})();\r\n\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.questions', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('author.questions', {\r\n url: '/questions',\r\n title: 'My Questions',\r\n templateUrl: '/app/pages/questions/questions.html',\r\n sidebarMeta: {\r\n icon: 'ion-ios-book',\r\n order: 10,\r\n //secure: { Allow: [\"Administrators\"] },\r\n secure: { Allow: [\"Authors\", \"Administrators\"] }\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams) {\r\n $scope.User = $rootScope.User;\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 08/23/2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.quickquiz', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('qq', {\r\n url: '/quickquiz',\r\n title: 'Quick Quiz',\r\n //templateUrl: '/app/pages/quickquiz/quickquiz.html',\r\n template: '',\r\n sidebarMeta: {\r\n icon: 'fa fa-trophy',\r\n order: 500,\r\n secure: { Allow: [\"Learner\",\"Program Manager\"] }\r\n },\r\n controller: function() {\r\n\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author d.lapoint\r\n * created on 27 Jul 2017\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.registration', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('regstepone', {\r\n url: '/registration',\r\n title: 'Registration: Your Interest',\r\n templateUrl: 'app/pages/registration/registration1.html',\r\n controller: 'RegistrationPageCtrl1'\r\n })\r\n .state('regsteptwo', {\r\n url: '/registration/2',\r\n title: 'Create Free Account',\r\n templateUrl: 'app/pages/registration/registration2.1.html',\r\n controller: 'RegistrationPageCtrl2'\r\n })\r\n .state('regstepthree', {\r\n url: '/registration/3',\r\n title: 'Registration Step 3: Complete Your Profile',\r\n templateUrl: 'app/pages/registration/registration3.html',\r\n controller: 'RegistrationPageCtrl3'\r\n })\r\n .state('qqsignup',{\r\n url: '/qqsignup',\r\n title: 'Quick Quiz Sign Up',\r\n templateUrl: 'app/pages/registration/qqsignup-2.html',\r\n controller: 'QQSignupPageCtrl'\r\n })\r\n .state('qqprocess', {\r\n url: '/qqprocess',\r\n title: 'Processing registration...',\r\n templateUrl: 'app/pages/registration/qqprocess.html',\r\n controller: 'QQProcess'\r\n })\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.reports', [])\r\n .controller('ScoreCardCtl', function ($scope, $http,$window, $rootScope) {\r\n $scope.User = $rootScope.User;\r\n $scope.ReportHidden = true;\r\n $http.post('/Execute/Reports.ScoreCardParams', [$scope.User.UserName]).success(function (data) {\r\n $scope.UserList = data.RS_0;\r\n $scope.UserList.unshift({ \"UserId\": \"All\", \"Username\": \"All\", \"DisplayName\": \"All\" });\r\n $scope.SelectedUser = $scope.UserList[0];\r\n $scope.CourseList = data.RS_1;\r\n $scope.CourseList.unshift({ \"Id\": \"-2\", \"Name\": \"All Courses\" });\r\n $scope.CourseList.unshift({ \"Id\": \"-1\", \"Name\": \"All Scores\" });\r\n $scope.SelectedCourse = $scope.CourseList[0];\r\n $scope.DateRange = data.RS_2[0];\r\n $scope.CourseDateRange = data.RS_3[0];\r\n $scope.DateFormat = 'MM/dd/yy';\r\n $scope.MinDate = new Date($scope.DateRange.MinDate);\r\n $scope.MaxDate = new Date();\r\n $scope.StartDate = $scope.MinDate;\r\n $scope.EndDate = $scope.MaxDate;\r\n $scope.HideNullSelector = false;\r\n });\r\n $scope.uploadDone = function (e) {\r\n //console.log(e)\r\n //setTimeout(function () {\r\n $scope.FrameWidth = window.innerWidth;\r\n $scope.Loading = false;\r\n $scope.ReportHidden = false;\r\n if (!$scope.$$phase) {\r\n $scope.$apply();\r\n }\r\n //}, 300);\r\n }\r\n $scope.Execute = function () {\r\n $scope.Loading = true;\r\n var d = new Date()\r\n var n = (d.getTimezoneOffset() / 60);\r\n var f = document.createElement(\"FORM\");\r\n f.setAttribute('method', \"post\");\r\n f.setAttribute('action', \"https://reports.challengercme.com/Export/ScoreCard#zoom=100\");\r\n f.setAttribute('target', \"frame\");\r\n appendFormItem(\"Username\", $scope.User.UserName, f);\r\n appendFormItem(\"UserArray\", $scope.SelectedUser.Username, f);\r\n if ($scope.AllDates == true) {\r\n appendFormItem(\"StartDate\", $scope.MinDate.formatSQL(), f);\r\n appendFormItem(\"EndDate\", $scope.MaxDate.formatSQLEnd(), f);\r\n }\r\n else {\r\n appendFormItem(\"StartDate\", $scope.StartDate.formatSQL(), f);\r\n appendFormItem(\"EndDate\", $scope.EndDate.formatSQLEnd(), f);\r\n }\r\n appendFormItem(\"CourseArray\", $scope.SelectedCourse.Id, f);\r\n appendFormItem(\"tzOffset\", -n, f);\r\n appendFormItem(\"type\", -1, f);\r\n appendFormItem(\"hideNulls\", (($scope.hideNulls == true) ? 1 : 0), f);\r\n document.body.appendChild(f);\r\n f.submit();\r\n }\r\n })\r\n .controller('ComplianceCtl', function ($scope, $http, $window, $rootScope) {\r\n $scope.User = $rootScope.User;\r\n $scope.ReportHidden = true;\r\n $http.post('/Execute/Reports.ScoreCardParams', [$scope.User.UserName]).success(function (data) {\r\n $scope.UserList = data.RS_0;\r\n $scope.UserList.unshift({ \"UserId\": \"All\", \"Username\": \"All\", \"DisplayName\": \"All\" });\r\n $scope.SelectedUser = $scope.UserList[0];\r\n $scope.CourseList = data.RS_1;\r\n $scope.CourseList.unshift({ \"Id\": \"-2\", \"Name\": \"All Courses\" });\r\n $scope.CourseList.unshift({ \"Id\": \"-1\", \"Name\": \"All Scores\" });\r\n $scope.SelectedCourse = $scope.CourseList[0];\r\n $scope.DateRange = data.RS_2[0];\r\n $scope.CourseDateRange = data.RS_3[0];\r\n $scope.DateFormat = 'MM/dd/yy';\r\n $scope.MinDate = new Date($scope.DateRange.MinDate);\r\n $scope.MaxDate = new Date();\r\n $scope.StartDate = $scope.MinDate;\r\n $scope.EndDate = $scope.MaxDate;\r\n $scope.HideNullSelector = false;\r\n });\r\n $scope.uploadDone = function (e) {\r\n //console.log(e)\r\n //setTimeout(function () {\r\n $scope.FrameWidth = window.innerWidth;\r\n $scope.Loading = false;\r\n $scope.ReportHidden = false;\r\n if (!$scope.$$phase) {\r\n $scope.$apply();\r\n }\r\n //}, 300);\r\n }\r\n $scope.Execute = function () {\r\n $scope.Loading = true;\r\n var d = new Date()\r\n var n = (d.getTimezoneOffset() / 60);\r\n var f = document.createElement(\"FORM\");\r\n f.setAttribute('method', \"post\");\r\n f.setAttribute('action', \"/RenderReport/compliance#zoom=100\");\r\n f.setAttribute('target', \"frame\");\r\n appendFormItem(\"InstitutionId\", \"344\", f);\r\n appendFormItem(\"CMETypeId\", \"1\", f);\r\n appendFormItem(\"filter\", \"\", f);\r\n appendFormItem(\"UserArray\", $scope.SelectedUser.Username, f);\r\n if ($scope.AllDates == true) {\r\n appendFormItem(\"StartDate\", $scope.MinDate.formatSQL(), f);\r\n appendFormItem(\"EndDate\", $scope.MaxDate.formatSQLEnd(), f);\r\n }\r\n else {\r\n appendFormItem(\"StartDate\", $scope.StartDate.formatSQL(), f);\r\n appendFormItem(\"EndDate\", $scope.EndDate.formatSQLEnd(), f);\r\n }\r\n appendFormItem(\"CourseArray\", $scope.SelectedCourse.Id, f);\r\n appendFormItem(\"tzOffset\", -n, f);\r\n appendFormItem(\"type\", -1, f);\r\n appendFormItem(\"hideNulls\", (($scope.hideNulls == true) ? 1 : 0), f);\r\n document.body.appendChild(f);\r\n f.submit();\r\n }\r\n })\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n //$stateProvider\r\n //.state('reports', {\r\n // url: '/reports',\r\n // template: '',\r\n // abstract: true,\r\n // title: 'Reports',\r\n // sidebarMeta: {\r\n // icon: 'ion-settings',\r\n // order: 450,\r\n // secure: { Allow: [\"Program Manager\"] }\r\n // },\r\n //})\r\n //.state('reports.scorecard', {\r\n // url: '/scorecard',\r\n // templateUrl: 'app/pages/reports/scorecard.html',\r\n // title: 'Score Card',\r\n // controller: 'ScoreCardCtl',\r\n // sidebarMeta: {\r\n // order: 100\r\n // }\r\n //})\r\n //.state('reports.compliance', {\r\n // url: '/compliance',\r\n // templateUrl: 'app/pages/reports/compliance.html',\r\n // title: 'Compliance',\r\n // controller: 'ComplianceCtl'/*,\r\n // sidebarMeta: {\r\n // order: 110\r\n // }*/\r\n //});\r\n }\r\n\r\n})();\n/**\r\n * @author d.lapoint\r\n * created 12 Sep 2017\r\n */\r\n(function () {\r\n 'use strict';\r\n angular.module('BlurAdmin.pages.search', [])\r\n .config(routeConfig);\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('search', {\r\n url: '/search',\r\n title: 'Search',\r\n templateUrl: '/app/pages/search/search.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n //$scope.SearchQuery = '';\r\n $scope.GoSearch = function() {\r\n if($rootScope.ptflurp.SearchQueryTop.length) {\r\n $location.path('/search/'+$rootScope.ptflurp.SearchQueryTop);\r\n }\r\n\r\n }\r\n }\r\n })\r\n .state('searchresult', {\r\n url: '/search/:Slug',\r\n title: 'Search Results',\r\n templateUrl: '/app/pages/search/searchresult.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n //$scope.flurb = {};\r\n //$scope.flurb.SearchQuery = $stateParams.Slug;\r\n $scope.itemsPerPage = 10;\r\n $scope.CurrentPage = 1;\r\n $scope.customexamsearch = false;\r\n $scope.SearchLabel = $stateParams.Slug;\r\n $rootScope.ptflurp.SearchQueryTop = $scope.SearchLabel;\r\n $scope.CourseArray = $rootScope.CourseIdArray.join();\r\n $scope.SearchWait = true;\r\n $scope.ExecuteSearch = function() {\r\n if($rootScope.ptflurp.SearchQueryTop.length) {\r\n $http.post('/Execute/SearchAllForStringByCourse', [$rootScope.ptflurp.SearchQueryTop, $scope.CourseArray]).success(function(rslt){\r\n var qstns = rslt.RS_0.concat(rslt.RS_1,rslt.RS_2);\r\n $scope.Results = {\r\n 'Questions': qstns,\r\n 'Pages': rslt.RS_3,\r\n 'SubTopics': rslt.RS_4,\r\n 'Topics': rslt.RS_5,\r\n 'Chapters': rslt.RS_6,\r\n 'Courses': rslt.RS_7,\r\n 'QuestionsTotal': qstns.length,\r\n 'PagesTotal': rslt.RS_3.length,\r\n 'SubTopicsTotal': rslt.RS_4.length,\r\n 'TopicsTotal': rslt.RS_5.length,\r\n 'ChaptersTotal': rslt.RS_6.length,\r\n 'CoursesTotal': rslt.RS_7.length,\r\n 'AllTotal': (qstns.length + rslt.RS_3.length + rslt.RS_4.length + rslt.RS_5.length + rslt.RS_6.length + rslt.RS_7.length)\r\n };\r\n /*$scope.Results.Questions = [];\r\n $scope.Results.Questions = rslt.RS_0.concat(rslt.RS_1,rslt.RS_2);\r\n $scope.Results.Pages = rslt.RS_3;\r\n $scope.Results.SubTopics = rslt.RS_4;\r\n $scope.Results.Topics = rslt.RS_5;\r\n $scope.Results.Chapters = rslt.RS_6;\r\n $scope.Results.Courses = rslt.RS_7;\r\n $scope.Results.QuestionsTotal = $scope.Results.Questions.length;\r\n $scope.Results.PagesTotal = $scope.Results.Pages.length;\r\n $scope.Results.SubTopicsTotal = $scope.Results.SubTopics.length;\r\n $scope.Results.TopicsTotal = $scope.Results.Topics.length;\r\n $scope.Results.ChaptersTotal = $scope.Results.Chapters.length;\r\n $scope.Results.CoursesTotal = $scope.Results.Courses.length;\r\n $scope.Results.AllTotal = ($scope.Results.QuestionsTotal + $scope.Results.PagesTotal + $scope.Results.SubTopicsTotal + $scope.Results.TopicsTotal + $scope.Results.ChaptersTotal + $scope.Results.CoursesTotal);\r\n */\r\n $scope.SearchWait = false;\r\n });\r\n }\r\n\r\n }\r\n $scope.GoSearch = function() {\r\n $location.path('/search/'+$rootScope.ptflurp.SearchQueryTop);\r\n }\r\n $scope.ExecuteSearch();\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.tables', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider, $urlRouterProvider) {\r\n $stateProvider\r\n .state('tables', {\r\n url: '/tables',\r\n template : '',\r\n abstract: true,\r\n controller: 'TablesPageCtrl',\r\n title: 'Tables',\r\n sidebarMeta: {\r\n icon: 'ion-grid',\r\n order: 300,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n }).state('tables.basic', {\r\n url: '/basic',\r\n templateUrl: 'app/pages/tables/basic/tables.html',\r\n title: 'Basic Tables',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n }).state('tables.smart', {\r\n url: '/smart',\r\n templateUrl: 'app/pages/tables/smart/tables.html',\r\n title: 'Smart Tables',\r\n sidebarMeta: {\r\n order: 100,\r\n },\r\n });\r\n $urlRouterProvider.when('/tables','/tables/basic');\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author k.danovsky\r\n * created on 12.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui', [\r\n 'BlurAdmin.pages.ui.buttons',\r\n 'BlurAdmin.pages.ui.icons',\r\n 'BlurAdmin.pages.ui.typography',\r\n 'BlurAdmin.pages.ui.modals',\r\n 'BlurAdmin.pages.ui.grid',\r\n 'BlurAdmin.pages.ui.alerts',\r\n 'BlurAdmin.pages.ui.progressBars',\r\n 'BlurAdmin.pages.ui.notifications',\r\n 'BlurAdmin.pages.ui.tabs',\r\n 'BlurAdmin.pages.ui.slider',\r\n 'BlurAdmin.pages.ui.panels',\r\n ])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui', {\r\n url: '/ui',\r\n template: '',\r\n abstract: true,\r\n title: 'UI Features',\r\n sidebarMeta: {\r\n icon: 'ion-android-laptop',\r\n order: 200,\r\n secure: { Allow: [\"Administrators\"] }\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author ninja\r\n * created on 2017.11.22\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.welcome', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('welcome', {\r\n url: '/welcome',\r\n templateUrl: 'app/pages/welcome/welcome.html',\r\n title: 'Welcome To Med-Challenger!',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location, $window, $timeout, toastr) {\r\n $scope.searchObj = $location.search();\r\n if($scope.searchObj.ft){\r\n toastr.success('Your free full trial is now ready.', 'Full Trial Activated', {\r\n \"autoDismiss\": false,\r\n \"positionClass\": \"toast-top-center\",\r\n \"type\": \"success\",\r\n \"timeOut\": \"10000\",\r\n \"extendedTimeOut\": \"2000\",\r\n \"allowHtml\": false,\r\n \"closeButton\": true,\r\n \"tapToDismiss\": true,\r\n \"progressBar\": true,\r\n \"newestOnTop\": true,\r\n \"maxOpened\": 0,\r\n \"preventDuplicates\": false,\r\n \"preventOpenDuplicates\": false\r\n })\r\n } else if($scope.searchObj.cart){\r\n toastr.success('Sending you to your shopping cart...', 'Please Wait', {\r\n \"autoDismiss\": false,\r\n \"positionClass\": \"toast-top-center\",\r\n \"type\": \"success\",\r\n \"timeOut\": \"1000\",\r\n \"extendedTimeOut\": \"1500\",\r\n \"allowHtml\": false,\r\n \"closeButton\": true,\r\n \"tapToDismiss\": true,\r\n \"progressBar\": true,\r\n \"newestOnTop\": true,\r\n \"maxOpened\": 0,\r\n \"preventDuplicates\": false,\r\n \"preventOpenDuplicates\": false\r\n });\r\n $window.location.href = \"/cart\";\r\n }\r\n }\r\n })\r\n .state('help.welcome-new', {\r\n url: '/get-started',\r\n templateUrl: 'app/pages/welcome/welcome-new.html',\r\n title: 'Get Started',\r\n sidebarMeta: { order: 50, secure: {Allow: [\"Learner\"]} },\r\n controller: function ($scope, $rootScope, $http, $cookies, $stateParams, $location, $window, $timeout, toastr) {\r\n if(!$rootScope.User.UserId) {\r\n alert('nouser')\r\n //console.log($rootScope.User)\r\n }\r\n if(filterIt($rootScope.UserRoles,'Program Manager').length) {\r\n $scope.IsProgMgr = true;\r\n } else {\r\n $scope.IsProgMgr = false;\r\n }\r\n if(filterIt($rootScope.UserRoles,'Instructor').length) {\r\n $scope.IsInstructor = true;\r\n } else {\r\n $scope.IsInstructor = false;\r\n }\r\n if(filterIt($rootScope.UserRoles,'Assignee').length) {\r\n $scope.IsAssignee = true;\r\n } else {\r\n $scope.IsAssignee = false;\r\n }\r\n //console.log('a:'+$scope.IsAssignee)\r\n //console.log('i:'+$scope.IsInstructor)\r\n //console.log('p:'+$scope.IsProgMgr)\r\n $scope.searchObj = $location.search();\r\n $scope.fromTrial = ($scope.searchObj.ft || false);\r\n $scope.fromCart = ($scope.searchObj.cart || false);\r\n $scope.hasGroupInterest = ($rootScope.User.Profile.HasAcademicInterest||$rootScope.User.Profile.HasCorporateInterest);\r\n $scope.hasRetailInterest = ($rootScope.User.Profile.HasRetailInterest);\r\n //console.log('HGI:'+$scope.hasGroupInterest+' HRI:'+$scope.hasRetailInterest);\r\n $scope.TrialCourses = [];\r\n $scope.TrialName = '';\r\n if($scope.fromTrial){\r\n toastr.success('Your free full trial is now ready.', 'Full Trial Activated', {\r\n \"autoDismiss\": false,\r\n \"positionClass\": \"toast-top-center\",\r\n \"type\": \"success\",\r\n \"timeOut\": \"10000\",\r\n \"extendedTimeOut\": \"2000\",\r\n \"allowHtml\": false,\r\n \"closeButton\": true,\r\n \"tapToDismiss\": true,\r\n \"progressBar\": true,\r\n \"newestOnTop\": true,\r\n \"maxOpened\": 0,\r\n \"preventDuplicates\": false,\r\n \"preventOpenDuplicates\": false\r\n })\r\n /**\r\n * Enable once proc created:\r\n */\r\n $http.post('/Execute/UAP_GetSubscriptionCourses', [$scope.fromTrial]).success(function (data) {\r\n $scope.TrialCourses = data.RS_0;\r\n });\r\n $http.post('/Execute/GetSubscriptionNameById', [$scope.fromTrial]).success(function (data) {\r\n $scope.TrialName = data.RS_0[0].Name;\r\n });\r\n\r\n } else if($scope.fromCart){\r\n toastr.success('

Thanks for signing up! We saved your cart for you.

Go To Cart

', 'Welcome!', {\r\n \"autoDismiss\": false,\r\n \"positionClass\": \"toast-top-center\",\r\n \"type\": \"success\",\r\n \"timeOut\": \"10000\",\r\n \"extendedTimeOut\": \"2000\",\r\n \"allowHtml\": true,\r\n \"closeButton\": true,\r\n \"tapToDismiss\": true,\r\n \"progressBar\": true,\r\n \"newestOnTop\": true,\r\n \"maxOpened\": 0,\r\n \"preventDuplicates\": false,\r\n \"preventOpenDuplicates\": false\r\n });\r\n $scope.Cart = $cookies.getObject('Cart');\r\n //$window.location.href = \"/cart\";\r\n }\r\n }\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components', []);\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts', [])\r\n .config(routeConfig).config(amChartConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts.amCharts', {\r\n url: '/amCharts',\r\n templateUrl: 'app/pages/charts/amCharts/charts.html',\r\n title: 'amCharts',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n });\r\n }\r\n\r\n function amChartConfig(baConfigProvider) {\r\n var layoutColors = baConfigProvider.colors;\r\n AmCharts.themes.blur = {\r\n\r\n themeName: \"blur\",\r\n\r\n AmChart: {\r\n color: layoutColors.defaultText,\r\n backgroundColor: \"#FFFFFF\"\r\n },\r\n\r\n AmCoordinateChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark]\r\n },\r\n\r\n AmStockChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark]\r\n },\r\n\r\n AmSlicedChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark],\r\n labelTickColor: \"#FFFFFF\",\r\n labelTickAlpha: 0.3\r\n },\r\n\r\n AmRectangularChart: {\r\n zoomOutButtonColor: '#FFFFFF',\r\n zoomOutButtonRollOverAlpha: 0.15,\r\n zoomOutButtonImage: \"lens.png\"\r\n },\r\n\r\n AxisBase: {\r\n axisColor: \"#FFFFFF\",\r\n axisAlpha: 0.3,\r\n gridAlpha: 0.1,\r\n gridColor: \"#FFFFFF\"\r\n },\r\n\r\n ChartScrollbar: {\r\n backgroundColor: \"#FFFFFF\",\r\n backgroundAlpha: 0.12,\r\n graphFillAlpha: 0.5,\r\n graphLineAlpha: 0,\r\n selectedBackgroundColor: \"#FFFFFF\",\r\n selectedBackgroundAlpha: 0.4,\r\n gridAlpha: 0.15\r\n },\r\n\r\n ChartCursor: {\r\n cursorColor: layoutColors.primary,\r\n color: \"#FFFFFF\",\r\n cursorAlpha: 0.5\r\n },\r\n\r\n AmLegend: {\r\n color: \"#FFFFFF\"\r\n },\r\n\r\n AmGraph: {\r\n lineAlpha: 0.9\r\n },\r\n GaugeArrow: {\r\n color: \"#FFFFFF\",\r\n alpha: 0.8,\r\n nailAlpha: 0,\r\n innerRadius: \"40%\",\r\n nailRadius: 15,\r\n startWidth: 15,\r\n borderAlpha: 0.8,\r\n nailBorderAlpha: 0\r\n },\r\n\r\n GaugeAxis: {\r\n tickColor: \"#FFFFFF\",\r\n tickAlpha: 1,\r\n tickLength: 15,\r\n minorTickLength: 8,\r\n axisThickness: 3,\r\n axisColor: '#FFFFFF',\r\n axisAlpha: 1,\r\n bandAlpha: 0.8\r\n },\r\n\r\n TrendLine: {\r\n lineColor: layoutColors.danger,\r\n lineAlpha: 0.8\r\n },\r\n\r\n // ammap\r\n AreasSettings: {\r\n alpha: 0.8,\r\n color: layoutColors.info,\r\n colorSolid: layoutColors.primaryDark,\r\n unlistedAreasAlpha: 0.4,\r\n unlistedAreasColor: \"#FFFFFF\",\r\n outlineColor: \"#FFFFFF\",\r\n outlineAlpha: 0.5,\r\n outlineThickness: 0.5,\r\n rollOverColor: layoutColors.primary,\r\n rollOverOutlineColor: \"#FFFFFF\",\r\n selectedOutlineColor: \"#FFFFFF\",\r\n selectedColor: \"#f15135\",\r\n unlistedAreasOutlineColor: \"#FFFFFF\",\r\n unlistedAreasOutlineAlpha: 0.5\r\n },\r\n\r\n LinesSettings: {\r\n color: \"#FFFFFF\",\r\n alpha: 0.8\r\n },\r\n\r\n ImagesSettings: {\r\n alpha: 0.8,\r\n labelColor: \"#FFFFFF\",\r\n color: \"#FFFFFF\",\r\n labelRollOverColor: layoutColors.primaryDark\r\n },\r\n\r\n ZoomControl: {\r\n buttonFillAlpha: 0.8,\r\n buttonIconColor: layoutColors.defaultText,\r\n buttonRollOverColor: layoutColors.danger,\r\n buttonFillColor: layoutColors.primaryDark,\r\n buttonBorderColor: layoutColors.primaryDark,\r\n buttonBorderAlpha: 0,\r\n buttonCornerRadius: 0,\r\n gridColor: \"#FFFFFF\",\r\n gridBackgroundColor: \"#FFFFFF\",\r\n buttonIconAlpha: 0.6,\r\n gridAlpha: 0.6,\r\n buttonSize: 20\r\n },\r\n\r\n SmallMap: {\r\n mapColor: \"#000000\",\r\n rectangleColor: layoutColors.danger,\r\n backgroundColor: \"#FFFFFF\",\r\n backgroundAlpha: 0.7,\r\n borderThickness: 1,\r\n borderAlpha: 0.8\r\n },\r\n\r\n // the defaults below are set using CSS syntax, you can use any existing css property\r\n // if you don't use Stock chart, you can delete lines below\r\n PeriodSelector: {\r\n color: \"#FFFFFF\"\r\n },\r\n\r\n PeriodButton: {\r\n color: \"#FFFFFF\",\r\n background: \"transparent\",\r\n opacity: 0.7,\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n MozBorderRadius: \"5px\",\r\n borderRadius: \"5px\",\r\n margin: \"1px\",\r\n outline: \"none\",\r\n boxSizing: \"border-box\"\r\n },\r\n\r\n PeriodButtonSelected: {\r\n color: \"#FFFFFF\",\r\n backgroundColor: \"#b9cdf5\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n MozBorderRadius: \"5px\",\r\n borderRadius: \"5px\",\r\n margin: \"1px\",\r\n outline: \"none\",\r\n opacity: 1,\r\n boxSizing: \"border-box\"\r\n },\r\n\r\n PeriodInputField: {\r\n color: \"#FFFFFF\",\r\n background: \"transparent\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n outline: \"none\"\r\n },\r\n\r\n DataSetSelector: {\r\n color: \"#FFFFFF\",\r\n selectedBackgroundColor: \"#b9cdf5\",\r\n rollOverBackgroundColor: \"#a8b0e4\"\r\n },\r\n\r\n DataSetCompareList: {\r\n color: \"#FFFFFF\",\r\n lineHeight: \"100%\",\r\n boxSizing: \"initial\",\r\n webkitBoxSizing: \"initial\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\"\r\n },\r\n\r\n DataSetSelect: {\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n outline: \"none\"\r\n }\r\n\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.assign', [])\r\n .config(routeConfig).config(assignChartConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts.assign', {\r\n url: '/assign',\r\n templateUrl: 'app/pages/charts/assign/assignchart.html',\r\n title: 'Assignment Chart',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n });\r\n }\r\n\r\n function assignChartConfig(baConfigProvider) {\r\n var layoutColors = baConfigProvider.colors;\r\n AmCharts.themes.blur = {\r\n\r\n themeName: \"blur\",\r\n\r\n AmChart: {\r\n color: layoutColors.defaultText,\r\n backgroundColor: \"#FFFFFF\"\r\n },\r\n\r\n AmCoordinateChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark]\r\n },\r\n\r\n AmStockChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark]\r\n },\r\n\r\n AmSlicedChart: {\r\n colors: [layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.primaryDark, layoutColors.warningLight, layoutColors.successDark, layoutColors.successLight, layoutColors.primaryLight, layoutColors.warningDark],\r\n labelTickColor: \"#FFFFFF\",\r\n labelTickAlpha: 0.3\r\n },\r\n\r\n AmRectangularChart: {\r\n zoomOutButtonColor: '#FFFFFF',\r\n zoomOutButtonRollOverAlpha: 0.15,\r\n zoomOutButtonImage: \"lens.png\"\r\n },\r\n\r\n AxisBase: {\r\n axisColor: \"#FFFFFF\",\r\n axisAlpha: 0.3,\r\n gridAlpha: 0.1,\r\n gridColor: \"#FFFFFF\"\r\n },\r\n\r\n ChartScrollbar: {\r\n backgroundColor: \"#FFFFFF\",\r\n backgroundAlpha: 0.12,\r\n graphFillAlpha: 0.5,\r\n graphLineAlpha: 0,\r\n selectedBackgroundColor: \"#FFFFFF\",\r\n selectedBackgroundAlpha: 0.4,\r\n gridAlpha: 0.15\r\n },\r\n\r\n ChartCursor: {\r\n cursorColor: layoutColors.primary,\r\n color: \"#FFFFFF\",\r\n cursorAlpha: 0.5\r\n },\r\n\r\n AmLegend: {\r\n color: \"#FFFFFF\"\r\n },\r\n\r\n AmGraph: {\r\n lineAlpha: 0.9\r\n },\r\n GaugeArrow: {\r\n color: \"#FFFFFF\",\r\n alpha: 0.8,\r\n nailAlpha: 0,\r\n innerRadius: \"40%\",\r\n nailRadius: 15,\r\n startWidth: 15,\r\n borderAlpha: 0.8,\r\n nailBorderAlpha: 0\r\n },\r\n\r\n GaugeAxis: {\r\n tickColor: \"#FFFFFF\",\r\n tickAlpha: 1,\r\n tickLength: 15,\r\n minorTickLength: 8,\r\n axisThickness: 3,\r\n axisColor: '#FFFFFF',\r\n axisAlpha: 1,\r\n bandAlpha: 0.8\r\n },\r\n\r\n TrendLine: {\r\n lineColor: layoutColors.danger,\r\n lineAlpha: 0.8\r\n },\r\n\r\n // ammap\r\n AreasSettings: {\r\n alpha: 0.8,\r\n color: layoutColors.info,\r\n colorSolid: layoutColors.primaryDark,\r\n unlistedAreasAlpha: 0.4,\r\n unlistedAreasColor: \"#FFFFFF\",\r\n outlineColor: \"#FFFFFF\",\r\n outlineAlpha: 0.5,\r\n outlineThickness: 0.5,\r\n rollOverColor: layoutColors.primary,\r\n rollOverOutlineColor: \"#FFFFFF\",\r\n selectedOutlineColor: \"#FFFFFF\",\r\n selectedColor: \"#f15135\",\r\n unlistedAreasOutlineColor: \"#FFFFFF\",\r\n unlistedAreasOutlineAlpha: 0.5\r\n },\r\n\r\n LinesSettings: {\r\n color: \"#FFFFFF\",\r\n alpha: 0.8\r\n },\r\n\r\n ImagesSettings: {\r\n alpha: 0.8,\r\n labelColor: \"#FFFFFF\",\r\n color: \"#FFFFFF\",\r\n labelRollOverColor: layoutColors.primaryDark\r\n },\r\n\r\n ZoomControl: {\r\n buttonFillAlpha: 0.8,\r\n buttonIconColor: layoutColors.defaultText,\r\n buttonRollOverColor: layoutColors.danger,\r\n buttonFillColor: layoutColors.primaryDark,\r\n buttonBorderColor: layoutColors.primaryDark,\r\n buttonBorderAlpha: 0,\r\n buttonCornerRadius: 0,\r\n gridColor: \"#FFFFFF\",\r\n gridBackgroundColor: \"#FFFFFF\",\r\n buttonIconAlpha: 0.6,\r\n gridAlpha: 0.6,\r\n buttonSize: 20\r\n },\r\n\r\n SmallMap: {\r\n mapColor: \"#000000\",\r\n rectangleColor: layoutColors.danger,\r\n backgroundColor: \"#FFFFFF\",\r\n backgroundAlpha: 0.7,\r\n borderThickness: 1,\r\n borderAlpha: 0.8\r\n },\r\n\r\n // the defaults below are set using CSS syntax, you can use any existing css property\r\n // if you don't use Stock chart, you can delete lines below\r\n PeriodSelector: {\r\n color: \"#FFFFFF\"\r\n },\r\n\r\n PeriodButton: {\r\n color: \"#FFFFFF\",\r\n background: \"transparent\",\r\n opacity: 0.7,\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n MozBorderRadius: \"5px\",\r\n borderRadius: \"5px\",\r\n margin: \"1px\",\r\n outline: \"none\",\r\n boxSizing: \"border-box\"\r\n },\r\n\r\n PeriodButtonSelected: {\r\n color: \"#FFFFFF\",\r\n backgroundColor: \"#b9cdf5\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n MozBorderRadius: \"5px\",\r\n borderRadius: \"5px\",\r\n margin: \"1px\",\r\n outline: \"none\",\r\n opacity: 1,\r\n boxSizing: \"border-box\"\r\n },\r\n\r\n PeriodInputField: {\r\n color: \"#FFFFFF\",\r\n background: \"transparent\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n outline: \"none\"\r\n },\r\n\r\n DataSetSelector: {\r\n color: \"#FFFFFF\",\r\n selectedBackgroundColor: \"#b9cdf5\",\r\n rollOverBackgroundColor: \"#a8b0e4\"\r\n },\r\n\r\n DataSetCompareList: {\r\n color: \"#FFFFFF\",\r\n lineHeight: \"100%\",\r\n boxSizing: \"initial\",\r\n webkitBoxSizing: \"initial\",\r\n border: \"1px solid rgba(0, 0, 0, .3)\"\r\n },\r\n\r\n DataSetSelect: {\r\n border: \"1px solid rgba(0, 0, 0, .3)\",\r\n outline: \"none\"\r\n }\r\n\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartJs', [])\r\n .config(routeConfig).config(chartJsConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts.chartJs', {\r\n url: '/chartJs',\r\n templateUrl: 'app/pages/charts/chartJs/chartJs.html',\r\n title: 'Chart.js',\r\n sidebarMeta: {\r\n order: 200,\r\n },\r\n });\r\n }\r\n\r\n function chartJsConfig(ChartJsProvider, baConfigProvider) {\r\n var layoutColors = baConfigProvider.colors;\r\n // Configure all charts\r\n ChartJsProvider.setOptions({\r\n colours: [ layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.default, layoutColors.primaryDark, layoutColors.successDark, layoutColors.warningLight, layoutColors.successLight, layoutColors.primaryLight],\r\n responsive: true,\r\n scaleFontColor: layoutColors.defaultText,\r\n scaleLineColor: layoutColors.border,\r\n pointLabelFontColor: layoutColors.defaultText\r\n });\r\n // Configure all line charts\r\n ChartJsProvider.setOptions('Line', {\r\n datasetFill: false\r\n });\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/17/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartist', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts.chartist', {\r\n url: '/chartist',\r\n templateUrl: 'app/pages/charts/chartist/chartist.html',\r\n title: 'Chartist',\r\n sidebarMeta: {\r\n order: 100,\r\n },\r\n });\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/18/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.morris', [])\r\n .config(routeConfig).config(function(baConfigProvider){\r\n var layoutColors = baConfigProvider.colors;\r\n Morris.Donut.prototype.defaults.backgroundColor = 'transparent';\r\n Morris.Donut.prototype.defaults.labelColor = layoutColors.defaultText;\r\n Morris.Grid.prototype.gridDefaults.gridLineColor = layoutColors.borderDark;\r\n Morris.Grid.prototype.gridDefaults.gridTextColor = layoutColors.defaultText;\r\n });\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('charts.morris', {\r\n url: '/morris',\r\n templateUrl: 'app/pages/charts/morris/morris.html',\r\n title: 'Morris',\r\n sidebarMeta: {\r\n order: 300,\r\n }\r\n });\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider,$urlRouterProvider) {\r\n $stateProvider\r\n .state('components.mail', {\r\n url: '/mail',\r\n templateUrl: 'app/pages/components/mail/mail.html',\r\n controller: \"MailTabCtrl\",\r\n controllerAs: \"tabCtrl\",\r\n title: 'Mail',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n }).state('components.mail.label', {\r\n url: '/:label',\r\n templateUrl: 'app/pages/components/mail/list/mailList.html',\r\n title: 'Mail',\r\n controller: \"MailListCtrl\",\r\n controllerAs: \"listCtrl\"\r\n }).state('components.mail.detail', {\r\n url: '/:label/:id',\r\n templateUrl: 'app/pages/components/mail/detail/mailDetail.html',\r\n title: 'Mail',\r\n controller: \"MailDetailCtrl\",\r\n controllerAs: \"detailCtrl\"\r\n });\r\n $urlRouterProvider.when('/components/mail','/components/mail/inbox');\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 1/12/16\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.timeline', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('components.timeline', {\r\n url: '/timeline',\r\n templateUrl: 'app/pages/components/timeline/timeline.html',\r\n title: 'Timeline',\r\n sidebarMeta: {\r\n icon: 'ion-ios-pulse',\r\n order: 100,\r\n },\r\n });\r\n }\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12.21.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.tree', [])\r\n .config(routeConfig)\r\n .config(function(){\r\n $.jstree.defaults.core.themes.url = true;\r\n $.jstree.defaults.core.themes.dir = \"assets/img/theme/vendor/jstree/dist/themes\";\r\n });\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('components.tree', {\r\n url: '/tree',\r\n templateUrl: 'app/pages/components/tree/tree.html',\r\n title: 'Tree View',\r\n sidebarMeta: {\r\n order: 200,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.alerts', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.alerts', {\r\n url: '/alerts',\r\n templateUrl: 'app/pages/ui/alerts/alerts.html',\r\n title: 'Alerts',\r\n sidebarMeta: {\r\n order: 500,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.buttons', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.buttons', {\r\n url: '/buttons',\r\n templateUrl: 'app/pages/ui/buttons/buttons.html',\r\n controller: 'ButtonPageCtrl',\r\n title: 'Buttons',\r\n sidebarMeta: {\r\n order: 100,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.grid', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.grid', {\r\n url: '/grid',\r\n templateUrl: 'app/pages/ui/grid/grid.html',\r\n title: 'Grid',\r\n sidebarMeta: {\r\n order: 400,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.icons', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.icons', {\r\n url: '/icons',\r\n templateUrl: 'app/pages/ui/icons/icons.html',\r\n controller: 'IconsPageCtrl',\r\n title: 'Icons',\r\n sidebarMeta: {\r\n order: 200,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.modals', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.modals', {\r\n url: '/modals',\r\n templateUrl: 'app/pages/ui/modals/modals.html',\r\n controller: 'ModalsPageCtrl',\r\n title: 'Modals',\r\n sidebarMeta: {\r\n order: 300,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.notifications', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.notifications', {\r\n url: '/notifications',\r\n templateUrl: 'app/pages/ui/notifications/notifications.html',\r\n controller: 'NotificationsPageCtrl',\r\n title: 'Notifications',\r\n sidebarMeta: {\r\n order: 700,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 23.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.panels', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.panels', {\r\n url: '/panels',\r\n templateUrl: 'app/pages/ui/panels/panels.html',\r\n controller: 'NotificationsPageCtrl',\r\n title: 'Panels',\r\n sidebarMeta: {\r\n order: 1100,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.progressBars', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.progressBars', {\r\n url: '/progressBars',\r\n templateUrl: 'app/pages/ui/progressBars/progressBars.html',\r\n title: 'Progress Bars',\r\n sidebarMeta: {\r\n order: 600,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 12/22/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.slider', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.slider', {\r\n url: '/slider',\r\n templateUrl: 'app/pages/ui/slider/slider.html',\r\n title: 'Sliders',\r\n sidebarMeta: {\r\n order: 1000,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 21.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.tabs', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.tabs', {\r\n url: '/tabs',\r\n templateUrl: 'app/pages/ui/tabs/tabs.html',\r\n title: 'Tabs & Accordions',\r\n sidebarMeta: {\r\n order: 800,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.typography', [])\r\n .config(routeConfig);\r\n\r\n /** @ngInject */\r\n function routeConfig($stateProvider) {\r\n $stateProvider\r\n .state('ui.typography', {\r\n url: '/typography',\r\n templateUrl: 'app/pages/ui/typography/typography.html',\r\n title: 'Typography',\r\n sidebarMeta: {\r\n order: 0,\r\n },\r\n });\r\n }\r\n\r\n})();\r\n\n(function (angular) {\r\n 'use strict';\r\n\r\n angular.module('ui.tree-filter', [])\r\n /**\r\n * @ngdoc object\r\n * @name ui.tree-filter.provider:uiTreeFilterSettings\r\n */\r\n .provider('uiTreeFilterSettings', function () {\r\n\r\n var uiTreeFilterSettings = this;\r\n\r\n this.addresses = ['title', 'StatusId'];\r\n this.regexFlags = 'gi';\r\n this.descendantCollection = 'items';\r\n this.status = 'all'\r\n this.$get = function () {\r\n return {\r\n addresses: uiTreeFilterSettings.addresses,\r\n regexFlags: uiTreeFilterSettings.regexFlags,\r\n descendantCollection: uiTreeFilterSettings.descendantCollection,\r\n status: uiTreeFilterSettings.status\r\n };\r\n };\r\n //console.log(uiTreeFilterSettings)\r\n })\r\n /**\r\n * @ngdoc function\r\n * @name ui.tree-filter.factory:uiTreeFilter\r\n */\r\n .filter('uiTreeFilter', [\"uiTreeFilterSettings\", function (uiTreeFilterSettings) {\r\n /**\r\n * Iterates through given collection if flag is not true and sets a flag to true on first match.\r\n *\r\n * @param {Array} collection\r\n * @param {string} pattern\r\n * @param {string} address\r\n *\r\n * @returns {boolean}\r\n */\r\n ////console.log(uiTreeFilterSettings)\r\n function visit(collection, pattern, address, status ) {\r\n collection = collection || [];\r\n var foundSoFar = false;\r\n \r\n collection.forEach(function (collectionItem) {\r\n if (collectionItem.StatusId) {\r\n status = collectionItem.StatusId\r\n }\r\n foundSoFar = foundSoFar || testForField(collectionItem, pattern, address, status);\r\n });\r\n ////console.log('status', status)\r\n return foundSoFar;\r\n } \r\n\r\n /**\r\n * Resolves object value from dot-delimited address.\r\n *\r\n * @param object\r\n * @param path\r\n * @returns {*}\r\n */\r\n function resolveAddress(object, path) {\r\n ////console.log(object, path)\r\n var parts = path.split('.');\r\n\r\n if (object === undefined) {\r\n return;\r\n }\r\n\r\n return parts.length < 2 ? object[parts[0]] : resolveAddress(object[parts[0]], parts.slice(1).join('.'));\r\n }\r\n\r\n /**\r\n * Checks if object or its children matches a pattern on a given field\r\n *\r\n * First it resolves the property address and gets the value.\r\n * If the value is a string it matches it against provided pattern.\r\n * If item matches because its property matches it's children are not checked.\r\n * Otherwise all item descendants are checked as well\r\n *\r\n * @param {Object} item\r\n * @param {string} pattern\r\n * @param {string} address property name or dot-delimited path to property.\r\n *\r\n * @returns {boolean}\r\n */\r\n function testForField(item, pattern, address, status) {\r\n \r\n \r\n var value = resolveAddress(item, address);\r\n var found = typeof value === 'string' ?\r\n !!value.match(new RegExp(pattern, uiTreeFilterSettings.regexFlags)) :\r\n false;\r\n if (status != 'all') {\r\n if (item.HTML) {\r\n if (item.StatusId != status) {\r\n found = false;\r\n }\r\n }\r\n }\r\n return found || visit(item[uiTreeFilterSettings.descendantCollection], pattern, address, status);\r\n }\r\n\r\n /**\r\n * Checks if pattern matches any of addresses\r\n *\r\n * @param {object} item\r\n * @param {string} pattern\r\n *\r\n * @returns {boolean}\r\n */\r\n return function (item, pattern, addresses, status) {\r\n addresses = addresses || uiTreeFilterSettings.addresses;\r\n status = status || uiTreeFilterSettings.status;\r\n ////console.log('address', addresses, 'status', status)\r\n return pattern === undefined || addresses.reduce(function (foundSoFar, fieldName) {\r\n return foundSoFar || testForField(item, pattern, fieldName, status);\r\n }, false);\r\n };\r\n }])\r\n .filter('uiTreeFilterStatus', [\"uiTreeFilterSettings\", function (uiTreeFilterSettings) {\r\n /**\r\n * Iterates through given collection if flag is not true and sets a flag to true on first match.\r\n *\r\n * @param {Array} collection\r\n * @param {string} pattern\r\n * @param {string} address\r\n *\r\n * @returns {boolean}\r\n */\r\n function visit(collection, pattern, address) {\r\n collection = collection || [];\r\n var foundSoFar = false;\r\n var hasDesc = false\r\n collection.forEach(function (collectionItem) {\r\n foundSoFar = foundSoFar || testForField(collectionItem, pattern, address);\r\n });\r\n ////console.log('published', collection)\r\n return foundSoFar;\r\n }\r\n\r\n /**\r\n * Resolves object value from dot-delimited address.\r\n *\r\n * @param object\r\n * @param path\r\n * @returns {*}\r\n */\r\n function resolveAddress(object, path) {\r\n var parts = path.split('.');\r\n\r\n if (object === undefined) {\r\n return;\r\n }\r\n\r\n return parts.length < 2 ? object[parts[0]] : resolveAddress(object[parts[0]], parts.slice(1).join('.'));\r\n }\r\n\r\n /**\r\n * Checks if object or its children matches a pattern on a given field\r\n *\r\n * First it resolves the property address and gets the value.\r\n * If the value is a string it matches it against provided pattern.\r\n * If item matches because its property matches it's children are not checked.\r\n * Otherwise all item descendants are checked as well\r\n *\r\n * @param {Object} item\r\n * @param {string} pattern\r\n * @param {string} address property name or dot-delimited path to property.\r\n *\r\n * @returns {boolean}\r\n */\r\n function testForField(item, pattern, address) {\r\n \r\n var value = resolveAddress(item, address);\r\n \r\n var found = typeof value === 'string' ?\r\n !!value.match(new RegExp(pattern, uiTreeFilterSettings.regexFlags)) :\r\n false;\r\n \r\n \r\n return found || visit(item[uiTreeFilterSettings.descendantCollection], pattern, address);\r\n }\r\n\r\n /**\r\n * Checks if pattern matches any of addresses\r\n *\r\n * @param {object} item\r\n * @param {string} pattern\r\n *\r\n * @returns {boolean}\r\n */\r\n return function (item, pattern, addresses) {\r\n \r\n addresses = addresses || uiTreeFilterSettings.addresses;\r\n return pattern === undefined || addresses.reduce(function (foundSoFar, fieldName) {\r\n ////console.log(address)\r\n return foundSoFar || testForField(item, pattern, fieldName);\r\n }, false);\r\n };\r\n }]);\r\n})(angular);\r\n\r\n'use strict';\r\nfunction intersect_safe(a, b) {\r\n var t;\r\n if (b.length > a.length) t = b, b = a, a = t; // indexOf to loop over shorter\r\n return a.filter(function (e) {\r\n return b.indexOf(e) > -1;\r\n });\r\n}\r\nfunction isJson(str) {\r\n try {\r\n JSON.parse(str);\r\n } catch (e) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction filterIt(arr, searchKey) {\r\n return arr.filter(function(obj) {\r\n return Object.keys(obj).some(function(key) {\r\n return obj[key].includes(searchKey);\r\n })\r\n });\r\n}\r\nfunction isDate(d) {\r\n if (Object.prototype.toString.call(d) === \"[object Date]\") {\r\n if (isNaN(d.valueOf())) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\nfunction formatDateforEmail(dt) {\r\n var date = new Date(dt)\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n var ampm = hours >= 12 ? 'pm' : 'am';\r\n hours = hours % 12;\r\n hours = hours ? hours : 12; // the hour '0' should be '12'\r\n minutes = minutes < 10 ? '0' + minutes : minutes;\r\n var strTime = hours + ':' + minutes + ' ' + ampm;\r\n return date.getMonth() + 1 + \"/\" + date.getDate() + \"/\" + date.getFullYear() + \" \" + strTime;\r\n}\r\nfunction daysBetween(startDate, endDate) {\r\n var millisecondsPerDay = 24 * 60 * 60 * 1000;\r\n return (treatAsUTC(endDate) - treatAsUTC(startDate)) / millisecondsPerDay;\r\n}\r\nfunction treatAsUTC(date) {\r\n var result = new Date(date);\r\n result.setMinutes(result.getMinutes() - result.getTimezoneOffset());\r\n return result;\r\n}\r\nfunction fixrpt(e) {\r\n //console.log(e);\r\n e.width = '100%';\r\n}\r\nfunction appendFormItem(name, val, frm) {\r\n var i = document.createElement(\"input\");\r\n i.setAttribute('type', \"hidden\");\r\n i.setAttribute('name', name);\r\n i.setAttribute('value', val);\r\n frm.appendChild(i);\r\n}\r\nDate.prototype.formatSQL = function () {\r\n var yyyy = this.getFullYear().toString();\r\n var mm = (this.getMonth() + 1).toString();\r\n var dd = this.getDate().toString();\r\n return (mm[1] ? mm : \"0\" + mm[0]) + '-' + (dd[1] ? dd : \"0\" + dd[0]) + '-' + yyyy;\r\n};\r\nDate.prototype.formatSQLEnd = function () {\r\n var yyyy = this.getFullYear().toString();\r\n var mm = (this.getMonth() + 1).toString();\r\n var dd = this.getDate().toString();\r\n return (mm[1] ? mm : \"0\" + mm[0]) + '-' + (dd[1] ? dd : \"0\" + dd[0]) + '-' + yyyy + ' 23:59:59';\r\n};\r\nDate.prototype.formatSQLDateTime = function () {\r\n var hh = this.getHours().toString();\r\n var nn = this.getMinutes().toString();\r\n var ss = this.getSeconds().toString();\r\n var yyyy = this.getFullYear().toString();\r\n var mm = (this.getMonth() + 1).toString();\r\n var dd = this.getDate().toString();\r\n return (mm[1] ? mm : \"0\" + mm[0]) + '-' + (dd[1] ? dd : \"0\" + dd[0]) + '-' + yyyy + ' ' + hh + ':' + nn + ':' + ss;\r\n};\r\nvar CalculateCart = function($scope) {\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n $scope.Cart.PremiumIncluded = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.IncludesPremium == true) {\r\n $scope.Cart.PremiumIncluded = true;\r\n }\r\n });\r\n if ($scope.Cart.PremiumIncluded == true) {\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == 1) {\r\n itm.Price = 0.0;\r\n itm.PriceIncluded = true;\r\n }\r\n\r\n });\r\n }\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n $scope.Cart.TotalPrice += parseFloat(itm.Price);\r\n });\r\n}\r\nfunction pad(num, size) {\r\n var s = num + \"\";\r\n while (s.length < size) s = \"0\" + s;\r\n return s;\r\n}\r\nvar d = new Date()\r\nvar n = d.getTimezoneOffset() * -1;\r\nvar CurrentUserTZoffsett = n / 60;\r\nvar AvailableProducts = [];\r\nvar tinymceOptions = {\r\n extended_valid_elements: \"*[*]\",\r\n valid_elements: \"*[*]\",\r\n height: \"220px\",\r\n handle_event_callback: function (e) {\r\n alert(e);\r\n },\r\n file_browser_callback: function (field_name, url, type, win) {\r\n var querystringtype = '';\r\n if (type == 'image') {\r\n querystringtype = 'Image';\r\n }\r\n if (type == 'media') {\r\n querystringtype = 'Video';\r\n }\r\n var oldurl = url;\r\n tinymce.activeEditor.windowManager.open({\r\n title: 'Image Browser',\r\n file: \"/js/Media/mediabrowser.htm?type=\" + querystringtype + \"&field=\" + field_name + \"&uid=1&url=\" + url,\r\n width: 1000,\r\n height: 600,\r\n resizable: \"yes\",\r\n inline: \"yes\",\r\n close_previous: \"no\"\r\n }, {\r\n submit: function (value) {\r\n win.document.getElementById(field_name).value = value;\r\n },\r\n window: win,\r\n input: field_name,\r\n type: type,\r\n url: url\r\n });\r\n\r\n return true;\r\n },\r\n plugins: [\r\n \"advlist autolink lists link image charmap preview hr anchor pagebreak\",\r\n \"searchreplace wordcount visualblocks visualchars code fullscreen\",\r\n \"insertdatetime media nonbreaking save table contextmenu directionality\",\r\n \"emoticons template paste textcolor print example\"\r\n ],\r\n toolbar1: \"insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image\",\r\n toolbar2: \"print preview media mybutton| forecolor backcolor emoticons example\",\r\n image_advtab: true\r\n}\r\nArray.prototype.move = function (old_index, new_index) {\r\n if (new_index >= this.length) {\r\n var k = new_index - this.length;\r\n while ((k--) + 1) {\r\n this.push(undefined);\r\n }\r\n }\r\n this.splice(new_index, 0, this.splice(old_index, 1)[0]);\r\n return this; // for testing purposes\r\n};\r\nObject.size = function (obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n};\r\nDate.prototype.formatShortLocal = function () {\r\n var newDateObj = new Date(this.getTime() - (this.getTimezoneOffset() * 60000));\r\n return (newDateObj.getMonth() + 1) +\r\n \"/\" + newDateObj.getDate() +\r\n \"/\" + newDateObj.getFullYear()\r\n}\r\nDate.prototype.formatShortZulu = function () {\r\n if (this.getHours() == 0) {\r\n this.setHours(23, 59, 59)\r\n }\r\n var newDateObj = new Date(this.getTime() + (this.getTimezoneOffset() * 60000));\r\n return (newDateObj.getMonth() + 1) +\r\n \"/\" + newDateObj.getDate() +\r\n \"/\" + newDateObj.getFullYear() +\r\n \" \" + (newDateObj.getHours()) + \":\" + newDateObj.getMinutes() + \":\" + newDateObj.getSeconds();\r\n}\r\nfunction clone(obj) {\r\n if (null == obj || \"object\" != typeof obj) return obj;\r\n var copy = obj.constructor();\r\n for (var attr in obj) {\r\n if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];\r\n }\r\n return copy;\r\n}\r\nDate.prototype.addDays = function (days) {\r\n var dat = new Date(this.valueOf());\r\n dat.setDate(dat.getDate() + days);\r\n return dat;\r\n}\r\nvar guid = (function () {\r\n function s4() {\r\n return Math.floor((1 + Math.random()) * 0x10000)\r\n .toString(16)\r\n .substring(1);\r\n }\r\n return function () {\r\n return s4() + s4() + '' + s4() + '' + s4() + '' +\r\n s4() + '' + s4() + s4() + s4();\r\n };\r\n})();\r\nfunction clone(obj) {\r\n if (null == obj || \"object\" != typeof obj) return obj;\r\n var copy = obj.constructor();\r\n for (var attr in obj) {\r\n if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];\r\n }\r\n return copy;\r\n}\r\n\r\n\r\nvar doAsyncLoop = function (array, object, callback, endCallback, currentIndex, to, step) {\r\n ////console.log(currentIndex)\r\n if (step > 0) {\r\n \r\n if (currentIndex > to) {\r\n if (endCallback)\r\n endCallback(null);\r\n return;\r\n }\r\n }\r\n else {\r\n \r\n if (currentIndex < to) {\r\n if (endCallback)\r\n endCallback(null);\r\n return;\r\n }\r\n }\r\n\r\n var item;\r\n if (object) {\r\n item = {\r\n key: array[currentIndex],\r\n value: object[array[currentIndex]]\r\n };\r\n }\r\n else\r\n item = array[currentIndex];\r\n\r\n\r\n ////console.log(item)\r\n callback(item, function (err) {\r\n if (err) {\r\n if (endCallback)\r\n endCallback(err);\r\n return;\r\n }\r\n\r\n \r\n \r\n });\r\n ////console.log([array, object, callback, endCallback, currentIndex + step, to, step]);\r\n doAsyncLoop(array, object, callback, endCallback, currentIndex + step, to, step);\r\n};\r\nvar asyncLoop = function (array) {\r\n var object;\r\n if (!Array.isArray(array)) {\r\n object = array;\r\n array = Object.keys(array);\r\n }\r\n\r\n var callbackPos = 1;\r\n while (callbackPos < 3) {\r\n if (typeof arguments[callbackPos] === 'function')\r\n break;\r\n callbackPos++;\r\n }\r\n\r\n var from = (callbackPos >= 2) ? arguments[1] : 0;\r\n var to = (callbackPos >= 3) ? arguments[2] : ((from >= 0) ? array.length - 1 : 0);\r\n var callback = arguments[callbackPos];\r\n var endCallback = arguments[callbackPos + 1];\r\n\r\n\r\n if (from < 0)\r\n from = array.length + from;\r\n if (to < 0)\r\n to = array.length + to;\r\n var step = (from > to) ? -1 : 1;\r\n ////console.log(callback)\r\n doAsyncLoop(array, object, callback, endCallback, from, to, step);\r\n};\r\nfunction processArray(arr, process) {\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n process(arr[i]);\r\n }\r\n}\r\nfunction getParameterByName(name) {\r\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\r\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\r\n results = regex.exec(location.search);\r\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\r\n}\r\nfunction getQueryVariable(variable) {\r\n var query = window.location.search.substring(1);\r\n var vars = query.split(\"&\");\r\n for (var i = 0; i < vars.length; i++) {\r\n var pair = vars[i].split(\"=\");\r\n if (pair[0] == variable) { return pair[1]; }\r\n }\r\n return (false);\r\n}\r\nfunction replaceAll(find, replace, str) {\r\n if (str) {\r\n return str.replace(new RegExp(find, 'g'), replace);\r\n } else {\r\n return str;\r\n }\r\n}\r\nfunction isNumeric(obj) {\r\n return !jQuery.isArray(obj) && (obj - parseFloat(obj) + 1) >= 0;\r\n}\r\nfunction validateEmail(email) {\r\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(email);\r\n}\r\nfunction ImageLoader(e) {\r\n //console.log(e.target.src);\r\n ////console.log($scope.Stripped);\r\n}\r\n////console.log(picklists)\r\nvar Globals = {\r\n FreeCmeCourses: [\r\n {\r\n CourseName: \"Emergency Medicine Express\",\r\n CourseId: 1284,\r\n FullProductName: \"Med-Challenger Emergency Medicine\",\r\n FullProductId: 2,\r\n FullProductUrl: \"/store/product/2/med-challenger-em-abem-moc-concert-exam-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Family Medicine Express\",\r\n CourseId: 1285,\r\n FullProductName: \"Med-Challenger Family Medicine\",\r\n FullProductId: 63,\r\n FullProductUrl: \"/store/product/63/med-challenger-fm-abfm-board-exam-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Internal Medicine Express\",\r\n CourseId: 1286,\r\n FullProductName: \"Med-Challenger Internal Medicine\",\r\n FullProductId: 41,\r\n FullProductUrl: \"/store/product/41/med-challenger-im-abim-moc-exam-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Nurse Practicioner: Emergency Medicine Express\",\r\n CourseId: 1291,\r\n FullProductName: \"Med-Challenger ENP\",\r\n FullProductId: 86,\r\n FullProductUrl: \"/store/product/86/med-challenger-enp-exam-review-cne-credits\"\r\n },\r\n {\r\n CourseName: \"Nurse Practicioner: Family Medicine Express\",\r\n CourseId: 1290,\r\n FullProductName: \"Med-Challenger NP\",\r\n FullProductId: 85,\r\n FullProductUrl: \"/store/product/85/med-challenger-np-exam-review-cne-credits\"\r\n },\r\n {\r\n CourseName: \"NCLEX Express\",\r\n CourseId: 1293,\r\n FullProductName: \"Med-Challenger NCLEX\",\r\n FullProductId: 72,\r\n FullProductUrl: \"/store/product/72/med-challenger-nclex-nclex-review-cne-credits\"\r\n },\r\n {\r\n CourseName: \"OB/GYN Express\",\r\n CourseId: 1288,\r\n FullProductName: \"Med-Challenger OBGYN\",\r\n FullProductId: 43,\r\n FullProductUrl: \"/store/product/43/med-challenger-obgyn-abog-board-exam-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Pediatric Medicine Express\",\r\n CourseId: 1287,\r\n FullProductName: \"Med-Challenger PEDS\",\r\n FullProductId: 54,\r\n FullProductUrl: \"/store/product/54/med-challenger-peds-abp-moc-exam-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Physician Assistant Express\",\r\n CourseId: 1294,\r\n FullProductName: \"Med-Challenger PA\",\r\n FullProductId: 46,\r\n FullProductUrl: \"/store/product/46/med-challenger-pa-pancepanre-board-review-cme-credits\"\r\n },\r\n {\r\n CourseName: \"Urgent Care Express\",\r\n CourseId: 1289,\r\n FullProductName: \"Med-Challenger Urgent Care\",\r\n FullProductId: 71,\r\n FullProductUrl: \"/store/product/71/med-challenger-urgent-care-knowledge-review-and-cme-credits\"\r\n }\r\n ],\r\n CartTemplate: function() {\r\n return {\r\n \"Items\": [],\r\n \"TotalCount\": 0,\r\n \"TotalPrice\": 0\r\n }\r\n },\r\n RequiredSubscriptions: function() {\r\n return [\r\n {cid:1133,pids:[2, 62, 80]}, // EM\r\n {cid:1152,pids:[63, 62, 81]}, // FM\r\n {cid:1135,pids:[54, 62, 83]}, // PEDS\r\n {cid:1136,pids:[79, 62, 51, 78, 79, 83, 80]}, // PEDS EM\r\n {cid:1147,pids:[43, 62]}, // OBGYN\r\n {cid:1205,pids:[71, 62, 81, 82]}, // Urgent Care\r\n {cid:1138,pids:[46, 62]}, // PA\r\n {cid:1092,pids:[45, 62]}, // PA CAQ\r\n {cid:1252,pids:[85, 62]}, // NP\r\n {cid:1253,pids:[86, 62]}, // ENP\r\n {cid:1251,pids:[41, 82, 62]} // IM\r\n ]\r\n } ,\r\n InstitutionalAdminRoles: [\r\n { Id: 40, Name: \"Instructor\", Selected: false },\r\n { Id: 37, Name: \"Program Manager\", Selected: false },\r\n { Id: 36, Name: \"Assistant\", Selected: false },\r\n { Id: 46, Name: \"Claim CME\", Selected: false },\r\n { Id: 49, Name: \"Author\", Selected: false }\r\n ],\r\n InstitutionalFacultyRoles: [\r\n { Id: 40, Name: \"Instructor\", Selected: false },\r\n { Id: 37, Name: \"Program Manager\", Selected: false },\r\n { Id: 36, Name: \"Assistant\", Selected: false },\r\n { Id: 46, Name: \"Claim CME\", Selected: false },\r\n { Id: 49, Name: \"Author\", Selected: false }\r\n ],\r\n InstitutionalLearnerRoles: [\r\n { Id: 41, Name: \"Assignee\", Selected: false },\r\n { Id: 38, Name: \"Resident\", Selected: false },\r\n { Id: 39, Name: \"Student\", Selected: false },\r\n { Id: 46, Name: \"Claim CME\", Selected: false }\r\n ],\r\n Countries: [\r\n \"United States\", \"Afghanistan\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua and Barbuda\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\",\r\n \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia and Herzegovina\",\r\n \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Territory\", \"British Virgin Islands\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\",\r\n \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos\", \"Colombia\",\r\n \"Comoros\", \"Congo\", \"Cook Islands\", \"Costa Rica\", \"Croatia\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"East Timor\",\r\n \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\",\r\n \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\",\r\n \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard and McDonald Islands\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\",\r\n \"Indonesia\", \"Iran\", \"Iraq\", \"Ireland\", \"Israel\", \"Italy\", \"Ivory Coast\", \"Jamaica\", \"Japan\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Kuwait\", \"Kyrgyzstan\", \"Laos\",\r\n \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macau\", \"Macedonia\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\",\r\n \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"Mexico\", \"Micronesia\", \"Moldova\", \"Monaco\", \"Mongolia\", \"Montserrat\", \"Morocco\",\r\n \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\",\r\n \"Norfolk Island\", \"North Korea\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\",\r\n \"Pitcairn\", \"Poland\", \"Portugal\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"S. Georgia and S. Sandwich Islands\",\r\n \"Saint Kitts and Nevis\", \"Saint Lucia\", \"Saint Vincent and The Grenadines\", \"Samoa\", \"San Marino\", \"Sao Tome and Principe\", \"Saudi Arabia\", \"Senegal\", \"Seychelles\",\r\n \"Sierra Leone\", \"Singapore\", \"Slovakia\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Korea\", \"Soviet Union\", \"Spain\", \"Sri Lanka\", \"St. Helena\",\r\n \"St. Pierre and Miquelon\", \"Sudan\", \"Suriname\", \"Svalbard and Jan Mayen Islands\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syria\", \"Taiwan\", \"Tajikistan\", \"Tanzania\",\r\n \"Thailand\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad and Tobago\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks and Caicos Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\",\r\n \"United Arab Emirates\", \"United Kingdom\", \"Uruguay\", \"US Minor Outlying Islands\", \"US Virgin Islands\", \"Uzbekistan\", \"Vanuatu\", \"Venezuela\",\r\n \"Viet Nam\", \"Wallis and Futuna Islands\", \"Western Sahara\", \"Yemen\", \"Yugoslavia\", \"Zaire\", \"Zambia\", \"Zimbabwe\"\r\n ],\r\n States: [\r\n \"AK\", \"AL\", \"AR\", \"AZ\", \"CA\", \"CO\", \"CT\", \"DC\", \"DE\", \"FL\", \"GA\", \"GU\", \"HI\", \"IA\", \"ID\", \"IL\", \"IN\", \"KS\", \"KY\", \"LA\", \"MA\", \"MD\", \"ME\", \"MH\", \"MI\", \"MN\", \"MO\", \"MS\", \"MT\", \"NC\", \"ND\", \"NE\", \"NH\", \"NJ\", \"NM\", \"NV\", \"NY\", \"OH\", \"OK\", \"OR\", \"PA\", \"PR\", \"PW\", \"RI\", \"SC\", \"SD\", \"TN\", \"TX\", \"UT\", \"VA\", \"VI\", \"VT\", \"WA\", \"WI\", \"WV\", \"WY\"\r\n ],\r\n StatesWithNames: [\r\n {\"AK\":\"Alaska\"},\r\n {\"AL\":\"Alabama\"},\r\n {\"AR\":\"Arkansas\"},\r\n {\"AZ\":\"Arizona\"},\r\n {\"CA\":\"Clifornia\"},\r\n {\"CO\":\"Colorado\"},\r\n {\"CT\":\"Conecticut\"},\r\n {\"DC\":\"District of Columbia\"},\r\n {\"DE\":\"Delaware\"},\r\n {\"FL\":\"Florida\"},\r\n {\"GA\":\"Georgia\"},\r\n {\"GU\":\"Guam\"},\r\n {\"HI\":\"Hawaii\"},\r\n {\"IA\":\"Iowa\"},\r\n {\"ID\":\"Idaho\"},\r\n {\"IL\":\"Illinois\"},\r\n {\"IN\":\"Indiana\"},\r\n {\"KS\":\"Kansas\"},\r\n {\"KY\":\"Kentucky\"},\r\n {\"LA\":\"Louisiana\"},\r\n {\"MA\":\"Massachusetts\"},\r\n {\"MD\":\"Maryland\"},\r\n {\"ME\":\"Maine\"},\r\n {\"MH\":\"Marshall Islands\"},\r\n {\"MI\":\"Michigan\"},\r\n {\"MN\":\"Minnesota\"},\r\n {\"MO\":\"Missouri\"},\r\n {\"MS\":\"Mississippi\"},\r\n {\"MT\":\"Montana\"},\r\n {\"NC\":\"North Carolina\"},\r\n {\"ND\":\"North Dakota\"},\r\n {\"NE\":\"Nebraska\"},\r\n {\"NH\":\"New Hampshire\"},\r\n {\"NJ\":\"New Jersey\"},\r\n {\"NM\":\"New Mexico\"},\r\n {\"NV\":\"Nevada\"},\r\n {\"NY\":\"New York\"},\r\n {\"OH\":\"Ohio\"},\r\n {\"OK\":\"Oklahoma\"},\r\n {\"OR\":\"Oregon\"},\r\n {\"PA\":\"Pennsylvania\"},\r\n {\"PR\":\"Puerto Rico\"},\r\n {\"PW\":\"Palau\"},\r\n {\"RI\":\"Rhode Island\"},\r\n {\"SC\":\"South Carolina\"},\r\n {\"SD\":\"South Dakota\"},\r\n {\"TN\":\"Tennessee\"},\r\n {\"TX\":\"Texas\"},\r\n {\"UT\":\"Utah\"},\r\n {\"VA\":\"Virginia\"},\r\n {\"VI\":\"Virgin Islands (US)\"},\r\n {\"VT\":\"Vermont\"},\r\n {\"WA\":\"Washington\"},\r\n {\"WI\":\"Wisconsin\"},\r\n {\"WV\":\"West Virginia\"},\r\n {\"WY\":\"Wyoming\"}\r\n ],\r\n Specialties: [\r\n {id:\"01u1600000EaMpaAAF|Family Medicine\", title:\"Family Medicine\"},\r\n {id:\"01u1600000EaMpWAAV|Emergency Medicine\", title:\"Emergency Medicine\"},\r\n {id:\"01u1600000EaMpeAAF|Internal Medicine\", title:\"Internal Medicine\"},\r\n {id:\"01u1600000EaMptAAF|Pediatrics\", title:\"Pediatrics\"},\r\n {id:\"01u1600000EaMpqAAF|Pediatric Emergency Medicine\", title:\"Pediatric Emergency Medicine\"},\r\n {id:\"01u1600000EaMpiAAF|Obstetrics and Gynecology\", title:\"Obstetrics and Gynecology\"},\r\n {id:\"01u1600000EaMpwAAF|Sports Medicine\", title:\"Sports Medicine\"},\r\n {id:\"01u1600000EaMpyAAF|Surgery\", title:\"Surgery\"},\r\n {id:\"01u1600000Ejv1jAAB|Urgent Care\", title:\"Urgent Care\"},\r\n {id:\"-|Dermatology\", title:\"Dermatology\"},\r\n {id:\"01u1600000EaMpaAAF| General Practitioner\", title:\"General Practitioner\"},\r\n {id:\"01u1600000EaMpnAAF| Pain Management\", title:\"Pain Management\"},\r\n {id:\"01u1600000EaMplAAF|Physician Assistant\", title:\"Physician Assistant\"},\r\n {id:\"-|Radiology\", title:\"Radiology\"},\r\n {id:\"-|Pathology\", title:\"Pathology\"},\r\n {id:\"01u1600000Ejv1ZAAR|Nursing\", title:\"Nursing\"},\r\n {id:\"01u1600000EaMpzAAF|Medical Student\", title:\"Medical Student\"},\r\n {id:\"-|Other\", title:\"Other\"}\r\n ],\r\n Degrees: [\r\n \"MD\",\r\n \"DO\",\r\n \"PhD\",\r\n \"PA-C\",\r\n \"PA\",\r\n \"RN\",\r\n \"NP\",\r\n \"ARNP\",\r\n \"CRNP\",\r\n \"DNP\",\r\n \"Other\",\r\n \"None\"\r\n ],\r\n DisplayTags: [\r\n { 'Id': '2', 'Name': 'New Products', 'IconPath': '' },\r\n { 'Id': '4', 'Name': 'Featured Item', 'IconPath': '' },\r\n { 'Id': '5', 'Name': 'Emergency Medicine Products', 'IconPath': '' },\r\n { 'Id': '6', 'Name': 'Family Medicine Products', 'IconPath': '' },\r\n { 'Id': '7', 'Name': 'Internal Medicine Products', 'IconPath': '' },\r\n { 'Id': '8', 'Name': 'Pediatrics / PEM Products', 'IconPath': '' },\r\n { 'Id': '9', 'Name': 'OB / GYN Products', 'IconPath': '' },\r\n { 'Id': '10', 'Name': 'Urgent Care Products', 'IconPath': '' },\r\n { 'Id': '11', 'Name': 'Physician Assistant Products', 'IconPath': '' },\r\n { 'Id': '12', 'Name': 'Nursing / RN / PN Products', 'IconPath': '' },\r\n { 'Id': '13', 'Name': 'Nurse Practicioner / NP Products', 'IconPath': '' },\r\n { 'Id': '14', 'Name': 'Medical Student / USMLE Products', 'IconPath': '' },\r\n { 'Id': '15', 'Name': 'Special Purpose / SPEX Products', 'IconPath': '' },\r\n { 'Id': '16', 'Name': 'Initial Certification Exam Review Products', 'IconPath': '' },\r\n { 'Id': '17', 'Name': 'Recertification / MOC Exam Review Products', 'IconPath': '' },\r\n { 'Id': '18', 'Name': 'MOC Activities / LLSA / KSA / Points Products', 'IconPath': '' },\r\n { 'Id': '19', 'Name': 'CME / CE Credit Products', 'IconPath': '' },\r\n { 'Id': '20', 'Name': 'Practical Clinical Skills / ECG / Sounds Products', 'IconPath': '' },\r\n { 'Id': '21', 'Name': 'Professionalism / Legal / Risk Mgmt. Products', 'IconPath': '' },\r\n { 'Id': '22', 'Name': 'HIPAA / OSHA Compliance Products', 'IconPath': '' },\r\n { 'Id': '26', 'Name': 'All Products', 'IconPath': '' },\r\n { 'Id': '27', 'Name': 'Special Offers / On Sale', 'IconPath': ''}\r\n ],\r\n TestingYears: []\r\n}\r\n//console.log(picklists)\r\n Globals.Countries = picklists.Primary__country__c;\r\n\r\nGlobals.StateProvince = picklists.Primary_State__c;\r\nGlobals.Degrees = picklists.Primary_Degree__c;\r\nGlobals.AdditionalDegrees = picklists.Medical_Degree__c;\r\nGlobals.Specialties = picklists.Specialty_1__c;\r\nGlobals.AdditionalSpecialties = picklists.Specialty_2__c;\r\nGlobals.SpecYears = picklists.Spec1_Exam_Year__c;\r\nGlobals.AdditionalSpecYears = picklists.Spec2_Exam_Year__c;\r\nGlobals.ClinicianTypes = picklists.Clinician_Type__c;\r\nGlobals.AcceptableContactMethods = picklists.Acceptable_Contact_Method__c;\r\nGlobals.DemoAcademicNeeds = picklists.Demo_Academic_Needs__c;\r\nGlobals.DemoCorporateNeeds = picklists.Demo_Corporate_Needs__c;\r\nGlobals.DemoPersonalNeeds = picklists.Demo_Personal_Needs__c;\r\nGlobals.Salutations = picklists.Salutation;\r\n\r\n\r\n\r\nvar now = new Date()\r\n\r\nGlobals.TestingYears = [\r\n { Display: now.getFullYear() + ' Spring', Value: now.getFullYear() + ' Spring' },\r\n { Display: now.getFullYear() + ' Summer', Value: now.getFullYear() + ' Summer' },\r\n { Display: now.getFullYear() + ' Fall', Value: now.getFullYear() + ' Fall' },\r\n { Display: now.getFullYear() + ' Winter', Value: now.getFullYear() + ' Winter' }\r\n];\r\nvar i;\r\nvar x;\r\nfor (i = 1; i <= 14; i++) {\r\n for (x = 1; x <= 4; x++) {\r\n if (x = 1) {\r\n Globals.TestingYears.push({ Display: now.getFullYear() + i + ' Spring', Value: now.getFullYear() + i + ' Spring' })\r\n }\r\n if (x = 2) {\r\n Globals.TestingYears.push({ Display: now.getFullYear() + i + ' Summer', Value: now.getFullYear() + i + ' Summer' })\r\n }\r\n if (x = 3) {\r\n Globals.TestingYears.push({ Display: now.getFullYear() + i + ' Fall', Value: now.getFullYear() + i + ' Fall' })\r\n }\r\n if (x = 4) {\r\n Globals.TestingYears.push({ Display: now.getFullYear() + i + ' Winter', Value: now.getFullYear() + i + ' Winter' })\r\n }\r\n }\r\n}\r\n\r\nString.prototype.padLeft = function (l, c) { return Array(l - this.length + 1).join(c || \" \") + this }\r\n\r\nvar app =\r\n angular.module('BlurAdmin', [\r\n 'ngTagsInput',\r\n 'ngFileUpload',\r\n 'ngUpload',\r\n 'ngAnimate',\r\n 'ngCookies',\r\n 'ui.bootstrap',\r\n 'ui.sortable',\r\n 'ui.router',\r\n 'ui.tree',\r\n 'ui.tree-filter',\r\n 'ngTouch',\r\n 'toastr',\r\n 'smart-table',\r\n \"xeditable\",\r\n 'ui.slimscroll',\r\n 'ngJsTree',\r\n 'angular-progress-button-styles',\r\n 'BlurAdmin.theme',\r\n 'BlurAdmin.pages',\r\n 'angularMoment',\r\n 'gantt',\r\n 'gantt.tree',\r\n 'gantt.table',\r\n 'gantt.movable',\r\n 'gantt.tooltips',\r\n 'gantt.groups',\r\n 'angularUtils.directives.dirPagination',\r\n \r\n 'matchMedia',\r\n 'ui.mask',\r\n 'angular-intro'\r\n ]);\r\napp.filter('ccspaces', function(){\r\n return function(numnum,mobile) {\r\n if(mobile){\r\n var spanum = numnum.slice(8,12)+\" \"+\r\n numnum.slice(12,16);\r\n }else{\r\n var spanum = numnum.slice(0,4)+\" \"+\r\n numnum.slice(4,8)+\" \"+\r\n numnum.slice(8,12)+\" \"+\r\n numnum.slice(12,16);\r\n }\r\n\r\n\r\n return spanum.replace(/\\*/gi,\"x\");\r\n }\r\n})\r\napp.filter('getByProperty', function() {\r\n return function(propertyName, propertyValue, collection) {\r\n var i=0, len=collection.length;\r\n for (; i]+>/gm, '') : '';\r\n };\r\n});\r\napp.filter('orderObjectBy', function() {\r\n return function(items, field, reverse) {\r\n var filtered = [];\r\n angular.forEach(items, function(item) {\r\n filtered.push(item);\r\n });\r\n filtered.sort(function (a, b) {\r\n return (a[field] > b[field] ? 1 : -1);\r\n });\r\n if(reverse) filtered.reverse();\r\n return filtered;\r\n };\r\n});\r\napp.factory('Bookmarks', ['$http', function($http) {\r\n var factory = {};\r\n factory.GetAll = function() {\r\n var AllMarksData = {};\r\n $http.get('/BookmarkService').success(function(r){\r\n //console.log('factory.Bookmarks.GetAll.SUCCESS')\r\n AllMarksData.MyMarked = r.RS_0;\r\n AllMarksData.ObjectTypes = [];\r\n AllMarksData.ObjectTypesFull = r.RS_1;\r\n angular.forEach(r.RS_1, function(ot) {\r\n AllMarksData.ObjectTypes[ot.Id] = ot.Name;\r\n });\r\n AllMarksData.MarkTypes = [];\r\n AllMarksData.MarkTypesFull = r.RS_2;\r\n angular.forEach(r.RS_2, function(mt) {\r\n AllMarksData.MarkTypes[mt.Id] = {\"Id\":mt.Id,\"Name\":mt.Name,\"IconClass\":mt.IconClass,\"IconPath\":mt.IconPath};\r\n });\r\n }).error(function(e){\r\n AllMarksData._ERROR = e;\r\n });\r\n return AllMarksData;\r\n }\r\n factory.Delete = function(BookmarkObject) {\r\n console.log(BookmarkObject)\r\n var DeleteData = {};\r\n $http.delete('/BookmarkService/'+BookmarkObject.Id).success(function(r) {\r\n DeleteData._RESPONSE = r;\r\n }).error(function(e){\r\n DeleteData._ERROR=e;\r\n })\r\n return DeleteData;\r\n }\r\n return factory;\r\n}]);\r\napp.factory('Notes', ['$http', function($http) {\r\n var factory = {};\r\n factory.GetAll = function() {\r\n var AllNotesData = {};\r\n $http.get('/NoteService').success(function(r) {\r\n AllNotesData.OwnedNotes = r.RS_0;\r\n /*angular.forEach(AllNotesData.OwnedNotes, function(on){\r\n on.ShareArray = on.ShareArray.split(\",\");\r\n })*/\r\n AllNotesData.LentNotes = r.RS_1;\r\n AllNotesData.ObjectTypes = [];\r\n AllNotesData.ObjectTypesFull = r.RS_2;\r\n angular.forEach(r.RS_2, function(ot) {\r\n AllNotesData.ObjectTypes[ot.Id] = ot.Name;\r\n })\r\n AllNotesData.ShareLevels = [];\r\n AllNotesData.ShareLevelsFull = r.RS_3;\r\n angular.forEach(r.RS_3, function(sl) {\r\n AllNotesData.ShareLevels[sl.Id] = sl.Name;\r\n })\r\n }).error(function(e){\r\n AllNotesData._ERROR=e;\r\n });\r\n return AllNotesData;\r\n }\r\n factory.GetForObject = function(ObjectType,ObjectId) {\r\n\r\n var ObjectNotesData = {};\r\n $http.get('/NoteService/'+ObjectType+'/'+ObjectId).success(function(r) {\r\n console.log('GFO(1)('+ObjectType+')('+ObjectId+')')\r\n ObjectNotesData.OwnedNotes = r.RS_0;\r\n /*angular.forEach(ObjectNotesData.OwnedNotes, function(on){\r\n on.ShareArray = on.ShareArray.split(\",\");\r\n })*/\r\n ObjectNotesData.LentNotes = r.RS_1;\r\n ObjectNotesData.ObjectTypes = [];\r\n angular.forEach(r.RS_2, function(ot) {\r\n ObjectNotesData.ObjectTypes[ot.Id] = ot.Name;\r\n })\r\n ObjectNotesData.ShareLevels = [];\r\n angular.forEach(r.RS_3, function(sl) {\r\n ObjectNotesData.ShareLevels[sl.Id] = sl.Name;\r\n })\r\n }).error(function(e){\r\n ObjectNotesData._ERROR=e;\r\n })\r\n return ObjectNotesData;\r\n }\r\n factory.Touch = function(NoteObject) {\r\n var TouchData = {};\r\n NoteObject.HTML = NoteObject.NewHTML || NoteObject.HTML;\r\n NoteObject.Path = \"isNote\";\r\n delete NoteObject.NewHTML;\r\n delete NoteObject.Editing;\r\n $http.post('/NoteService',NoteObject).success(function(r){\r\n TouchData._RESPONSE = r;\r\n }).error(function(e){\r\n TouchData._ERROR=e;\r\n })\r\n return TouchData;\r\n }\r\n factory.Delete = function(NoteObject) {\r\n var DeleteData = {};\r\n $http.delete('/NoteService/'+NoteObject.Id).success(function(r) {\r\n DeleteData._RESPONSE = r;\r\n }).error(function(e){\r\n DeleteData._ERROR=e;\r\n })\r\n return DeleteData;\r\n }\r\n return factory;\r\n}]);\r\napp.factory('GoogleAdWordsService', function ($window) {\r\n // Conversion labels\r\n var google_conversion_label = {\r\n 'portal-sale': \"uRzNCKKd9mAQw5PQ6AM\"\r\n };\r\n // Basic settings for AdWords Conversion\r\n var googleTrackConversion = function (conversion_label,dollar_amount) {\r\n $window.google_trackConversion({\r\n google_conversion_id: 1024723395,\r\n google_conversion_language: \"en\",\r\n google_conversion_format: \"3\",\r\n google_conversion_color: \"ffffff\",\r\n google_conversion_label: google_conversion_label[conversion_label],\r\n google_conversion_value: dollar_amount || 1.00,\r\n google_conversion_currency: \"USD\",\r\n google_remarketing_only: false\r\n });\r\n };\r\n\r\n return {\r\n sendPortalSaleConversion: function (amt) {\r\n // Trigger register-customer conversion\r\n googleTrackConversion('portal-sale',amt);\r\n }\r\n };\r\n});\r\napp.factory('dataService', [function () {\r\n return {}\r\n}]);\r\napp.factory('regSvc', [function (){\r\n return {}\r\n}]);\r\n\r\napp.factory('Course', function ($http) {\r\n var Course = {};\r\n Course.list = function (username, fn) {\r\n var params = [];\r\n params[0] = username;\r\n $http.post(\"/GetCourses\").success(fn);\r\n };\r\n Course.GetChapters = function ($scope, fn) {\r\n var course = $scope.SelectedCourse;\r\n if ((course.HasExpired == \"False\") && (course.NoAccess == \"False\")) {\r\n $scope.content = \"Loading Courses......\"\r\n if (!$scope.SelectedCourse.CourseChapters) {\r\n //$scope.SelectedCourse.adjust = $scope.mobileMenuKiller;\r\n ////console.log('mmk_1');\r\n ////console.log(\"Loading Courses......\")\r\n $http.get(\"/api/Courses(\" + $scope.SelectedCourse.Id + \"L)/CourseChapters?$expand=Chapter&$orderby=SortOrder\").success(function (data) {\r\n $scope.SelectedCourse.CourseChapters = data.d;\r\n var processed = 0;\r\n\r\n $.each($scope.SelectedCourse.CourseChapters, function (idx, ch) {\r\n //ch.adjust = $scope.mobileMenuKiller;\r\n ////console.log($scope.mobileMenuKiller);\r\n ch.DisplayClass = \"chapter_closed\";\r\n ch.DisplayChildren = false;\r\n var params = [];\r\n params[0] = ch.Chapter.Id;\r\n $http.post(\"/Execute/GetChapterChildren\", params).success(function (data) {\r\n ch.Chapter.ChapterTopics = [];\r\n var topicsprocessed = 0;\r\n $.each(data.RS_0, function (idx, item) {\r\n ch.Chapter.Background = \"itemunselected\";\r\n var INDEX = parseInt(item.SortOrder - 1);\r\n ch.Chapter.ChapterTopics[INDEX] = {}\r\n ch.Chapter.ChapterTopics[INDEX].DisplayClass = ((item.IsAssessment == \"True\") ? \"assessment\" : \"topic_closed\");\r\n ch.Chapter.ChapterTopics[INDEX].DisplayChildren = false;\r\n ch.Chapter.ChapterTopics[INDEX].IsAssessment = item.IsAssessment;\r\n ch.Chapter.ChapterTopics[INDEX].Chapter_Id = ch.Chapter.Id;\r\n ch.Chapter.ChapterTopics[INDEX].Topics_Id = item.Id;\r\n ch.Chapter.ChapterTopics[INDEX].Id = item.Id;\r\n ch.Chapter.ChapterTopics[INDEX].Topic = {};\r\n ch.Chapter.ChapterTopics[INDEX].Topic.Chapter_Id = ch.Chapter.Id;\r\n ch.Chapter.ChapterTopics[INDEX].Topic.__metadata = {};\r\n ch.Chapter.ChapterTopics[INDEX].Topic.__metadata.type = ((item.IsAssessment == \"True\") ? \"Challenger.LMS.Assessment\" : \"Challenger.LMS.Topic\");\r\n ch.Chapter.ChapterTopics[INDEX].Topic.Id = item.Id;\r\n ch.Chapter.ChapterTopics[INDEX].Topic.Name = item.Name;\r\n ch.Chapter.ChapterTopics[INDEX].Topic.Description = item.Description;\r\n ch.Chapter.ChapterTopics[INDEX].Topic.HTML = item.HTML;\r\n topicsprocessed += 1;\r\n //////console.log(data.RS_0.length + \"|\" + topicsprocessed)\r\n //if (data.RS_0.length == topicsprocessed) {\r\n\r\n //}\r\n });\r\n processed += 1;\r\n //////console.log($scope.SelectedCourse.CourseChapters.length + \":\" + processed);\r\n if (fn && $scope.SelectedCourse.CourseChapters.length == processed) {\r\n ////console.log(\"Calling Function.......\");\r\n\r\n setTimeout(fn(), 200);\r\n }\r\n //console.log($scope.SelectedCourse.CourseChapters.Chapter.Topics)\r\n });\r\n });\r\n $scope.content = $scope.SelectedCourse.HTML;\r\n });\r\n }\r\n else {\r\n if (fn) {\r\n fn();\r\n }\r\n }\r\n }\r\n else {\r\n $scope.content = \"Expired\"\r\n }\r\n }\r\n Course.GetSubTopics = function (topic, fn) {\r\n var params = [];\r\n params.push(topic.Id)\r\n if (!topic.TopicSubTopics) {\r\n $http.post(\"/Execute/GetTopicChildren\", params).success(function (data) {\r\n topic.TopicSubTopics = [];\r\n $.each(data.RS_0, function (idx, item) {\r\n var INDEX = parseInt(item.SortOrder - 1);\r\n topic.TopicSubTopics[item.SortOrder - 1] = {}\r\n topic.TopicSubTopics[item.SortOrder - 1].DisplayClass = ((item.IsAssessment == \"True\") ? \"assessment\" : \"subtopic_closed\");\r\n topic.TopicSubTopics[item.SortOrder - 1].DisplayChildren = false;\r\n topic.TopicSubTopics[item.SortOrder - 1].IsAssessment = item.IsAssessment;\r\n topic.TopicSubTopics[item.SortOrder - 1].Topic_Id = topic.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].Chapter_Id = topic.Chapter_Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].ObjectId = item.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic = {};\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.__metadata = {};\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.__metadata.type = \"Challenger.LMS.SubTopic\";\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.Id = item.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.Chapter_Id = topic.Chapter_Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.Name = item.Name;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.Description = item.Description;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.HTML = item.HTML;\r\n //if (topic.Id == 7) { alert(topic.TopicSubTopics[item.SortOrder - 1].Chapter_Id) }\r\n if (item.IsAssessment == \"False\") {\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages = [];\r\n var stparams = [];\r\n stparams.push(item.Id)\r\n $http.post(\"/Execute/GetSubTopicChildren\", stparams).success(function (dta) {\r\n $.each(dta.RS_0, function (i, itm) {\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1] = {}\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].IsAssessment = itm.IsAssessment;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].DisplayClass = ((itm.IsAssessment == \"True\") ? \"assessment\" : \"page\");\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].SubTopic_Id = item.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Topic_Id = topic.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Chapter_Id = topic.Chapter_Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Pages_Id = itm.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page = {};\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.__metadata = {};\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.__metadata.type = \"Challenger.LMS.Page\";\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.Id = itm.Id;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.Name = itm.Name;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.Description = itm.Description;\r\n topic.TopicSubTopics[item.SortOrder - 1].SubTopic.SubTopicPages[itm.SortOrder - 1].Page.HTML = itm.HTML;\r\n if (fn) {\r\n fn()\r\n };\r\n });\r\n });\r\n }\r\n });\r\n });\r\n }\r\n else {\r\n if (fn) {\r\n fn()\r\n };\r\n }\r\n }\r\n return Course;\r\n});\r\napp.factory('User', function ($http) {\r\n var User = {};\r\n User.loaded = false;\r\n User.get = function (username, fn) {\r\n $http.get(\"/api/Users?$filter=Username%20eq%20'\" + username + \"'\").success(fn);\r\n }\r\n User.getById = function (id, fn) {\r\n //console.log(\"/api/Users(\" + id + \")\")\r\n $http.post(\"/Execute/GetUserNameById\", [id]).success(function (u) {\r\n //console.log(u)\r\n $http.post(\"/GetUser\", [u.RS_0[0].Username]).success(function (userdata) {\r\n \r\n $http.post(\"/Execute/GetUserRoleList\", [userdata.UserName]).success(function (data) {\r\n var usr = userdata\r\n usr.Roles = data.RS_0;\r\n usr.IsInstructor = false;\r\n $.each(usr.Roles, function (i, r) {\r\n if (r.RoleID == 40) {\r\n usr.IsInstructor = true;\r\n }\r\n });\r\n //console.log(usr)\r\n fn(userdata);\r\n });\r\n });\r\n });\r\n }\r\n User.getInstitution = function (user, fn) {\r\n $http.get(\"/api/Institutions(\" + user.InstitutionId + \"L)\").success(fn);\r\n }\r\n return User;\r\n});\r\napp.factory('App', function ($http) {\r\n var App = {};\r\n App.SaveContentObject = function (type, id, name, desc, html, fn) {\r\n var url;\r\n var obj = {};\r\n if (id > 0) {\r\n obj.Id = id;\r\n obj.Name = name;\r\n obj.Description = desc;\r\n obj.HTML = html;\r\n switch (type) {\r\n case \"Challenger.LMS.Course\":\r\n url = '/api/Courses(' + id + 'L)';\r\n break;\r\n case \"Challenger.LMS.Chapter\":\r\n url = '/api/Chapters(' + id + 'L)';\r\n break;\r\n case \"Challenger.LMS.Topic\":\r\n url = '/api/Topics(' + id + 'L)';\r\n break;\r\n case \"Challenger.LMS.SubTopic\":\r\n url = '/api/SubTopics(' + id + 'L)';\r\n break;\r\n case \"Challenger.LMS.Page\":\r\n url = '/api/Pages(' + id + 'L)';\r\n break;\r\n case \"Challenger.LMS.Assessment\":\r\n url = '/api/Assessments(' + id + 'L)';\r\n break;\r\n }\r\n if (url) {\r\n $http.put(url, obj).success(fn);\r\n }\r\n else {\r\n alert(type + \" Not Supported\");\r\n }\r\n }\r\n else {\r\n obj.Name = name;\r\n obj.Description = desc;\r\n obj.HTML = html;\r\n switch (type) {\r\n case \"Challenger.LMS.Course\":\r\n url = '/api/Courses';\r\n break;\r\n case \"Challenger.LMS.Chapter\":\r\n url = '/api/Chapters';\r\n break;\r\n case \"Challenger.LMS.Topic\":\r\n url = '/api/Topics';\r\n break;\r\n case \"Challenger.LMS.SubTopic\":\r\n url = '/api/SubTopics';\r\n break;\r\n case \"Challenger.LMS.Page\":\r\n url = '/api/Pages';\r\n break;\r\n case \"Challenger.LMS.Assessment\":\r\n url = '/Execute/AddQuestionPool';\r\n obj = [];\r\n obj[0] = name;\r\n obj[1] = desc;\r\n obj[2] = html;\r\n break;\r\n }\r\n if (url) {\r\n App.Message = JSON.stringify(obj);\r\n $http.post(url, obj).success(fn);\r\n }\r\n else {\r\n alert(type + \" Not Supported\");\r\n }\r\n }\r\n }\r\n return App;\r\n});\r\napp.factory('RecursionHelper', ['$compile', function ($compile) {\r\n return {\r\n /**\r\n * Manually compiles the element, fixing the recursion loop.\r\n * @param element\r\n * @param [link] A post-link function, or an object with function(s) registered via pre and post properties.\r\n * @returns An object containing the linking functions.\r\n */\r\n compile: function (element, link) {\r\n // Normalize the link parameter\r\n if (angular.isFunction(link)) {\r\n link = { post: link };\r\n }\r\n\r\n // Break the recursion loop by removing the contents\r\n var contents = element.contents().remove();\r\n var compiledContents;\r\n return {\r\n pre: (link && link.pre) ? link.pre : null,\r\n /**\r\n * Compiles and re-adds the contents\r\n */\r\n post: function (scope, element) {\r\n // Compile the contents\r\n if (!compiledContents) {\r\n compiledContents = $compile(contents);\r\n }\r\n // Re-add the compiled contents to the element\r\n compiledContents(scope, function (clone) {\r\n element.append(clone);\r\n });\r\n\r\n // Call the post-linking function, if any\r\n if (link && link.post) {\r\n link.post.apply(null, arguments);\r\n }\r\n }\r\n };\r\n }\r\n };\r\n}]);\r\napp.filter(\"jsondate\", function () {\r\n return function (x) {\r\n if (x instanceof Date && !isNaN(x.valueOf())) {\r\n return x\r\n }\r\n else {\r\n if (x && x != null) {\r\n var dt\r\n try {\r\n dt = new Date(parseInt(x.substr(6)));\r\n } catch (e) {\r\n dt = new Date(x);\r\n }\r\n return dt\r\n }\r\n else return null\r\n }\r\n };\r\n});\r\napp.filter('htmlToPlaintext', function() {\r\n return function(text) {\r\n return text ? String(text).replace(/<[^>]+>/gm, '') : '';\r\n };\r\n }\r\n);\r\napp.filter('jsonDate', ['$filter', function ($filter) {\r\n return function (input, format) {\r\n return (input)\r\n ? $filter('date')(parseInt(input.substr(6)), format)\r\n : '';\r\n };\r\n}]);\r\napp.filter('MMMddyyyydatedisplay', function MMMddyyyydatedisplay($filter) {\r\n return function (text) {\r\n if (text == null) { return \"\" }\r\n var tempdate = new Date((text.toString().replace(/-/g, \"/\").split('.')[0]));\r\n return $filter('date')(tempdate, \"MMM dd, yyyy\");\r\n }\r\n\r\n});\r\n;\r\napp.filter('secToDateTime', [function () {\r\n return function (seconds) {\r\n return new Date(1970, 0, 1).setSeconds(seconds);\r\n };\r\n}])\r\napp.filter('secondsToDateTime', [function () {\r\n return function (seconds) {\r\n return new Date(1970, 0, 1).setSeconds(seconds);\r\n };\r\n}])\r\napp.filter('ActiveInstititinalUser', function () {\r\n return function (usr, f) {\r\n var out = [];\r\n ////console.log(usr)\r\n ////console.log(f)\r\n angular.forEach(usr, function (u) {\r\n if (f.IsOn) {\r\n var IsInactive = false;\r\n if (f.Settings) {\r\n if (f.Settings.InactiveClasses) {\r\n angular.forEach(f.Settings.InactiveClasses, function (cn) {\r\n if (u.ClassName == cn) { IsInactive = true; }\r\n if (u.Class == cn) { IsInactive = true }\r\n });\r\n }\r\n }\r\n if (!IsInactive) {\r\n out.push(u);\r\n }\r\n } else {\r\n out.push(u);\r\n }\r\n })\r\n return out;\r\n }\r\n})\r\napp.filter('unique', function () {\r\n\r\n return function (items, filterOn) {\r\n\r\n\r\n if (filterOn === false) {\r\n return items;\r\n }\r\n\r\n if ((filterOn || angular.isUndefined(filterOn)) && angular.isArray(items)) {\r\n var hashCheck = {}, newItems = [];\r\n\r\n var extractValueToCompare = function (item) {\r\n if (angular.isObject(item) && angular.isString(filterOn)) {\r\n return item[filterOn];\r\n } else {\r\n return item;\r\n }\r\n };\r\n\r\n angular.forEach(items, function (item) {\r\n var valueToCheck, isDuplicate = false;\r\n\r\n for (var i = 0; i < newItems.length; i++) {\r\n if (angular.equals(extractValueToCompare(newItems[i]), extractValueToCompare(item))) {\r\n isDuplicate = true;\r\n break;\r\n }\r\n }\r\n if (!isDuplicate) {\r\n newItems.push(item);\r\n }\r\n\r\n });\r\n items = newItems;\r\n }\r\n return items;\r\n };\r\n});\r\nfunction chall_FixAmazonURL() {\r\n return this\r\n .replace(new RegExp('s3-website-us-east-1', 'gi'), 's3')\r\n .replace(new RegExp('http://challmedia', 'gi'), 'https://challmedia')\r\n}\r\nString.prototype.chall_FixAmazonURL = chall_FixAmazonURL;\r\nfunction FormatTimespan(date1, date2) {\r\n var diff = date2.getTime() - date1.getTime();\r\n\r\n var days = Math.floor(diff / (1000 * 60 * 60 * 24));\r\n diff -= days * (1000 * 60 * 60 * 24);\r\n\r\n var hours = Math.floor(diff / (1000 * 60 * 60));\r\n diff -= hours * (1000 * 60 * 60);\r\n\r\n var mins = Math.floor(diff / (1000 * 60));\r\n diff -= mins * (1000 * 60);\r\n\r\n var seconds = Math.floor(diff / (1000));\r\n diff -= seconds * (1000);\r\n if (days > 0) {\r\n return days + \" days, \" + hours + \" hours, \" + mins + \" minutes\"\r\n }\r\n else {\r\n if (hours > 0) {\r\n return hours + \" hours, \" + mins + \" minutes\"\r\n }\r\n else {\r\n if (mins > 0) {\r\n return mins + \" minutes, \" + seconds + \" seconds\"\r\n }\r\n else {\r\n return seconds + \" seconds\"\r\n }\r\n }\r\n }\r\n}\r\napp.config(function (uiTreeFilterSettingsProvider) {\r\n uiTreeFilterSettingsProvider.addresses = ['Name', 'HTML', 'Keywords','Tags.text'];\r\n uiTreeFilterSettingsProvider.descendantCollection = 'nodes'\r\n});\napp.directive('ngEnter', function () {\r\n return function (scope, element, attrs) {\r\n element.bind(\"keydown keypress\", function (event) {\r\n if (event.which === 13) {\r\n scope.$apply(function () {\r\n scope.$eval(attrs.ngEnter);\r\n });\r\n event.preventDefault();\r\n }\r\n });\r\n };\r\n});\r\napp.directive('ngOnload', [function () {\r\n return {\r\n link: function (scope, element, attrs) {\r\n ////console.log(attrs)\r\n element.on('load', attrs['ngOnload'])\r\n }\r\n }\r\n}])\r\napp.directive('ngOnreadystatechange', [function () {\r\n return {\r\n\r\n link: function (scope, element, attrs) {\r\n element.on('readystatechange', attrs['ngOnreadystatechange'])\r\n }\r\n }\r\n}])\r\n\r\napp.directive('compile', ['$compile', function ($compile) {\r\n return function (scope, element, attrs) {\r\n scope.$watch(\r\n function (scope) {\r\n return scope.$eval(attrs.compile);\r\n },\r\n function (value) {\r\n element.html(value);\r\n $compile(element.contents())(scope);\r\n var striphref = document.getElementsByName(\"removehref\");\r\n scope.Stripped = striphref;\r\n angular.forEach(striphref, function (el) {\r\n el.href = \"\";\r\n el.target = \"\";\r\n })\r\n }\r\n );\r\n };\r\n}]);\r\napp.directive('ngBindHtmlUnsafe', function ($compile) {\r\n return function ($scope, $element, $attrs) {\r\n var compile = function (newHTML) {\r\n $element.html('').append(newHTML);\r\n $compile($element.contents())($scope)\r\n };\r\n var htmlName = $attrs.ngBindHtmlUnsafe;\r\n $scope.$watch(htmlName, function (newHTML) {\r\n if (!newHTML) return;\r\n compile(newHTML);\r\n });\r\n };\r\n});\r\napp.directive('childReplies', function($http) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/ChildReplies.html',\r\n scope: {\r\n post: '='\r\n },\r\n controller: function($scope,$http,$location,$rootScope,$compile,$window) {\r\n $scope.NewReply=false;\r\n $scope.children = [];\r\n //$scope.newReplyObj = {};\r\n $scope.CreateReply = function() {\r\n if($scope.NewReply) {\r\n $scope.CancelReply();\r\n }else{\r\n $scope.newReplyObj = {\r\n \"Id\":0,\r\n \"Content\":\"\",\r\n \"GroupArray\":$scope.post.GroupIdsArray,\r\n \"ParentId\":1*$scope.post.Id\r\n }\r\n $scope.NewReply = true;\r\n }\r\n }\r\n $scope.CancelReply = function() {\r\n $scope.NewReply = false;\r\n }\r\n $scope.SaveReply = function() {\r\n //console.log($scope.newReplyObj)\r\n if($scope.newReplyObj.Content.length) {\r\n //console.log($scope.newReplyObj.Content)\r\n //$scope.newReplyObj.Content = $filter('removeHTMLTags')($scope.newReplyObj.Content);\r\n //console.log(SaveContent)\r\n $http.post('/DiscussionGroupService/Post', $scope.newReplyObj).success(function(r){\r\n var result = r.RS_0[0];\r\n if(result.Status==\"Posted\"){\r\n $scope.post.ShowReplies = true;\r\n $scope.LoadReplies();\r\n $scope.NewReply=false;\r\n }\r\n })\r\n }else{\r\n alert(\"No Content\")\r\n }\r\n }\r\n $scope.LoadReplies = function() {\r\n //delete $scope.children;\r\n //$scope.post.ShowReplies = !$scope.post.ShowReplies;\r\n if($scope.post.ShowReplies) {\r\n $http.get(\"/DiscussionGroupService/Replies/\"+$scope.post.GroupIdsArray[0]+\"/\"+$scope.post.Id).success(function(r) {\r\n $scope.children = r.RS_0;\r\n $scope.post.Replies = $scope.children.length;\r\n var x2js = new X2JS();\r\n angular.forEach($scope.children, function (child) {\r\n child.CreatedDateTime = new Date(child.CreatedDateTime+\" UTC\");\r\n child.ShowReplies = false;\r\n child.GroupsJSON = x2js.xml_str2json(child.GroupPostArr);\r\n child.GroupIdsArray = [];\r\n if(Array.isArray(child.GroupsJSON.Groups.Group)) {\r\n child.MultiPost = true;\r\n angular.forEach(child.GroupsJSON.Groups.Group, function(g) {\r\n child.GroupIdsArray.push(g.GroupId)\r\n })\r\n }else{\r\n child.MultiPost = false;\r\n child.GroupIdsArray.push(child.GroupsJSON.Groups.Group.GroupId);\r\n }\r\n });\r\n })\r\n } else {\r\n $scope.children = [];\r\n }\r\n\r\n }\r\n\r\n }\r\n }\r\n})\r\napp.directive('postReplies', function($http) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/PostReplies.html',\r\n scope: {\r\n post: '='\r\n },\r\n controller: function($scope,$http,$location,$rootScope,$compile,$window) {\r\n //debugger;\r\n $scope.children = [];\r\n $scope.NewReply=false;\r\n console.log($scope.NewReply)\r\n //$scope.newReplyObj = {};\r\n $scope.CreateReply = function() {\r\n if($scope.NewReply) {\r\n $scope.CancelReply();\r\n }else{\r\n $scope.newReplyObj = {\r\n \"Id\":0,\r\n \"Content\":\"\",\r\n \"GroupArray\":$scope.post.GroupIdsArray,\r\n \"ParentId\":1*$scope.post.Id\r\n }\r\n $scope.NewReply = true;\r\n }\r\n }\r\n $scope.CancelReply = function() {\r\n $scope.NewReply = false;\r\n }\r\n $scope.SaveReply = function() {\r\n //console.log($scope.newReplyObj)\r\n if($scope.newReplyObj.Content.length) {\r\n //console.log($scope.newReplyObj.Content)\r\n //$scope.newReplyObj.Content = $filter('removeHTMLTags')($scope.newReplyObj.Content);\r\n //console.log(SaveContent)\r\n $http.post('/DiscussionGroupService/Post', $scope.newReplyObj).success(function(r){\r\n var result = r.RS_0[0];\r\n if(result.Status==\"Posted\"){\r\n $scope.post.ShowReplies = true;\r\n $scope.LoadReplies();\r\n $scope.NewReply = false;\r\n }\r\n })\r\n }else{\r\n alert(\"No Content\")\r\n }\r\n }\r\n $scope.LoadReplies = function() {\r\n //$scope.post.ShowReplies = !$scope.post.ShowReplies;\r\n if($scope.post.ShowReplies) {\r\n $http.get(\"/DiscussionGroupService/Replies/\"+$scope.post.GroupIdsArray[0]+\"/\"+$scope.post.Id).success(function(r) {\r\n $scope.children = r.RS_0;\r\n $scope.post.Replies = $scope.children.length;\r\n var x2js = new X2JS();\r\n angular.forEach($scope.children, function (child) {\r\n child.CreatedDateTime = new Date(child.CreatedDateTime+\" UTC\");\r\n child.ShowReplies = false;\r\n child.GroupsJSON = x2js.xml_str2json(child.GroupPostArr);\r\n child.GroupIdsArray = [];\r\n if(Array.isArray(child.GroupsJSON.Groups.Group)) {\r\n child.MultiPost = true;\r\n angular.forEach(child.GroupsJSON.Groups.Group, function(g) {\r\n child.GroupIdsArray.push(g.GroupId)\r\n })\r\n }else{\r\n child.MultiPost = false;\r\n child.GroupIdsArray.push(child.GroupsJSON.Groups.Group.GroupId);\r\n }\r\n });\r\n })\r\n } else {\r\n $scope.children = [];\r\n }\r\n\r\n }\r\n\r\n }\r\n }\r\n})\r\napp.directive('discuss', function ($http) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/AllDiscusions.html',\r\n\r\n controller: function ($scope, $http, $location, $rootScope, $compile, $window) {\r\n $scope.Groups = dgroups;\r\n $scope.textAreaSetup = function ($element) {\r\n $compile($element.contents())($scope);\r\n };\r\n //console.log($rootScope.User)\r\n $scope.Id = 0;\r\n $scope.CreateGroup = true;\r\n $scope.EditGroup = true;\r\n $scope.NewPost = false;\r\n var p = $location.$$path\r\n console.log(p)\r\n if (p.startsWith('/discuss/studygroup') || p.startsWith('/discuss/acceptinvitation')) {\r\n var a = p.split('/')\r\n console.log(a)\r\n $scope.Id = a[3]\r\n if (a.length >= 5) {\r\n if(a[2]=='acceptinvitation') {\r\n $scope.action='accept';\r\n $scope.actref=a[4]\r\n } else if(a[2]=='studygroup') {\r\n $scope.action = a[4]\r\n $scope.actref = a[5]\r\n }\r\n\r\n if ($scope.action == 'accept') {\r\n $http.post(\"/Execute/GetGroupInvitation\", [$scope.actref]).success(function (r) {\r\n console.log(r)\r\n if (r.RS_0.length > 0) {\r\n $scope.Invitation = r.RS_0[0]\r\n $http.post(\"/Execute/GetDiscussionGroupDetail\", [$rootScope.User.UserId, $scope.Id]).success(function (rd) {\r\n $scope.InviteGroupDetail = rd.RS_0[0]\r\n console.log($scope.InviteGroupDetail)\r\n })\r\n }\r\n $scope.Loaded=true\r\n });\r\n }\r\n }\r\n }\r\n $scope.$watch('Id', function (n, o) {\r\n if($scope.Groups && $scope.IsNewPost) {\r\n if(n == 0) {\r\n angular.forEach($scope.Groups, function(g) {\r\n g.Selected = false;\r\n })\r\n }else if(n>0){\r\n angular.forEach($scope.Groups, function(g) {\r\n g.Selected = (g.Id==n)\r\n })\r\n }\r\n }\r\n $scope.LoadPosts(n);\r\n });\r\n $scope.LoadPosts = function(groupId) {\r\n delete $scope.CurGroup;\r\n delete $scope.GroupDetail;\r\n delete $scope.Posts;\r\n delete $scope.GroupRoles;\r\n delete $scope.PendingJoinRequests;\r\n //console.log($scope.Id)\r\n $http.get(\"/DiscussionGroupService/\" + groupId).success(function (p) {\r\n console.log(p)\r\n $scope.Posts = p.RS_0;\r\n var x2js = new X2JS();\r\n angular.forEach($scope.Posts, function (post) {\r\n post.CreatedDateTime = new Date(post.CreatedDateTime+\" UTC\");\r\n post.ShowReplies = false;\r\n post.GroupsJSON = x2js.xml_str2json(post.GroupPostArr);\r\n post.GroupIdsArray = [];\r\n if(Array.isArray(post.GroupsJSON.Groups.Group)) {\r\n post.MultiPost = true;\r\n angular.forEach(post.GroupsJSON.Groups.Group, function(g) {\r\n post.GroupIdsArray.push(g.GroupId)\r\n })\r\n }else{\r\n post.MultiPost = false;\r\n post.GroupIdsArray.push(post.GroupsJSON.Groups.Group.GroupId);\r\n }\r\n });\r\n console.log($scope.Posts)\r\n if ($scope.Id == 0) {\r\n $http.post(\"/Execute/GetUserDiscussionGroups\", [$rootScope.User.UserId]).success(function (r) {\r\n console.log(r)\r\n $scope.MyGroups = r.RS_0;\r\n $scope.AvailableGroups = r.RS_1;\r\n });\r\n } else {\r\n delete $scope.AvailableGroups;\r\n delete $scope.MyGroups;\r\n $http.post(\"/Execute/GetDiscussionGroupDetail\", [$rootScope.User.UserId, groupId]).success(function (rd) {\r\n $scope.GroupDetail = rd.RS_0[0];\r\n console.log($scope.GroupDetail);\r\n if ($scope.GroupDetail.IsAdmin == \"True\") {\r\n $scope.GroupRoles = rd.RS_2;\r\n $scope.PendingJoinRequests = rd.RS_1;\r\n console.log($scope.PendingJoinRequests);\r\n }\r\n\r\n });\r\n }\r\n });\r\n }\r\n $scope.RespondToInvite = function (id,status) {\r\n console.log(id)\r\n var req = { \"Id\": id, \"Status\": status }\r\n $http.post(\"/DiscussionGroupService/RespondToInvitation\", req).success(function (r) {\r\n console.log(r)\r\n delete $scope.action;\r\n $window.location.reload(true);\r\n });\r\n }\r\n $scope.Invite = function (dtl) {\r\n //console.log(dtl)\r\n $scope.Invitations = [{Email:'',RoleId:3,Message:''}];\r\n }\r\n\r\n $scope.InviteMore = function () {\r\n $scope.Invitations.push({ Email: '', RoleId: 3, Message: '' });\r\n }\r\n $scope.RemoveInvite = function (idx) {\r\n $scope.Invitations.splice(idx,1)\r\n }\r\n $scope.SendInvitationtions = function () {\r\n console.log($scope.Invitations)\r\n angular.forEach($scope.Invitations, function (i) {\r\n var comment = ''\r\n if ($scope.InvitationMessage) {\r\n comment = $scope.InvitationMessage;\r\n }\r\n var req = { \"Email\": i.Email, \"GroupId\": $scope.Id,\"RoleId\":i.RoleId, \"Comment\": comment}\r\n $http.post(\"/DiscussionGroupService/SendInvitation\", req).success(function (rsp) {\r\n delete $scope.Invitations;\r\n console.log(rsp)\r\n });\r\n })\r\n }\r\n $scope.CancelInvitationtions = function () {\r\n delete $scope.Invitations;\r\n }\r\n $scope.ApproveUser = function (req) {\r\n console.log(req)\r\n $http.post(\"/DiscussionGroupService/ApproveUser\", req).success(function (d) {\r\n console.log(d)\r\n $http.post(\"/Execute/GetDiscussionGroupDetail\", [$rootScope.User.UserId, $scope.Id]).success(function (rd) {\r\n $scope.GroupDetail = rd.RS_0[0]\r\n console.log($scope.GroupDetail)\r\n if ($scope.GroupDetail.IsAdmin == \"True\") {\r\n $scope.GroupRoles = rd.RS_2\r\n $scope.PendingJoinRequests = rd.RS_1\r\n console.log($scope.PendingJoinRequests)\r\n }\r\n\r\n });\r\n });\r\n }\r\n $scope.RejectUser = function (req) {\r\n console.log(req)\r\n swal({\r\n title: \"Reject Request\",\r\n text: \"Reason\",\r\n type: \"input\",\r\n showCancelButton: true,\r\n closeOnConfirm: true,\r\n showLoaderOnConfirm: false,\r\n animation: \"slide-from-top\",\r\n inputPlaceholder: \"\"\r\n },\r\n function (inputValue) {\r\n console.log(inputValue);\r\n console.log(typeof inputValue)\r\n if (inputValue !== false) {\r\n if (inputValue.length > 0) {\r\n req.RejectReason = inputValue;\r\n }\r\n console.log(req)\r\n $http.post(\"/DiscussionGroupService/RejectUser\", req).success(function (d) {\r\n console.log(d)\r\n $http.post(\"/Execute/GetDiscussionGroupDetail\", [$rootScope.User.UserId, $scope.Id]).success(function (rd) {\r\n $scope.GroupDetail = rd.RS_0[0]\r\n console.log($scope.GroupDetail)\r\n if ($scope.GroupDetail.IsAdmin == \"True\") {\r\n $scope.GroupRoles = rd.RS_2\r\n $scope.PendingJoinRequests = rd.RS_1\r\n console.log($scope.PendingJoinRequests)\r\n }\r\n\r\n });\r\n });\r\n }\r\n });\r\n\r\n }\r\n\r\n $scope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {\r\n if (toState.name.startsWith('discuss')) {\r\n var a = toState.name.split('.')\r\n if (a.length > 1) {\r\n $scope.Id = a[a.length - 1]\r\n } else {\r\n $scope.Id = 0;\r\n }\r\n }\r\n });\r\n $scope.JoinGroup = function (grp) {\r\n //console.log(grp);\r\n if (grp.ApprovalRequired == \"True\") {\r\n swal({\r\n title: \"Message for Admin\",\r\n text: \"Enter your pleading below\",\r\n type: \"input\",\r\n showCancelButton: true,\r\n closeOnConfirm: true,\r\n showLoaderOnConfirm: false,\r\n animation: \"slide-from-top\",\r\n inputPlaceholder: \"\"\r\n },\r\n function (inputValue) {\r\n if (inputValue != false) {\r\n var req = { \"GroupId\": grp.Id, \"Message\": inputValue }\r\n $http.post(\"/DiscussionGroupService/Join\", req).success(function (r) {\r\n console.log(r)\r\n $window.location.reload();\r\n });\r\n }\r\n });\r\n } else {\r\n var req = { \"GroupId\": grp.Id }\r\n $http.post(\"/DiscussionGroupService/Join\", req).success(function (r) {\r\n console.log(r)\r\n $window.location.reload();\r\n });\r\n }\r\n }\r\n $scope.NewGroup = function () {\r\n $scope.CreateGroup = true;\r\n $scope.CurGroup = {\"Id\":0,\r\n \"Name\": \"\", \"Description\": \"\", \"IsPublic\": false, \"RequireReview\": false,\"ApprovalRequired\":false, \"IconImage\": \"\",\r\n \"MembershipScheme\": 0, \"InstitutionId\": $rootScope.User.InstitutionId, \"MembershipScheme\":0}\r\n }\r\n $scope.CancelGroup = function () {\r\n delete $scope.CurGroup;\r\n }\r\n $scope.SaveGroup = function () {\r\n console.log($scope.CurGroup);\r\n if ($scope.CurGroup.Name.length > 0) {\r\n $http.post(\"/DiscussionGroupService/Group\", $scope.CurGroup).success(function (r) {\r\n console.log(r)\r\n $window.location.reload();\r\n });\r\n } else {\r\n alert(\"Name is Required\")\r\n }\r\n \r\n }\r\n $scope.ClickGroupChk = function (g) {\r\n if (g.Id == 0) {\r\n if (g.Selected) {\r\n angular.forEach($scope.Groups, function (grp) {\r\n grp.Selected = true;\r\n });\r\n } else {\r\n angular.forEach($scope.Groups, function (grp) {\r\n grp.Selected = false;\r\n });\r\n }\r\n }else if(jQuery.grep($scope.Groups, function(grp) {\r\n return (grp.Id==0 && grp.Selected==true)\r\n }).length) {\r\n if(!g.Selected) {\r\n angular.forEach($scope.Groups, function(grp) {\r\n if(grp.Id==0) {\r\n grp.Selected = false;\r\n }\r\n })\r\n }\r\n }else if(jQuery.grep($scope.Groups, function(grp) {\r\n return (grp.Id == 0 && grp.Selected == false)\r\n }).length) {\r\n var checkZero = true;\r\n angular.forEach($scope.Groups, function(grp) {\r\n if(grp.Id>0&&grp.Selected==false) {\r\n checkZero = false;\r\n }\r\n });\r\n if(checkZero){\r\n angular.forEach($scope.Groups, function(grp) {\r\n if(grp.Id==0) {\r\n grp.Selected = true;\r\n }\r\n })\r\n }\r\n console.log(checkZero)\r\n }\r\n console.log(g)\r\n }\r\n $scope.NewPost = function () {\r\n $scope.Groups = [{ \"Id\": 0, \"Name\": \"All Groups\", \"Selected\": false }]\r\n //$scope.Groups = []\r\n angular.forEach(dgroups, function (g) {\r\n $scope.Groups.push({ \"Id\": g.Id, \"Name\": g.Name, \"Selected\": ($scope.Id == g.Id) })\r\n })\r\n $scope.IsNewPost = true;\r\n $scope.CurPost = {\r\n \"Id\": 0,\r\n \"Content\": \"\", \"GroupArray\": []\r\n }\r\n //console.log($scope.NewPost)\r\n }\r\n $scope.CancelPost = function () {\r\n delete $scope.CurPost;\r\n $scope.IsNewPost = false;\r\n $scope.EditingPost = false;\r\n }\r\n $scope.SavePost = function () {\r\n console.log($scope.CurPost);\r\n if ($scope.CurPost.Content.length > 0) {\r\n if($scope.EditingPost!=true) {\r\n $scope.CurPost.GroupArray = [];\r\n angular.forEach($scope.Groups, function (g) {\r\n if (g.Selected) {\r\n $scope.CurPost.GroupArray.push(g.Id);\r\n }\r\n\r\n })\r\n }\r\n\r\n $http.post(\"/DiscussionGroupService/Post\", $scope.CurPost).success(function (r) {\r\n console.log(r)\r\n $scope.LoadPosts($scope.Id);\r\n delete $scope.CurPost\r\n $scope.IsNewPost = false;\r\n $scope.EditingPost = false;\r\n $scope.$apply();\r\n /* $http.get(\"/DiscussionGroupService/\" + $scope.Id).success(function (p) {\r\n console.log(p)\r\n $scope.Posts = p.RS_0\r\n delete $scope.CurPost\r\n $scope.IsNewPost = false;\r\n $scope.$apply();\r\n console.log(p)\r\n }); */\r\n });\r\n } else {\r\n alert(\"No Content\")\r\n }\r\n }\r\n $scope.EditPost = function(post) {\r\n $scope.EditingPost=true;\r\n $scope.CurPost = {\r\n \"Id\" : post.Id,\r\n \"Content\" : post.Content,\r\n \"GroupArray\" : post.GroupIdsArray\r\n }\r\n $window.scrollTo(0, 0);\r\n }\r\n $scope.DeletePost = function(post) {\r\n swal({\r\n title: \"Are you sure?\",\r\n text: \"The post and all of its replies will be removed permanently.\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonColor: \"#F00\",\r\n confirmButtonText: \"Delete Post\",\r\n closeOnConfirm: true\r\n },\r\n function(){\r\n $http.post(\"/DiscussionGroupService/Post\", {Id:post.Id,Content:\"\",GroupArray:[]}).success(function (r) {\r\n swal({\r\n title: \"Success\",\r\n text: \"Post deleted\",\r\n type: \"success\"\r\n },\r\n function(){\r\n $scope.EditingPost = false;\r\n $scope.LoadPosts($scope.Id);\r\n $scope.$apply();\r\n });\r\n });\r\n })\r\n }\r\n // // // //\r\n }\r\n }\r\n})\r\napp.directive('quickNav', function($window) {\r\n var qnTpl = '
\\n' +\r\n '
\\n' +\r\n ' QuickNav:\\n' +\r\n ' \\n' +\r\n ' Dashboard\\n' +\r\n ' \\n' +\r\n ' Study\\n' +\r\n ' \\n' +\r\n ' \\n' +\r\n ' \\n' +\r\n ' CME\\n' +\r\n '
    \\n' +\r\n '
  • Earn
  • \\n' +\r\n '
  • Claim
  • \\n' +\r\n '
  • Find
  • \\n' +\r\n '
\\n' +\r\n '
\\n' +\r\n '
\\n' +\r\n ' \\n' +\r\n ' My Assets\\n' +\r\n ' Score Log\\n' +\r\n ' \\n' +\r\n '
\\n' +\r\n '
\\n';\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n template: qnTpl,\r\n scope: {\r\n showTitle: '='\r\n },\r\n controller: function($scope){\r\n $scope.showTitle = ($scope.showTitle == true ? true:false);\r\n }\r\n }\r\n})\r\n//-- TODO: Complete challcordion directive --// app.directive('challcordion');\r\napp.directive('percentBar', function(){\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/percentBar.html',\r\n scope: {\r\n currentValue: '=',\r\n maxValue: '='\r\n },\r\n controller: function($scope) {\r\n $scope.current = $scope.currentValue;\r\n $scope.max = $scope.maxValue;\r\n console.table($scope)\r\n $scope.percent = 0.0;\r\n if(!isNaN($scope.current) && !isNaN($scope.max)) {\r\n $scope.percent = ($scope.current/$scope.max*100);\r\n }\r\n }\r\n }\r\n})\r\napp.directive('noteWidget', function($http) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/NoteWidget.html',\r\n scope: {\r\n objectType: '=',\r\n objectId: '=',\r\n btnClass: '=',\r\n widgetClass: '=',\r\n noteFormStyle: '='\r\n },\r\n controller: function($scope,$http,$location) {\r\n if(!$scope.noteFormStyle) {\r\n $scope.noteFormStyle = {};\r\n }\r\n $scope.ShowNotes = false;\r\n var objectTypeTranslated;\r\n if($scope.objectType==false){\r\n objectTypeTranslated=1;\r\n }\r\n else if($scope.objectType==true){\r\n objectTypeTranslated=2;\r\n } else {\r\n objectTypeTranslated=$scope.objectType;\r\n }\r\n $scope.ownedNotes = [];\r\n $scope.lentNotes = [];\r\n $http.get('/NoteService/'+objectTypeTranslated+'/'+$scope.objectId).success(function(r) {\r\n //console.log(r)\r\n $scope.ownedNotes = r.RS_0;\r\n $scope.lentNotes = r.RS_1;\r\n })\r\n\r\n $scope.Bookmarked = false;\r\n $scope.NeedInfoed = false;\r\n $scope.Issued = false;\r\n $http.get('/BookMarkService/'+objectTypeTranslated+'/'+$scope.objectId).success(function(r) {\r\n // Maybe one day make this more elegant.. but for now it's simple and it works\r\n var Bookmarks = r.RS_0.filter(function(bms,i){\r\n return (bms.IconId == \"4\");\r\n });\r\n var NeedInfos = r.RS_0.filter(function(bms,i){\r\n return (bms.IconId == \"2\");\r\n });\r\n var Issues = r.RS_0.filter(function(bms,i){\r\n return (bms.IconId == \"3\");\r\n });\r\n if(Bookmarks.length){\r\n $scope.Bookmarked = Bookmarks[0];\r\n }\r\n if(NeedInfos.length){\r\n $scope.NeedInfoed = NeedInfos[0];\r\n }\r\n if(Issues.length){\r\n $scope.Issued = Issues[0];\r\n }\r\n })\r\n $scope.DoBookmark = function(BMType) {\r\n //console.log($scope)\r\n switch(BMType) {\r\n case 4: //Regular BM\r\n if(!$scope.Bookmarked){\r\n $http.post('/BookmarkService', {\r\n \"ObjectType\":objectTypeTranslated.toString(),\r\n \"ObjectId\":$scope.objectId.toString(),\r\n \"IconId\":\"4\",\r\n \"Path\":$location.url()}).success(function(r){\r\n $scope.Bookmarked = r;\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }else{\r\n $http.delete('/BookmarkService/'+$scope.Bookmarked.Id).success(function(r) {\r\n if(r==1){\r\n $scope.Bookmarked = false;\r\n }else{\r\n alert('De-bookmarking unsuccessful :( Sorry about that, please contact support.')\r\n }\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }\r\n break;\r\n case 2: // Need info BM\r\n if(!$scope.NeedInfoed){\r\n $http.post('/BookmarkService', {\"ObjectType\":objectTypeTranslated.toString(),\"ObjectId\":$scope.objectId.toString(),\"IconId\":\"2\",\"Path\":$location.url()}).success(function(r){\r\n $scope.NeedInfoed = r;\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }else{\r\n $http.delete('/BookmarkService/'+$scope.NeedInfoed.Id).success(function(r) {\r\n if(r==1){\r\n $scope.NeedInfoed = false;\r\n }else{\r\n alert('De-bookmarking unsuccessful :( Sorry about that, please contact support, as you should never be seeing this message.')\r\n }\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }\r\n break;\r\n case 3: // WTF BM\r\n if(!$scope.Issued){\r\n $http.post('/BookmarkService', {\"ObjectType\":objectTypeTranslated.toString(),\"ObjectId\":$scope.objectId.toString(),\"IconId\":\"3\",\"Path\":$location.url()}).success(function(r){\r\n $scope.Issued = r;\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }else{\r\n $http.delete('/BookmarkService/'+$scope.Issued.Id).success(function(r) {\r\n if(r==1){\r\n $scope.Issued = false;\r\n }else{\r\n alert('De-bookmarking unsuccessful :( Sorry about that, please contact support, as you should never be seeing this message.')\r\n }\r\n return r;\r\n }).error(function(e){\r\n return e;\r\n })\r\n }\r\n }\r\n\r\n }\r\n $scope.ToggleNotes = function() {\r\n $scope.ShowNotes = !$scope.ShowNotes;\r\n }\r\n $scope.ShowNewNote = false;\r\n $scope.NewNoteHTML = \"\";\r\n $scope.newNote = function() {\r\n $scope.ShowNewNote = true;\r\n }\r\n $scope.cancelNewNote = function() {\r\n $scope.ShowNewNote = false;\r\n }\r\n $scope.CreateNote = function(no) {\r\n var createResult;\r\n var Note = {\r\n \"HTML\":no,\r\n \"ShareLevel\":\"1\",\r\n \"Path\":$location.url(),\r\n \"ObjectType\":objectTypeTranslated,\r\n \"ObjectId\":$scope.objectId,\r\n \"ShareArray\":\"\"\r\n };\r\n $http.post(\r\n '/NoteService',\r\n Note\r\n ).success(function(r){\r\n createResult = r;\r\n $scope.ShowNewNote=false;\r\n $scope.ownedNotes.push(r)\r\n }).error(function(e){\r\n createResult = {\r\n \"_ERROR\":e\r\n }\r\n console.log(e)\r\n })\r\n return createResult;\r\n }\r\n }\r\n }\r\n})\r\napp.directive('inlineEdit', function($timeout) {\r\n return {\r\n scope: {\r\n model: '=inlineEdit',\r\n handleSave: '&onSave',\r\n handleCancel: '&onCancel'\r\n },\r\n link: function(scope, elm, attr) {\r\n var previousValue;\r\n\r\n scope.edit = function() {\r\n scope.editMode = true;\r\n previousValue = scope.model;\r\n\r\n $timeout(function() {\r\n elm.find('input')[0].focus();\r\n }, 0, false);\r\n };\r\n scope.save = function() {\r\n scope.editMode = false;\r\n scope.handleCancel({value: scope.model});\r\n };\r\n scope.cancel = function() {\r\n scope.editMode = false;\r\n scope.model = previousValue;\r\n scope.handleCancel({value: scope.model});\r\n };\r\n },\r\n templateUrl: '/app/tpls/inline-edit.html'\r\n };\r\n});\r\napp.directive('product', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/Product.htm',\r\n scope: {\r\n id: '=',\r\n slug: '='\r\n },\r\n controller: function ($scope, $http, $cookies, $cookieStore, dataService, $rootScope, $state, $window, $location, $filter) {\r\n //////console.log($scope.id)\r\n //alert($scope.slug)\r\n /*if($scope.slug=='dacselmod'){\r\n swal(\"Selections Required\", \"This product has some options that you'll need to select before we can add it to your cart.\", \"info\");\r\n }*/\r\n $scope.ShowPage = false;\r\n $scope.User = $rootScope.User;\r\n $scope.Cart = $cookies.getObject('Cart');\r\n $scope.$watch('Cart', function (cart) {\r\n $cookies.putObject('Cart', cart, {'domain':'challengercme.com'});\r\n dataService.Cart = cart;\r\n $scope.$broadcast('CartChanged', cart);\r\n });\r\n $rootScope.$on('CartChanged', function (event, data) {\r\n $scope.Cart = data;\r\n if ($scope.Product) {\r\n $scope.Product.IsInCart = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == $scope.Product.Id) {\r\n $scope.Product.IsInCart = true;\r\n }\r\n });\r\n }\r\n });\r\n $scope.$on('CheckOut', function (event, data) {\r\n $scope.CheckOut = data;\r\n });\r\n if (!$scope.Cart || typeof ($scope.Cart) === \"undefined\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n }\r\n $scope.UndoCheckout = function () {\r\n $scope.CheckOut = false;\r\n $scope.SignIn = false;\r\n $scope.$broadcast('CheckOut', $scope.CheckOut);\r\n }\r\n $scope.CalculateCart = function () {\r\n //console.log(\"CalculateCart\")\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n $scope.Cart.PremiumIncluded = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.IncludesPremium == true) {\r\n $scope.Cart.PremiumIncluded = true;\r\n }\r\n });\r\n if ($scope.Cart.PremiumIncluded == true) {\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == 1) {\r\n ////////console.log(itm)\r\n itm.Price = 0.0;\r\n itm.PriceIncluded = true;\r\n }\r\n });\r\n }\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n $scope.Cart.TotalPrice += parseFloat(itm.Price);\r\n });\r\n $rootScope.$broadcast('CartChanged',$scope.Cart)\r\n }\r\n /*$scope.AddProductsToCart = function (ids, couponcode) {\r\n if ($scope.User.UserName) {\r\n angular.forEach(ids, function (id) {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == id) {\r\n $scope.AddToCart(prd);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n $scope.AddToCart = function (product) {\r\n if ($scope.User.UserName) {\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.IncludesPremium = product.IncludesPremium;\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n product.IsInCart = true;\r\n }\r\n $scope.CalculateCart();\r\n $cookieStore.put('Cart', $scope.Cart);\r\n $scope.$broadcast('CartChanged', $scope.Cart);\r\n } else {\r\n $scope.SignIn = true;\r\n $scope.$broadcast('pendingProduct', product);\r\n }\r\n }*/\r\n\r\n $scope.AddProductsToCart = function (ids, couponcode) {\r\n if ($scope.User.Username) {\r\n angular.forEach(ids, function (id) {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == id) {\r\n $scope.AddToCart(prd);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n $scope.UpdateProductPrice = function(){\r\n var price = $scope.Product.OriginalPrice;\r\n angular.forEach($scope.Product.Modifiers, function(mod){\r\n var selOpt = jQuery.grep(mod.Options, function(o){\r\n return o.Id == mod.SelectedOption;\r\n })\r\n price = (1*price + 1*selOpt[0].Value);\r\n })\r\n $scope.Product.Price = price;\r\n }\r\n $scope.BeforeAddToCart = function(product) {\r\n console.table({\r\n \"ProductId\":product.Id,\r\n \"UserIsPremium\":$rootScope.User.IsPremium\r\n });\r\n if($rootScope.User.IsPremium && product.Id == \"1\") {\r\n var currentRenewDate = $filter('date')($rootScope.User.PremiumInfo.ExpiryDate,'mediumDate');\r\n var newRenewDate = new Date($rootScope.User.PremiumInfo.ExpiryDate);\r\n newRenewDate.setFullYear(newRenewDate.getFullYear() + 1);\r\n var formattedNewRenewDate = $filter('date')(newRenewDate, 'mediumDate');\r\n console.table({\r\n \"Current Renew Date\":currentRenewDate,\r\n \"New Renew Date\":formattedNewRenewDate\r\n })\r\n swal(\r\n {\r\n title: \"Are you sure?\",\r\n text: \"You're a current Premium member. If you purchase an additional year of Premium membership, one year will be added to your current expiration date of \"+currentRenewDate+\". On \"+formattedNewRenewDate+\", your membership will automatically renew using today's payment method.\",\r\n type: \"info\",\r\n showCancelButton: true,\r\n confirmButtonColor: \"#398439\",\r\n confirmButtonText: \"Add to cart anyway\"\r\n },\r\n function(isConfirm) {\r\n if(isConfirm) {\r\n $scope.AddToCart(product);\r\n }\r\n }\r\n );\r\n } else {\r\n $scope.AddToCart(product);\r\n }\r\n }\r\n $scope.AddToCart = function (product) {\r\n\r\n console.log(\"Added To Cart\")\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (item) {\r\n if (item.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.Modifiers = product.Modifiers;\r\n itm.NoDiscount = ($scope.Product.NoDiscount==\"True\");\r\n if(product.Modifiers.length){\r\n angular.forEach(product.Modifiers, function(mod) {\r\n var selOpt = jQuery.grep(mod.Options, function(o){\r\n return o.Id == mod.SelectedOption;\r\n })\r\n //console.log(selOpt)\r\n itm.Name = itm.Name + ', ' + selOpt[0].Name + ' (' + selOpt[0].Description + ')';\r\n //HANDLED IN UpdateProductPrice() // itm.Price = (1*itm.Price + 1*selOpt[0].Value);\r\n })\r\n }\r\n\r\n\r\n //console.log(product)\r\n itm.IncludesPremium = (product.IncludesPremium == \"True\");\r\n itm.Qty = 1;\r\n itm.Modifiers = product.Modifiers;\r\n $scope.Cart.Items.push(itm);\r\n product.IsInCart = true;\r\n }else{\r\n //console.log(\"EXISTS\")\r\n }\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n //$scope.$broadcast('CartChanged', $scope.Cart);\r\n //$scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n ////////console.log(\"hfkhsk\");\r\n /*if ($scope.User.UserName) {\r\n\r\n } else {\r\n window.location.href ='/auth.html?returnurl=/store'\r\n }*/\r\n\r\n\r\n }\r\n \r\n $scope.$watch('id', function (id) {\r\n\r\n if (id) {\r\n $scope.ShowPage = false;\r\n $http.post('/Execute/UAP_GetProduct', [id]).success(function (data) {\r\n //console.log(\"dsafsdfsa\")\r\n $scope.Product = data.RS_0[0];\r\n $scope.Product.OriginalPrice = $scope.Product.Price;\r\n $scope.Product.CallForPricing = false;\r\n $scope.Product.Modifiers = JSON.parse($scope.Product.Modifiers);\r\n $scope.Product.Courses = data.RS_1;\r\n $state.current.title = $scope.Product.Name;\r\n //console.log($scope.Product)\r\n //$scope.Product.HTML = $sce.trustAsHtml($scope.Product.HTML);\r\n //$scope.Product.Description = $sce.trustAsHtml($scope.Product.Description);\r\n $scope.Product.Tags = JSON.parse($scope.Product.Tags);\r\n if($scope.Product.Tags.filter(function(tag){\r\n return tag.Name==\"Call for Pricing\";\r\n }).length){\r\n $scope.Product.CallForPricing = true;\r\n }\r\n $scope.load();\r\n });\r\n }\r\n })\r\n $scope.BuyNow = function (product) {\r\n $scope.$broadcast('BuyNow', product);\r\n }\r\n $scope.load = function () {\r\n $http.post(\"/GetProducts\").success(function (data) {\r\n $scope.Products = data.RS_0;\r\n\r\n angular.forEach($scope.Products, function (prd) {\r\n prd.HasTrial = (prd.HasTrial == \"True\" || prd.HasTrial == \"1\")\r\n prd.TrialHasExpired = (prd.TrialHasExpired == \"True\" || prd.TrialHasExpired == \"1\");\r\n if (prd.Id == $scope.Product.Id) {\r\n $scope.Product.HasProduct = (prd.HasProduct == \"True\" || prd.HasProduct == \"1\");\r\n $scope.Product.HasTrial = prd.HasTrial;\r\n $scope.Product.TrialHasExpired = prd.TrialHasExpired;\r\n $scope.Product.Tags = JSON.parse(prd.Tags);\r\n }\r\n if (prd.Id == 1) {\r\n $scope.Cart.Premium = prd;\r\n }\r\n prd.IncludesPremium = (prd.IncludesPremium == \"True\");\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == prd.Id) {\r\n prd.IsInCart = true;\r\n }\r\n });\r\n prd.Tags = JSON.parse(prd.Tags);\r\n if (isNumeric($scope.PendingProductId) == true) {\r\n if ($scope.PendingProductId == prd.Id) {\r\n $scope.AddToCart(prd);\r\n delete $scope.PendingProductId;\r\n }\r\n }\r\n });\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == $scope.Product.Id) {\r\n $scope.Product.IsInCart = true;\r\n }\r\n });\r\n \r\n document.title = $scope.Product.Name;\r\n\r\n $scope.CalculateCart();\r\n $scope.ShowPage = true;\r\n });\r\n }\r\n\r\n }\r\n }\r\n});\r\napp.directive('trialbar', function() {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/trialbar.html',\r\n controller: function ($scope,$rootScope,$http) {\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $rootScope.UserSettings = $scope.UserSettings;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.HideTrialBar = function() {\r\n $scope.UserSettings.HideTrialBar=true;\r\n $scope.SaveUserSettings();\r\n }\r\n }\r\n }\r\n});\r\napp.directive('promobar', function() {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/promobar.html',\r\n controller: function ($scope,$rootScope,$http) {\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $rootScope.UserSettings = $scope.UserSettings;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.HidePromoBar = function() {\r\n $scope.UserSettings.HidePromoBar=true;\r\n $scope.SaveUserSettings();\r\n }\r\n }\r\n }\r\n});\r\napp.directive('storePromoArea', function() {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/storepromoarea.html',\r\n controller: function ($scope,$rootScope,$http) {\r\n\r\n }\r\n }\r\n});\r\napp.directive('trialproducts', function() {\r\n return{\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/trialproducts.html',\r\n controller: function ($scope,$rootScope,$http,$parse) {\r\n $http.post(\"/Execute/GetCourseProductsByUser\", [$rootScope.User.UserName]).success(function(data){\r\n //console.log(data)\r\n });\r\n },\r\n link: function (scope, http, element, attrs) {\r\n\r\n\r\n }\r\n }\r\n});\r\napp.directive('productlist', function ($parse, $http, $cookies, $cookieStore, $window, dataService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/ProductList.htm',\r\n scope: {\r\n source: '=',\r\n tagfilter: '=?',\r\n search: '=?',\r\n ownfilter: '=?',\r\n resultlength: '=?',\r\n showfeatured: '='\r\n },\r\n controller: function ($scope, $rootScope, $filter, $http, $cookies, dataService) {\r\n $scope.User = $rootScope.User;\r\n $scope.AddingToCart = false;\r\n $scope.$on('AddingToCart', function(event,data){\r\n if(data=='started'){\r\n $scope.AddingToCart=true;\r\n } else if(data=='ended') {\r\n $scope.AddingToCart=false;\r\n }\r\n })\r\n $scope.$watch('search', function (newVal, oldVal) {\r\n var res = $filter('filter')($scope.Products, $scope.searchFilter)\r\n if (res) {\r\n $scope.resultlength = res.length;\r\n }\r\n });\r\n $scope.$watch('ownfilter', function (newVal, oldVal) {\r\n var res = $filter('filter')($scope.Products, $scope.searchFilter)\r\n if (res) {\r\n $scope.resultlength = res.length;\r\n }\r\n ////////console.log($scope.resultlength)\r\n });\r\n $scope.searchFilter = function (obj) {\r\n ////////console.log(obj)\r\n var re = new RegExp($scope.search, 'i');\r\n if ($scope.ownfilter == 'Owned') {\r\n return (!$scope.search && obj.HasProduct == \"1\") || (re.test(obj.Name) && obj.HasProduct == \"1\") || (re.test(obj.Description) && obj.HasProduct == \"1\");\r\n }\r\n else {\r\n return !$scope.search || re.test(obj.Name) || re.test(obj.Description);\r\n }\r\n };\r\n $scope.UpdateProductPrice = function(prod){\r\n var price = prod.OriginalPrice;\r\n angular.forEach(prod.Modifiers, function(mod){\r\n if(mod.Options.length){\r\n var selOpt = jQuery.grep(mod.Options, function(o){\r\n return o.Id == mod.SelectedOption;\r\n })\r\n price = (1*price + 1*selOpt[0].Value);\r\n /////console.log(selOpt)\r\n }\r\n\r\n })\r\n return price;\r\n }\r\n $scope.$watch('source', function (s) {\r\n if ($scope.tagfilter) {\r\n if ($scope.tagfilter == 'notag') {\r\n if ($scope.source) {\r\n $scope.Products = [];\r\n angular.forEach($scope.source, function (p) {\r\n if (p.Tags.length == 0) {\r\n $scope.Products.push(p);\r\n }\r\n });\r\n }\r\n } else {\r\n var FilterTags = $scope.tagfilter.toString().split(\",\");\r\n if ($scope.source) {\r\n $scope.Products = [];\r\n angular.forEach($scope.source, function (p) {\r\n angular.forEach(p.Tags, function (t) {\r\n angular.forEach(FilterTags, function (ft) {\r\n if (t.Id == ft) {\r\n delete p.DescriptionHTML\r\n var np = angular.copy(p);\r\n np.DescriptionHTML = p.Description;\r\n np.SortPriority = parseInt(t.SortPriority);\r\n $scope.Products.push(np);\r\n }\r\n });\r\n });\r\n });\r\n }\r\n }\r\n } else {\r\n if ($scope.source) {\r\n ////console.log($scope.source)\r\n $scope.Products = $scope.source;\r\n }\r\n }\r\n if ($scope.Products) {\r\n $scope.resultlength = $scope.Products.length;\r\n }\r\n });\r\n $scope.AddProductsToCart = function (ids, couponcode) {\r\n if ($scope.User.Username) {\r\n angular.forEach(ids, function (id) {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == id) {\r\n $scope.AddToCart(prd);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n $scope.AddToCart = function (prd) {\r\n $scope.$emit('ItemAdded', prd);\r\n }\r\n $scope.OpenProduct = function (product) {\r\n alert('Open ' + product.Name + '\\n?????????');\r\n }\r\n $scope.GoToSignIn = function (product) {\r\n $scope.$emit('SignIn', product);\r\n }\r\n },\r\n link: function (scope, http, element, attrs) {\r\n\r\n\r\n }\r\n }\r\n});\r\napp.directive('storelistview', function ($parse, $http, $cookies, $cookieStore, $location, $window, dataService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/StoreListView.htm',\r\n scope: {\r\n tagfilter: '=?'\r\n }, controller: function ($rootScope, $location, $scope, $sce, $http, $cookies, dataService) {\r\n if ($rootScope.ProductToAdd) {\r\n\r\n }\r\n if($location.search().q) {\r\n $scope.q = $location.search().q;\r\n $scope.SearchFilter = $scope.q;\r\n }\r\n $scope.Products = AvailableProducts;\r\n $scope.TagId = 26\r\n $scope.DisplayTags = Globals.DisplayTags;\r\n var premium = {}\r\n $scope.OwnFilter = 'All';\r\n $scope.ShowCart = false;\r\n $scope.Cart = $cookies.getObject('Cart');\r\n //$scope.Cart = JSON.parse($scope.Cart);\r\n //console.log($scope.Cart);\r\n $scope.$watch('Cart', function (cart) {\r\n if (cart.Items) {\r\n $scope.ShowCart = (cart.Items.length > 0);\r\n }\r\n $cookies.putObject('Cart', cart, {'domain':'challengercme.com'});\r\n dataService.Cart = cart;\r\n //$scope.$broadcast('CartChanged', cart);\r\n $rootScope.$broadcast('CartChanged', cart);\r\n });\r\n $scope.$on('CartChanged', function (event, data) {\r\n $scope.Cart = data;\r\n $scope.loadit();\r\n });\r\n $scope.$on('CheckOut', function (event, data) {\r\n $scope.CheckOut = data;\r\n });\r\n $scope.$on('SignIn', function (event, data) {\r\n $scope.SignIn = true;\r\n if (data) {\r\n $scope.AddToCart(data)\r\n }\r\n });\r\n $scope.$on('ItemAdded', function (event, data) {\r\n $scope.AddToCart(data);\r\n });\r\n if (!$scope.Cart || typeof ($scope.Cart) === \"undefined\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n }\r\n $scope.UndoCheckout = function () {\r\n $scope.CheckOut = false;\r\n $scope.SignIn = false;\r\n $scope.$broadcast('CheckOut', $scope.CheckOut);\r\n }\r\n $scope.CalculateCart = function () {\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n $scope.Cart.PremiumIncluded = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.IncludesPremium == true) {\r\n $scope.Cart.PremiumIncluded = true;\r\n }\r\n });\r\n if ($scope.Cart.PremiumIncluded == true) {\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == 1) {\r\n ////////console.log(itm)\r\n itm.Price = 0.0;\r\n itm.PriceIncluded = true;\r\n }\r\n });\r\n }\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n $scope.Cart.TotalPrice += parseFloat(itm.Price);\r\n });\r\n }\r\n $scope.AddProductsToCart = function (ids, couponcode) {\r\n if ($scope.User.Username) {\r\n angular.forEach(ids, function (id) {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == id) {\r\n $scope.AddToCart(prd);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n $scope.AddToCart = function (product) {\r\n ////console.log(\"hfkhsk\");\r\n $scope.$broadcast('AddingToCart','started');\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.Modifiers = product.Modifiers;\r\n itm.NoDiscount = (product.NoDiscount==\"True\");\r\n if(product.Modifiers.length){\r\n angular.forEach(product.Modifiers, function(mod) {\r\n var selOpt = jQuery.grep(mod.Options, function(o){\r\n return o.Id == mod.SelectedOption;\r\n })\r\n //console.log(selOpt)\r\n itm.Name = itm.Name + ', ' + selOpt[0].Name + ' (' + selOpt[0].Description + ')';\r\n //HANDLED IN UpdateProductPrice() // itm.Price = (1*itm.Price + 1*selOpt[0].Value);\r\n })\r\n }\r\n itm.IncludesPremium = product.IncludesPremium;\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n product.IsInCart = true;\r\n }\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n //$scope.$broadcast('CartChanged', $scope.Cart);\r\n //$scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n ////////console.log(\"hfkhsk\");\r\n $scope.$broadcast('AddingToCart','ended');\r\n /*if ($scope.User.UserName) {\r\n\r\n } else {\r\n window.location.href ='/auth.html?returnurl=/store'\r\n }*/\r\n }\r\n $scope.CheckCart = function () {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == 1) {\r\n $scope.Cart.Premium = prd;\r\n }\r\n prd.IncludesPremium = (prd.IncludesPremium == \"True\");\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == prd.Id) {\r\n prd.IsInCart = true;\r\n }\r\n });\r\n });\r\n }\r\n $scope.loadit = function () {\r\n $scope.User = $rootScope.User;\r\n $http.post(\"/GetProducts\").success(function (data) {\r\n //console.log(data)\r\n $scope.Products = [];\r\n angular.forEach(data.RS_0, function (p) {\r\n if (p.HideInStore != \"True\") {\r\n $scope.Products.push(p);\r\n }\r\n })\r\n \r\n angular.forEach($scope.Products, function (prd) {\r\n prd.OriginalPrice = prd.Price;\r\n prd.HasTrial = (prd.HasTrial == \"True\" || prd.HasTrial == \"1\");\r\n prd.TrialHasExpired = (prd.TrialHasExpired == \"True\" || prd.TrialHasExpired == \"1\");\r\n prd.DescriptionHTML = $sce.trustAsHtml(prd.Description);\r\n if (prd.Id == 1) {\r\n $scope.Cart.Premium = prd;\r\n }\r\n prd.IncludesPremium = (prd.IncludesPremium == \"True\");\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == prd.Id) {\r\n prd.IsInCart = true;\r\n }\r\n });\r\n prd.Tags = JSON.parse(prd.Tags);\r\n if(prd.Tags.filter(function(tag){\r\n return tag.Name==\"Call for Pricing\";\r\n }).length){\r\n prd.CallForPricing = true;\r\n }else{\r\n prd.CallForPricing = false;\r\n }\r\n prd.Modifiers = JSON.parse(prd.Modifiers);\r\n angular.forEach(prd.Modifiers, function(mod){\r\n if(mod.Options.length){\r\n mod.SelectedOption = mod.Options[0].Id;\r\n }\r\n\r\n })\r\n if (isNumeric($scope.PendingProductId) == true) {\r\n if ($scope.PendingProductId == prd.Id) {\r\n $scope.AddToCart(prd);\r\n delete $scope.PendingProductId;\r\n }\r\n }\r\n });\r\n AvailableProducts = $scope.Products;\r\n $scope.CalculateCart();\r\n });\r\n }\r\n\r\n if ($rootScope.ProductToAdd) {\r\n var product = $rootScope.ProductToAdd\r\n $scope.User = $rootScope.User;\r\n delete $rootScope.ReturnUrl;\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.NoDiscount = (product.NoDiscount == \"True\");\r\n itm.IncludesPremium = product.IncludesPremium;\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n product.IsInCart = true;\r\n }\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n },\r\n link: function (scope, http, element, attrs) {\r\n var chkout = getQueryVariable(\"chkout\")\r\n if (chkout == 1) { scope.CheckOut = true; }\r\n scope.PendingProductId = getQueryVariable(\"ppid\")\r\n scope.TagId = getQueryVariable(\"tagid\")\r\n scope.HideSelectTag = false;\r\n if (scope.tagfilter && scope.tagfilter.length > 0) {\r\n scope.HideSelectTag = true;\r\n scope.TagId = scope.tagfilter;\r\n }\r\n\r\n }\r\n }\r\n});\r\napp.directive('requiredpurchaselist', function ($parse, $http, $cookies, $cookieStore, $location, $window, dataService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/requiredpurchaselist.htm',\r\n controller: function ($rootScope, $location, $scope, $sce, $http, $cookies, dataService) {\r\n $scope.Products = AvailableProducts;\r\n $scope.OwnFilter = 'All';\r\n $scope.ShowCart = false;\r\n $scope.Cart = $cookies.getObject('Cart');\r\n //console.log($scope.Cart);\r\n $scope.$watch('Cart', function (cart) {\r\n if (cart.Items) {\r\n $scope.ShowCart = (cart.Items.length > 0);\r\n }\r\n $cookies.putObject('Cart', cart, {'domain':'challengercme.com'});\r\n dataService.Cart = cart;\r\n //$scope.$broadcast('CartChanged', cart);\r\n $rootScope.$broadcast('CartChanged', cart);\r\n });\r\n $scope.$on('CartChanged', function (event, data) {\r\n $scope.Cart = data;\r\n $scope.loadit();\r\n });\r\n $scope.$on('CheckOut', function (event, data) {\r\n $scope.CheckOut = data;\r\n });\r\n $scope.$on('SignIn', function (event, data) {\r\n $scope.SignIn = true;\r\n if (data) {\r\n $scope.AddToCart(data)\r\n }\r\n });\r\n $scope.$on('ItemAdded', function (event, data) {\r\n $scope.AddToCart(data);\r\n });\r\n if (!$scope.Cart || typeof ($scope.Cart) === \"undefined\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n }\r\n $scope.UndoCheckout = function () {\r\n $scope.CheckOut = false;\r\n $scope.SignIn = false;\r\n $scope.$broadcast('CheckOut', $scope.CheckOut);\r\n }\r\n $scope.CalculateCart = function () {\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n $scope.Cart.PremiumIncluded = false;\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.IncludesPremium == true) {\r\n $scope.Cart.PremiumIncluded = true;\r\n }\r\n });\r\n if ($scope.Cart.PremiumIncluded == true) {\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == 1) {\r\n ////////console.log(itm)\r\n itm.Price = 0.0;\r\n itm.PriceIncluded = true;\r\n }\r\n });\r\n }\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n $scope.Cart.TotalPrice += parseFloat(itm.Price);\r\n });\r\n }\r\n $scope.AddProductsToCart = function (ids, couponcode) {\r\n if ($scope.User.Username) {\r\n angular.forEach(ids, function (id) {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == id) {\r\n $scope.AddToCart(prd);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n $scope.AddToCart = function (product) {\r\n ////console.log(\"hfkhsk\");\r\n $scope.$broadcast('AddingToCart','started');\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n //console.log(product)\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.Modifiers = product.Modifiers;\r\n itm.NoDiscount = product.NoDiscount;\r\n if(product.Modifiers.length){\r\n angular.forEach(product.Modifiers, function(mod) {\r\n var selOpt = jQuery.grep(mod.Options, function(o){\r\n return o.Id == mod.SelectedOption;\r\n })\r\n //console.log(selOpt)\r\n itm.Name = itm.Name + ', ' + selOpt[0].Name + ' (' + selOpt[0].Description + ')';\r\n //HANDLED IN UpdateProductPrice() // itm.Price = (1*itm.Price + 1*selOpt[0].Value);\r\n })\r\n }\r\n itm.IncludesPremium = product.IncludesPremium;\r\n itm.Qty = 1;\r\n if ($scope.Cart.Items) {\r\n $scope.Cart.Items.push(itm);\r\n } else {\r\n $scope.Cart.Items = [];\r\n $scope.Cart.Items.push(itm);\r\n }\r\n \r\n product.IsInCart = true;\r\n }\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n //$scope.$broadcast('CartChanged', $scope.Cart);\r\n //$scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n ////////console.log(\"hfkhsk\");\r\n $scope.$broadcast('AddingToCart','ended');\r\n /*if ($scope.User.UserName) {\r\n\r\n } else {\r\n window.location.href ='/auth.html?returnurl=/store'\r\n }*/\r\n }\r\n $scope.CheckCart = function () {\r\n angular.forEach($scope.Products, function (prd) {\r\n if (prd.Id == 1) {\r\n $scope.Cart.Premium = prd;\r\n }\r\n prd.IncludesPremium = (prd.IncludesPremium == \"True\");\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == prd.Id) {\r\n prd.IsInCart = true;\r\n }\r\n });\r\n });\r\n }\r\n $scope.loadit = function () {\r\n $scope.User = $rootScope.User;\r\n $http.post('/Execute/GetRequiredProductsNotPurchased', [$scope.User.UserId]).success(function (data) {\r\n //console.log(data)\r\n $scope.Products = data.RS_0;\r\n angular.forEach($scope.Products, function (prd) {\r\n prd.OriginalPrice = prd.Price;\r\n prd.HasTrial = (prd.HasTrial == \"True\" || prd.HasTrial == \"1\");\r\n prd.TrialHasExpired = (prd.TrialHasExpired == \"True\" || prd.TrialHasExpired == \"1\");\r\n prd.DescriptionHTML = $sce.trustAsHtml(prd.Description);\r\n if (prd.Id == 1) {\r\n $scope.Cart.Premium = prd;\r\n }\r\n prd.IncludesPremium = (prd.IncludesPremium == \"True\");\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == prd.Id) {\r\n prd.IsInCart = true;\r\n }\r\n });\r\n prd.Tags = JSON.parse(prd.Tags);\r\n prd.Modifiers = JSON.parse(prd.Modifiers);\r\n angular.forEach(prd.Modifiers, function(mod){\r\n mod.SelectedOption = mod.Options[0].Id;\r\n })\r\n if (isNumeric($scope.PendingProductId) == true) {\r\n if ($scope.PendingProductId == prd.Id) {\r\n $scope.AddToCart(prd);\r\n delete $scope.PendingProductId;\r\n }\r\n }\r\n });\r\n AvailableProducts = $scope.Products;\r\n $scope.CalculateCart();\r\n });\r\n }\r\n\r\n if ($rootScope.ProductToAdd) {\r\n var product = $rootScope.ProductToAdd\r\n $scope.User = $rootScope.User;\r\n delete $rootScope.ReturnUrl;\r\n var exists = false;\r\n $scope.Cart.TotalPrice = parseFloat(0.0);\r\n angular.forEach($scope.Cart.Items, function (itm) {\r\n if (itm.Id == product.Id) {\r\n exists = true;\r\n }\r\n });\r\n if (exists == false) {\r\n var itm = {};\r\n itm.Id = product.Id;\r\n itm.Price = product.Price;\r\n itm.Name = product.Name;\r\n itm.IncludesPremium = product.IncludesPremium;\r\n itm.Qty = 1;\r\n $scope.Cart.Items.push(itm);\r\n product.IsInCart = true;\r\n }\r\n $scope.CalculateCart();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n },\r\n link: function (scope, http, element, attrs) {\r\n var chkout = getQueryVariable(\"chkout\")\r\n if (chkout == 1) { scope.CheckOut = true; }\r\n scope.PendingProductId = getQueryVariable(\"ppid\")\r\n scope.TagId = getQueryVariable(\"tagid\")\r\n scope.HideSelectTag = false;\r\n if (scope.tagfilter && scope.tagfilter.length > 0) {\r\n scope.HideSelectTag = true;\r\n scope.TagId = scope.tagfilter;\r\n }\r\n\r\n }\r\n }\r\n});\r\napp.directive('assettrial', function($parse, $http, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/assettrial.html',\r\n scope: {\r\n courseid: '=',\r\n buttononly: '='\r\n },\r\n controller: function($scope,$rootScope,$http) {\r\n //console.log($scope.buttononly)\r\n if($scope.buttononly != true) {\r\n $scope.buttononly = false;\r\n }\r\n $scope.ExpMap = [];\r\n $scope.PchMap = [];\r\n $scope.ActMap = [];\r\n $scope.TrialMap = [];\r\n $scope.TrialHits = [];\r\n /*$timeout(function(){\r\n\r\n })*/\r\n $http.post(\"/GetProducts\").success(function (prds) {\r\n $scope.TrialProducts = jQuery.grep(prds.RS_0, function(p) {\r\n return p.HasTrial==\"True\";\r\n });\r\n $scope.ExpiredTrialProducts = jQuery.grep($scope.TrialProducts, function(p) {\r\n return p.TrialHasExpired==\"True\";\r\n });\r\n $scope.ActiveTrialProducts = jQuery.grep($scope.TrialProducts, function(p) {\r\n return p.TrialHasExpired==\"False\";\r\n });\r\n $http.post(\"/Execute/GetCourseProductsByUser\", [$rootScope.User.UserName]).success(function(data){\r\n $scope.UserPurchases = data.RS_1;\r\n $scope.FindTrial($scope.courseid)\r\n });////console.log($rootScope.TrialProducts)\r\n\r\n });\r\n\r\n $scope.FindTrial = function(CourseId) {\r\n if(Number.isInteger(1*CourseId) && CourseId != 0) {\r\n $http.post('/Execute/GetProductsContainingCourse', [1*CourseId]).success(function(data){\r\n //console.log($scope.ExpiredTrialProducts)\r\n //console.log($scope.UserPurchases)\r\n //console.log(data)\r\n $scope.ProductsContainingCourse = data.RS_0;\r\n $scope.ContainingMap = $scope.ProductsContainingCourse.map(function(p) {\r\n return p.Id;\r\n })\r\n $scope.TrialMap = $scope.TrialProducts.map(function(p){\r\n return p.Id;\r\n })\r\n $scope.TrialHits = $scope.ContainingMap.filter(function(val){\r\n return $scope.TrialMap.indexOf(val) != -1;\r\n })\r\n $scope.ThisTrial = jQuery.grep($scope.TrialProducts, function(p){\r\n return p.Id == $scope.TrialHits[0];\r\n })\r\n //console.log($scope.ThisTrial)\r\n })\r\n }\r\n\r\n }\r\n }\r\n }\r\n})\r\napp.directive('exams', function ($parse, $http, $compile, $location, $anchorScroll, $rootScope, $timeout, ngIntroService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/Exams.htm',\r\n scope: {\r\n courseid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http) {\r\n\r\n\r\n /**\r\n * noExamsCourses: array of course IDs that do not provide exam sims.\r\n */\r\n $scope.noExamsCourses = [47];\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Sims & Topics

\" +\r\n \"

Welcome to Sims & Topics, where you can access exam simulators with Adaptive Learning, and study individual topics.

\"\r\n },\r\n {\r\n element: '#course-selector button',\r\n intro: \"

Course Selector

\" +\r\n \"

Pick which asset's exams and topics to display.

\"\r\n },\r\n {\r\n element: '#course-info',\r\n intro: \"

Course Info

\" +\r\n \"

Expand to view introductory, objective, authorship, and support information for the currently selected asset.

\"\r\n },\r\n {\r\n element: '#studytabs ul.nav-tabs',\r\n intro: \"

Mode Select

\" +\r\n \"

Switch between displaying exams or topics

\"\r\n },\r\n {\r\n element: '#exams-key-wrap',\r\n intro: \"

Exam Types

\" +\r\n \"
  • Comprehensive Exams cover all chapters and topics from the currently selected course.
  • \" +\r\n \"
  • Chapter Exams cover all topics from within a specific chapter
  • \" +\r\n \"
  • Other Exams include baseline exams and special exams that may not fall within a specific chapter
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#examlist-0',\r\n intro: \"

Exam List

\" +\r\n \"

Click or tap on an exam's title to expand it. Then, you can start a new assessment, view details of scored exams, and resume paused exams.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Sims & Topics tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n if($scope.courseid == 1106) {\r\n $location.url('/quickquiz');\r\n }\r\n $scope.Waiting = false;\r\n //$scope.USettings = $rootScope.UserSettings;\r\n\r\n $scope.Courses = $rootScope.Courses;\r\n $scope.SelCourse = $scope.courseid;\r\n $scope.courseSelectChangeHandler = function() {\r\n var newCourseId = $scope.SelCourse;\r\n $rootScope.UserSettings.PersistentCourseId = newCourseId;\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (dataff) {\r\n //$rootScope.UserSettings = $scope.USettings;\r\n $location.url('/e/exams/'+newCourseId);\r\n })\r\n\r\n };\r\n //$scope.isFirstOpen = true;\r\n /*$scope.isFirstOpen = function(AId,index){\r\n var hash = $location.hash();\r\n if(hash.length == 0 && index==0) {\r\n return true;\r\n }else{\r\n if(hash == AId) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n };*/\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //$scope.LoadSettings();\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.DismissHelp = function(){\r\n $scope.UserSettings.HelpExams_Hide = 'True';\r\n $scope.SaveUserSettings();\r\n }\r\n $scope.SA = {};\r\n $scope.SA.Wait = false;\r\n $scope.StartAssessment = function (Exam) {\r\n $scope.SA.Wait = true;\r\n var params = [$scope.User.UserName, Exam.CourseId, Exam.ChapterId, Exam.TopicId, Exam.SubTopicId, Exam.AssessmentId, CurrentUserTZoffsett]\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data.RS_0[0].UserAssessmentId);\r\n $scope.SA.Wait = false;\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n $scope.$watch(\"courseid\", function (newval) {\r\n if (newval) {\r\n $http.get(\"/api/Courses(\" + newval.toString() + \"L)\").success(function (dta) {\r\n $scope.Course = dta.d;\r\n if(dta.d.LastPublished != null) {\r\n $scope.CourseLastPublished = 1*dta.d.LastPublished.replace(/\\D/g,'');\r\n }else{\r\n $scope.CourseLastPublished = 0;\r\n }\r\n\r\n $scope.CourseFromCourses = jQuery.grep($scope.Courses,function(e){\r\n return e.Id == newval.toString();\r\n });\r\n $http.post('/Execute/GetCourse',[newval]).success(function (cc) {\r\n if ($scope.CourseFromCourses[0].IsTrial == 'False') {\r\n $scope.CourseFromCourses[0].IsTrial = '0'\r\n }\r\n if ($scope.CourseFromCourses[0].IsTrial == 'True') {\r\n $scope.CourseFromCourses[0].IsTrial = '1'\r\n }\r\n $scope.CourseFromCourses[0].cmefree = cc.RS_0[0].cmefree;\r\n if($scope.CourseFromCourses[0].cmefree == 'True') {\r\n $scope.CourseFromCourses[0].FullProductInfo =\r\n jQuery.grep(Globals.FreeCmeCourses, function(fc){\r\n return fc.CourseId == $scope.CourseFromCourses[0].Id;\r\n })[0]\r\n } else {\r\n $scope.CourseFromCourses[0].FullProductInfo = false;\r\n }\r\n });\r\n $scope.Waiting = true;\r\n $http.post(\"/Execute/GetTopLevelAssessments\", [newval.toString()]).success(function (data) {\r\n $scope.BoardExams = data.RS_0;\r\n angular.forEach($scope.BoardExams, function(ex,index){\r\n var hash = $location.hash();\r\n /*if(hash.length == 0 && index==0) {\r\n ex.IsOpen = true;\r\n }else{*/\r\n ex.IsOpen = hash == ex.AssessmentId;\r\n /*}*/\r\n })\r\n //console.log($scope.BoardExams)\r\n if ($scope.BoardExams.length == 0) {\r\n $scope.Message = \"No Available Exams\";\r\n }\r\n $scope.Waiting = false;\r\n $timeout(\r\n function(){\r\n $anchorScroll.yOffset = 90;\r\n $anchorScroll();\r\n }\r\n );\r\n\r\n });\r\n });\r\n }\r\n });\r\n\r\n }\r\n }\r\n});\r\napp.directive('progmanageusers', function(){\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/progmanageusers.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $state, $location, $filter, $uibModal, toastr, toastrConfig) {\r\n $scope.User = $rootScope.User;\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n $scope.open = function (page, size) {\r\n $uibModal.open({\r\n animation: true,\r\n templateUrl: page,\r\n size: size,\r\n resolve: {\r\n items: function () {\r\n return $scope.items;\r\n }\r\n }\r\n });\r\n };\r\n $scope.uploadComplete = function (content, Institution) {\r\n ////console.log(content);\r\n angular.forEach(content, function (u) {\r\n var usrExist = false;\r\n angular.forEach($scope.Inst.Users, function (iu) {\r\n if (u.Username == iu.Username) {\r\n usrExist = true;\r\n iu.Email = u.Email;\r\n iu.FirstName = u.FirstName;\r\n iu.LastName = u.LastName;\r\n iu.ClassName = u.ClassName;\r\n }\r\n });\r\n if (!usrExist) {\r\n $scope.Inst.Users.push(u);\r\n }\r\n });\r\n Institution.SavePrompt = true;\r\n }\r\n $scope.CalculteAllocation = function (i,fn) {\r\n if (i.Users && i.Settings) {\r\n $scope.UnAllocatedCount = 0\r\n $scope.StudentCount = 0\r\n $scope.InactiveCount = 0\r\n $scope.FacultyCount = 0\r\n $scope.AdminCount = 0\r\n angular.forEach(i.Users, function (u) {\r\n var al = false;\r\n angular.forEach(i.Settings.StudentClasses, function (sc) {\r\n if (u.ClassName == sc) { $scope.StudentCount += 1; al = true; }\r\n });\r\n angular.forEach(i.Settings.InactiveClasses, function (ia) {\r\n if (u.ClassName == ia) { $scope.InactiveCount += 1; al = true; }\r\n });\r\n if (u.ClassName == i.Settings.FacultyTerm) { $scope.FacultyCount += 1; al = true; }\r\n if (u.ClassName == i.Settings.AdminTerm) { $scope.AdminCount += 1; al = true; }\r\n if (al == false) { $scope.UnAllocatedCount += 1 }\r\n });\r\n var isValid = true;\r\n if ($scope.UnAllocatedCount > 0) {\r\n isValid = false;\r\n toastr['error']('You have ' + $scope.UnAllocatedCount + ' UnAllocated User(s)', '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (($scope.FacultyCount + $scope.AdminCount) > i.FacultySlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.FacultyTerm + '
Limit: ' + i.FacultySlots + '
Allocated: ' + ($scope.FacultyCount + $scope.AdminCount), '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if ($scope.StudentCount > i.StudentSlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.LearnerTerm + '
Limit: ' + i.StudentSlots + '
Allocated: ' + $scope.StudentCount, '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (fn) { fn(isValid) }\r\n }\r\n }\r\n $scope.LoadAssets = function (i) {\r\n if (!i.Assigned || !i.Available) {\r\n $http.post(\"/Execute/GetInstitutionCourses\", [i.Id]).success(function (data) {\r\n i.Assigned = data.RS_0;\r\n i.Available = data.RS_1;\r\n ////console.log(i)\r\n });\r\n }\r\n }\r\n $scope.LoadUsers = function (i) {\r\n $scope.LoadSettings(i, function () {\r\n if (!i.Users) {\r\n i.InactiveUsers = [];\r\n if (!i.Classes) { i.Classes = []; }\r\n \r\n $http.post(\"/Execute/GetInstitutionMembers\", [i.Id]).success(function (data) {\r\n if (data.RS_0) {\r\n i.Users = data.RS_0;\r\n }\r\n else {\r\n i.Users = []\r\n }\r\n angular.forEach(i.Users, function (u) {\r\n u.drag = true;\r\n var ClassExists = false;\r\n var cls\r\n angular.forEach(i.Classes, function (c) {\r\n if (c.Name == u.ClassName) {\r\n ClassExists = true;\r\n cls = c;\r\n }\r\n });\r\n if (ClassExists == false) {\r\n cls = { Name: u.ClassName, Members: [] }\r\n i.Classes.push(cls);\r\n }\r\n if (u.ClassName == '') { u.ClassName = 'Unassigned' }\r\n cls.Members.push(u);\r\n \r\n $http.get(\"/GetPassword/\" + u.Username).success(function (pass) {\r\n u.Password = pass\r\n });\r\n });\r\n $scope.CalculteAllocation(i);\r\n });\r\n $scope.Inst = i;\r\n }\r\n });\r\n }\r\n\r\n $scope.LoadSettings = function (i, fn) {\r\n if (!i.Settings) {\r\n $scope.FacultyRoles = angular.copy(Globals.InstitutionalFacultyRoles);\r\n $scope.LearnerRoles = angular.copy(Globals.InstitutionalLearnerRoles);\r\n $scope.AdminRoles = angular.copy(Globals.InstitutionalAdminRoles);\r\n if (!i.Settings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [i.Id]).success(function (data) {\r\n if (data.RS_0.length > 0) {\r\n i.Settings = JSON.parse(data.RS_0[0].SettingsJSON);\r\n }\r\n else {\r\n i.Settings = {\r\n FacultyTerm: \"Faculty\",\r\n FacultyRoles: [],\r\n LearnerTerm: \"Student\",\r\n LearnerRoles: [],\r\n StudentClasses: [\"PGY1\", \"PGY2\", \"PGY3\"],\r\n InactiveClasses: [\"Graduated\"],\r\n Classes: function () {\r\n var lst = angular.copy(this.StudentClasses);\r\n lst.unshift(this.FacultyTerm)\r\n return lst;\r\n }\r\n }\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n\r\n if (fn) { fn(); }\r\n });\r\n } else {\r\n if (!i.Settings.InactiveClasses) {\r\n i.Settings.InactiveClasses = [\"Graduated\"]\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n if (fn) { fn(); }\r\n }\r\n } else {\r\n if (fn) { fn(); }\r\n }\r\n }\r\n $scope.SaveUsers = function (i) {\r\n $scope.CalculteAllocation(i, function (isValid) {\r\n if (isValid) {\r\n $rootScope.FullScreenLoading=true;\r\n $http.post(\"/UpdateInstitutionUser/\" + i.Id, i.Users).success(function (d) {\r\n ////console.log(d)\r\n $rootScope.FullScreenLoading=false;\r\n toastr['success']('Users Saved', '

Success

');\r\n i.SavePrompt = false;\r\n });\r\n }\r\n });\r\n }\r\n $scope.LoadInstitution = function () {\r\n $http.post(\"/Execute/GetInstitution\", [$scope.User.InstitutionId]).success(function (data) {\r\n var inst = data.RS_0[0];\r\n //////console.log(inst)\r\n inst.ImpersonateEmail = (inst.ImpersonateEmail == \"True\");\r\n inst.Inactive = (inst.Inactive == \"True\");\r\n inst.InactiveT = inst.Inactive;\r\n inst.SavePrompt = false;\r\n $scope.Classifications = data.RS_1;\r\n $scope.LoadUsers(inst);\r\n $scope.LoadAssets(inst);\r\n });\r\n }\r\n }\r\n }\r\n});\r\napp.directive('instuserprogress', function($parse, $http, $compile, $location, $rootScope, ngIntroService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/instuserprogress.html',\r\n controller: function ($scope, $rootScope, $http, $location) {\r\n $scope.InstId = $scope.User.InstitutionId;\r\n $scope.MinECI = 40;\r\n $scope.WhichCourse = \"1133\";\r\n $scope.itemsPerPageOptions = [\r\n 10,\r\n 25,\r\n 50\r\n ];\r\n $scope.itemsPerPage=10;\r\n $scope.classFilter = \"\";\r\n $scope.orderBy = 'LastName';\r\n $scope.$watch('WhichCourse', function(o,n) {\r\n $http.post(\"/Execute/InstitutionalProbability\", [$scope.InstId,$scope.WhichCourse]).success(function(data){\r\n $scope.Users = data.RS_0;\r\n angular.forEach($scope.Users, function(u){\r\n if(1*u.PerformanceIndex<0){u.PerformanceIndex=0}\r\n u.RealIndex = ($scope.MinECI + 1*u.PerformanceIndex + 1*u.BoardSimAvg + 1*u.NonBoardSimAvg) /3;\r\n u.BoardSimsTaken = 1*u.BoardSimsTaken;\r\n u.NonBoardSimsTaken = 1*u.NonBoardSimsTaken;\r\n u.BoardSimDaysSince = 1*u.BoardSimDaysSince;\r\n u.NonBoardSimDaysSince = 1*u.NonBoardSimDaysSince;\r\n if(u.RealIndex>99){u.RealIndex=99}\r\n // Any changes to the values used for `u.Likelihood` will need to be reflected in App.instuserprogressmeter as well\r\n if(u.RealIndex<20){u.Likelihood=\"Poor\"}\r\n else if(u.RealIndex>=20 && u.RealIndex<40){u.Likelihood=\"Low\"}\r\n else if(u.RealIndex>=40 && u.RealIndex<60){u.Likelihood=\"Fair\"}\r\n else if(u.RealIndex>=60 && u.RealIndex<80){u.Likelihood=\"High\"}\r\n else {u.Likelihood=\"Great\"}\r\n })\r\n });\r\n })\r\n \r\n }\r\n }\r\n});\r\napp.directive('instuserprogressMini', function($parse, $http, $compile, $location, $rootScope, ngIntroService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/instuserprogressmini.html',\r\n controller: function ($scope, $rootScope, $http, $location) {\r\n $scope.InstId = $scope.User.InstitutionId;\r\n $scope.MinECI = 40;\r\n $scope.WhichCourse = \"1133\";\r\n $scope.itemsPerPageOptions = [\r\n 10,\r\n 25,\r\n 50\r\n ];\r\n $scope.itemsPerPage=10;\r\n $scope.classFilter = \"\";\r\n $scope.orderBy = 'LastName';\r\n $scope.$watch('WhichCourse', function(o,n) {\r\n $http.post(\"/Execute/InstitutionalProbability\", [$scope.InstId,$scope.WhichCourse]).success(function(data){\r\n $scope.Users = data.RS_0;\r\n angular.forEach($scope.Users, function(u){\r\n if(1*u.PerformanceIndex<0){u.PerformanceIndex=0}\r\n u.RealIndex = ($scope.MinECI + 1*u.PerformanceIndex + 1*u.BoardSimAvg + 1*u.NonBoardSimAvg) /3;\r\n u.BoardSimsTaken = 1*u.BoardSimsTaken;\r\n u.NonBoardSimsTaken = 1*u.NonBoardSimsTaken;\r\n u.BoardSimDaysSince = 1*u.BoardSimDaysSince;\r\n u.NonBoardSimDaysSince = 1*u.NonBoardSimDaysSince;\r\n if(u.RealIndex>99){u.RealIndex=99}\r\n // Any changes to the values used for `u.Likelihood` will need to be reflected in App.instuserprogressmeter as well\r\n if(u.RealIndex<20){u.Likelihood=\"Poor\"}\r\n else if(u.RealIndex>=20 && u.RealIndex<40){u.Likelihood=\"Low\"}\r\n else if(u.RealIndex>=40 && u.RealIndex<60){u.Likelihood=\"Fair\"}\r\n else if(u.RealIndex>=60 && u.RealIndex<80){u.Likelihood=\"High\"}\r\n else {u.Likelihood=\"Great\"}\r\n })\r\n });\r\n })\r\n\r\n }\r\n }\r\n});\r\napp.directive('instuserprogressmeter', function($parse,$compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/instuserprogressmeter.html',\r\n scope: {\r\n userprogress: '='\r\n },\r\n controller: function($scope,$parse,$compile) {\r\n ////console.log($scope.userprogress)\r\n }\r\n }\r\n});\r\napp.directive('myexams', function ($parse, $http, $compile, $location, $rootScope, ngIntroService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/myexams.htm',\r\n scope: {\r\n courseid: '='\r\n },\r\n controller: function ($scope, $http, $timeout, $anchorScroll, $rootScope) {\r\n ////console.log($rootScope.ViewPremiumContent)\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Custom Exams

\" +\r\n \"

Here you'll find all of the custom exams you've created with Exam Builder.

\"\r\n },\r\n {\r\n element: '#new-custom-exam',\r\n intro: \"

New Custom Exam

\" +\r\n \"

Click here to launch Exam Builder and create a new custom exam.

\"\r\n },\r\n {\r\n element: '#cexamlist-0',\r\n intro: \"

Custom Exam List

\" +\r\n \"

Click on a custom exam's name to expand its details.

\"\r\n },\r\n {\r\n element: '#cexamlist-0 .btn-danger',\r\n intro: \"

Delete

\" +\r\n \"

Click the trashbin icon to remove an exam from the list. Any scores for the exam will be preserved.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Custom Exams tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.ViewPremiumContent = $rootScope.ViewPremiumContent;\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //$scope.LoadSettings();\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.DismissHelp = function(){\r\n $scope.UserSettings.HelpCustomExams_Hide = 'True';\r\n $scope.SaveUserSettings();\r\n }\r\n ////console.log($scope.User)\r\n $scope.LoadCustomExams = function () {\r\n $http.post('/Execute/GetUserCustomExams', [$scope.User.UserId]).success(function (data) {\r\n //////console.log(data)\r\n $scope.CustomExams = data.RS_0;\r\n angular.forEach($scope.CustomExams, function (e) {\r\n ////console.log(e)\r\n e.CreatedOnDate = new Date(e.CreatedOn + \" UTC\")\r\n e.IsOpen = false;\r\n });\r\n ////console.log($scope.CustomExams)\r\n if($location.hash()) {\r\n angular.forEach($scope.CustomExams, function(ex,index){\r\n var hash = $location.hash();\r\n /*if(hash.length == 0 && index==0) {\r\n ex.IsOpen = true;\r\n }else{*/\r\n if(hash == ex.Id) {\r\n ex.IsOpen = true;\r\n }else{\r\n ex.IsOpen = false;\r\n }\r\n /*}*/\r\n });\r\n $timeout(\r\n function(){\r\n $anchorScroll.yOffset = 90;\r\n $anchorScroll();\r\n }\r\n );\r\n } else {\r\n if ($rootScope.NewCustomExamId) {\r\n var NewExamId = $rootScope.NewCustomExamId;\r\n angular.forEach($scope.CustomExams, function (e) {\r\n if (e.Id == NewExamId) {\r\n e.IsOpen = true;\r\n }\r\n });\r\n delete $rootScope.NewCustomExamId;\r\n } else {\r\n //////console.log($scope.CustomExams)\r\n if ($scope.CustomExams.length > 0) {\r\n $scope.CustomExams[0].IsOpen = true;\r\n }\r\n }\r\n }\r\n\r\n ////console.log($scope.CustomExams)\r\n });\r\n \r\n }\r\n $scope.LoadCustomExams();\r\n $scope.Archive = function (ce) {\r\n swal({\r\n title:\"Archive exam?\",\r\n text:\"Once archived, this custom exam will no longer be available. Historical scores will still be visible, but you'll no longer be able to take the exam.\",\r\n type:\"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Archive\",\r\n dangerMode: true\r\n }, function(del) {\r\n if(del){\r\n $http.post('/Execute/ArchiveCustomExam', [ce.Id, $scope.User.UserId]).success(function (d) {\r\n //$scope.archived = d;\r\n //////console.log(d)\r\n swal('Exam Archived',null,'success');\r\n //$scope.loadassignment();\r\n $scope.LoadCustomExams();\r\n });\r\n }\r\n\r\n //alert(del)\r\n });\r\n //var con = confirm('Are you sure you want to hide this Custom Exam?')\r\n /*if (con) {\r\n $http.post('/Execute/ArchiveCustomExam', [ce.Id, $scope.User.UserId]).success(function (d) {\r\n $scope.archived = d;\r\n ////console.log(d)\r\n alert('Exam Archived')\r\n //$scope.loadassignment();\r\n $scope.LoadCustomExams();\r\n })\r\n }*/\r\n\r\n }\r\n $scope.ShowEditNameClick = function (Exam, e) {\r\n //Exam.IsOpen = !Exam.IsOpen\r\n //e.preventDefault();\r\n //e.stopPropagation(); \r\n //console.log(e)\r\n Exam.ShowEditName = true;\r\n Exam.IsOpen = !Exam.IsOpen\r\n }\r\n $scope.EditNameSave = function (Exam, e) {\r\n //Exam.IsOpen = !Exam.IsOpen\r\n e.preventDefault();\r\n e.stopPropagation(); \r\n var pvt = \"0\"\r\n if (Exam.IsPrivate == \"True\" || Exam.IsPrivate === true) {\r\n pvt=\"1\"\r\n }\r\n var p = [Exam.Id, Exam.Name, Exam.Description, Exam.HTML, Exam.OwnerId, pvt]\r\n //console.log(p)\r\n $http.post('/Execute/RenameCustomExam', [Exam.Id, Exam.Name]).success(function (d) {\r\n //console.log(d)\r\n Exam.ShowEditName = false;\r\n\r\n });\r\n \r\n \r\n }\r\n\r\n }\r\n }\r\n});\r\napp.directive('loadingAnimation', function($parse){\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/loading-animation.htm'\r\n }\r\n});\r\napp.directive('cme', function ($parse, $rootScope, $location, $http, $compile, $state, $filter, $anchorScroll, ngIntroService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/cme.htm',\r\n scope: {\r\n id: '=',\r\n tid: '=',\r\n studytopics: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $timeout) {\r\n $scope.changeCMEType = function(t) {\r\n ////console.log(t);\r\n $scope.selectedCMEType = t;\r\n\r\n }\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Earn CME

\" +\r\n \"

For each course, access and complete available CME topics to earn CME credit.

\"\r\n },\r\n {\r\n element: '#course-selector button',\r\n intro: \"

Course Selector

\" +\r\n \"

Pick which asset's content to display.

\"\r\n },\r\n {\r\n element: '#cme-selector button',\r\n intro: \"

CME Type Selector

\" +\r\n \"

Pick which category of CME from which to display content.

\"\r\n },\r\n {\r\n element: '#course-info',\r\n intro: \"

Course Info

\" +\r\n \"

Expand to view introductory, objective, authorship, and support information for the currently selected asset.

\"\r\n },\r\n {\r\n element: '#cmechapter-0',\r\n intro: \"

Chapter List

\" +\r\n \"

Click or tap on a chapter's title to view its list of topics. Select a topic to begin earning CME.

\"\r\n },\r\n {\r\n element: '#cmechapter-0 .cme-bar-tour',\r\n intro: \"

CME Completion

\" +\r\n \"

Earned/available credits this year for chapters containing earnable CME.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Earn CME tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.User = $rootScope.User;\r\n ////console.log($scope.User);\r\n $scope.selectedCMEType = {};\r\n if($scope.id==1106) {\r\n $location.url('/quickquiz');\r\n }\r\n $scope.TotalCME = 0;\r\n $scope.CMETotals = [];\r\n ////console.log($scope.id)\r\n //$http.post('/Execute/GetCMEValuesForCourse', [$scope.User.UserName, $scope.id, $scope.selectedCMEType.Id, CurrentUserTZoffsett]).success(function (d) {\r\n // ////console.log(d)\r\n // $scope.CMEholder = d.RS_0;\r\n // angular.forEach($scope.CMEholder, function(c){\r\n // if(c.Name != 'AACP CEUs' && c.Name != 'ABIM MOC' && c.Name != 'AOA Category 1') {\r\n // $scope.TotalCME += 1*c.Value;\r\n // $scope.CMETotals.push(c);\r\n // }\r\n\r\n // });\r\n //})\r\n $scope.Courses = $rootScope.Courses;\r\n $scope.SelCourse = $scope.id;\r\n $scope.courseSelectChangeHandler = function() {\r\n var newCourseId = $scope.SelCourse;\r\n $rootScope.UserSettings.PersistentCourseId = newCourseId;\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (dataff) {\r\n //$rootScope.UserSettings = $scope.USettings;\r\n if($scope.studytopics) {\r\n $location.url('/e/topics/'+newCourseId);\r\n }else{\r\n $location.url('/c/cme/'+newCourseId);\r\n }\r\n\r\n })\r\n\r\n };\r\n //$scope.cme = 1\r\n $scope.SetCMEforCourse = function (course, value) {\r\n angular.forEach(course, function (cour) {\r\n angular.forEach(cour.Topics, function (top) {\r\n angular.forEach(top.Assessments, function (as) {\r\n as.Available = value\r\n })\r\n })\r\n })\r\n //console.log(course)\r\n }\r\n $scope.SetCMEforChapter = function (ch, value) {\r\n angular.forEach(ch.Topics, function (top) {\r\n angular.forEach(top.Assessments, function (as) {\r\n as.Available = value\r\n })\r\n })\r\n }\r\n $scope.$watch(\"selectedCMEType\", function (newval) {\r\n //console.log(newval)\r\n if ($scope.selectedCMEType.Id || $scope.studytopics) {\r\n var topicsURL;\r\n var params;\r\n if($scope.studytopics){\r\n topicsURL = '/Execute/GetTopicsForCourse';\r\n params = [$scope.User.UserName, $scope.id, CurrentUserTZoffsett];\r\n }else{\r\n topicsURL = '/Execute/GetCurrentCMEForCourse';\r\n params = [$scope.User.UserName, $scope.id, $scope.selectedCMEType.Id, CurrentUserTZoffsett];\r\n }\r\n //console.log('stuff', $scope.studytopics, params)\r\n $scope.Wait = true;\r\n $http.post(topicsURL, params).success(function (d) {\r\n //console.log(d)\r\n $scope.CMEList = d.RS_0;\r\n $scope.Chapters = [];\r\n if($scope.studytopics){\r\n var flags = [], output = [], l = d.RS_2.length, i;\r\n for( i=0; i0) {\r\n totalearnedchap += (100*chaptop.totalearned);\r\n };\r\n if (chaptop.totalavailable >0) {\r\n totalavailablechap += (100*chaptop.totalavailable);\r\n }\r\n });\r\n ch.totalavailablechap = totalavailablechap/100;\r\n ch.totalearnedchap = totalearnedchap/100;\r\n });\r\n //console.log($scope.Chapters);\r\n //////console.log(d.RS_2)\r\n $timeout(function(){\r\n $scope.Wait = false;\r\n },500);\r\n $timeout(function(){\r\n $anchorScroll.yOffset = 90;\r\n $anchorScroll();\r\n });\r\n\r\n });\r\n }\r\n });\r\n $scope.back = function () {\r\n $window.history.back();\r\n }\r\n $scope.$watch(\"id\", function (newval) {\r\n if(newval){\r\n $http.get(\"/api/Courses(\" + newval + \"L)/\").success(function (r) {\r\n ////console.log(r)\r\n //$scope.CourseLastPublished = 1*r.d.LastPublished.replace(/\\D/g,'');\r\n if (r.d.LastPublished != null) {\r\n $scope.CourseLastPublished = 1 * r.d.LastPublished.replace(/\\D/g, '');\r\n } else {\r\n $scope.CourseLastPublished = 0;\r\n }\r\n //$state.current.title = 'Earn CME - ' + r.d.Name;\r\n $scope.CourseHTML = r.d.HTML;\r\n $scope.CourseFromCourses = jQuery.grep($scope.Courses, function (e) {\r\n return e.Id == $scope.id.toString();\r\n });\r\n $http.post('/Execute/GetCourse',[newval]).success(function (cc) {\r\n if ($scope.CourseFromCourses[0].IsTrial == 'False') {\r\n $scope.CourseFromCourses[0].IsTrial = '0'\r\n }\r\n if ($scope.CourseFromCourses[0].IsTrial == 'True') {\r\n $scope.CourseFromCourses[0].IsTrial = '1'\r\n }\r\n $scope.CourseFromCourses[0].cmefree = cc.RS_0[0].cmefree;\r\n if($scope.CourseFromCourses[0].cmefree == 'True') {\r\n $scope.CourseFromCourses[0].FullProductInfo =\r\n jQuery.grep(Globals.FreeCmeCourses, function(fc){\r\n return fc.CourseId == $scope.CourseFromCourses[0].Id;\r\n })[0]\r\n } else {\r\n $scope.CourseFromCourses[0].FullProductInfo = false;\r\n }\r\n });\r\n\r\n ////console.log($scope.CourseFromCourses)\r\n //////console.log($scope.CourseLastPublished)\r\n });\r\n }\r\n\r\n });\r\n /*$http.get(\"/api/Courses(\" + $scope.id + \"L)/Name\").success(function (r) {\r\n //////console.log(r)\r\n\r\n });\r\n $http.get(\"/api/Courses(\"+$scope.id+\"L)/HTML\").success(function (r) {\r\n\r\n });*/\r\n //$http.post(\"/CurrentUser\").success(function (u) {\r\n //$scope.User = u;\r\n $http.post(\"/Execute/GetCMETypesForCourse\", [$scope.id]).success(function (data) {\r\n $scope.CMETypes = $filter('orderBy')(data.RS_0, 'Id');\r\n /*if($scope.CMETypes.length == 0) {\r\n $scope.CMETypes.push({'Id':0,'Name':'','Description':'No CME Available'})\r\n }*/\r\n if ($scope.tid) {\r\n angular.forEach($scope.CMETypes, function (t) {\r\n if (t.Id == $scope.tid) {\r\n $scope.selectedCMEType = t;\r\n }\r\n });\r\n }\r\n else {\r\n $scope.selectedCMEType = $scope.CMETypes[0];\r\n }\r\n });\r\n //});\r\n\r\n\r\n }\r\n }\r\n});\r\napp.directive('coursebychapter', function($parse,$http,$compile,$location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/pages/courseware/CourseByChapter.html',\r\n scope: {\r\n courseid: '='\r\n },\r\n controller: function($scope, $rootScope, $http, $compile, $state) {\r\n $scope.ChapterShowableByName = function(ChapName) {\r\n if (ChapName.indexOf('Exam Simulator') != -1) {\r\n return false;\r\n } else if (ChapName.indexOf('Chapter Exam') != -1) {\r\n return false;\r\n } else if (ChapName.indexOf('Comprehensive Exam') != -1) {\r\n return false;\r\n } else if (ChapName.indexOf('Pre-built Custom Exams') != -1) {\r\n return false;\r\n } else if (ChapName.indexOf('Clerkship Exam') != -1) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n $http.get(\"/api/Courses(\" + $scope.courseid +\"L)/CourseChapters?$expand=Chapter&$orderby=SortOrder\").success(function(d){\r\n $scope.Chapters = d.d;\r\n //console.log($scope.Chapters)\r\n })\r\n }\r\n }\r\n});\r\napp.directive('studychaptertopics', function($parse,$http,$compile,$location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/pages/courseware/StudyChapterTopics.html',\r\n scope: {\r\n courseid: '=',\r\n chapterid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $compile, $state) {\r\n $scope.User = $rootScope.User\r\n $http.post('/Execute/GetChapterChildren',[1*$scope.chapterid]).success(function(d){\r\n $scope.Topics = d.RS_0;\r\n //////console.log($scope.Topics);\r\n })\r\n }\r\n }\r\n});\r\napp.directive('backButton', function($parse, $http, $compile, $location, $window, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/backbutton.htm',\r\n scope: {\r\n label: '='\r\n },\r\n controller: function ($scope) {\r\n \r\n $scope.back = function () {\r\n ////console.log('loc', $location)\r\n //$rootScope.$on('$stateChangeStart', function (event, next) {\r\n // // //console.log(event, next)\r\n //})\r\n $window.history.back();\r\n }\r\n }\r\n }\r\n});\r\napp.directive('cmetopic', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/cmetopic.htm',\r\n scope: {\r\n id: '=',\r\n chapterid: '=',\r\n courseid: '='\r\n },\r\n controller: function ($scope, $http, $compile, $state, $window, $rootScope) {\r\n $scope.User = $rootScope.User\r\n $http.get(\"/api/Topics(\" + $scope.id + \"L)/Name\").success(function (r) {\r\n //////console.log(r)\r\n $state.current.title = r.d.Name\r\n });\r\n ////console.log($scope.id)\r\n $scope.editAssessment = false;\r\n $scope.editCME = false\r\n $scope.assessid = ''\r\n $scope.editAss = function (child) {\r\n child.editAssessment = !child.editAssessment\r\n $scope.editAssessment = child.editAssessment\r\n $scope.assessid = child.Id\r\n }\r\n $scope.editCMEs = function (child) {\r\n child.editCME = !child.editCME\r\n $scope.editCME = child.editCME\r\n $scope.assessid = child.Id\r\n }\r\n $http.post(\"/Execute/GetTopicForCME\", [$scope.id]).success(function (data) {\r\n //console.log(data)\r\n $scope.loadPractice = 0;\r\n $scope.LoadPractice = function () {\r\n $scope.loadPractice += 1;\r\n //////console.log($scope.loadPractice);\r\n }\r\n $scope.ImageLoader = ImageLoader;\r\n $scope.WinOpen = function (e, url, p1, p2) {\r\n //////console.log(url);\r\n }\r\n $scope.Topic = data.RS_0[0];\r\n if($scope.Topic.Content.length) {\r\n $scope.Topic.Content = JSON.parse($scope.Topic.Content);\r\n }else{\r\n $scope.Topic.Content = [];\r\n }\r\n\r\n //alert($scope.Topic.Content)\r\n $scope.Topic.Children = data.RS_1;\r\n angular.forEach($scope.Topic.Children, function (c) {\r\n //console.log(c)\r\n c.IsQP = (c.IsQP == 'True')\r\n if (c.IsQP == true) {\r\n c.editAssessment = false\r\n c.editCME = false\r\n //console.log(c.editAssessment)\r\n }\r\n c.HTML = c.HTML.replace(/Would you like to score it now?\",\r\n type: \"info\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes, Score Now\",\r\n cancelButtonText: \"No, Go Back\",\r\n html: true,\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.score();\r\n \r\n }\r\n });\r\n }\r\n });\r\n $scope.MovePrevious = function () {\r\n if ($scope.SelectQuestionIdx > 0) {\r\n $scope.SelectQuestion($scope.SelectQuestionIdx - 1)\r\n }\r\n }\r\n $scope.MoveNext = function () {\r\n if ($scope.SelectQuestionIdx < ($scope.UserAssessment.Questions.length - 1)) {\r\n $scope.SelectQuestion($scope.SelectQuestionIdx + 1)\r\n }\r\n }\r\n $scope.SelectedQColor = function (sq) {\r\n \r\n angular.forEach($scope.UserAssessment.Questions, function (ua) {\r\n \r\n if (ua == sq) {\r\n if (ua.HasAnswered == true) {\r\n if (ua.Flagged == true) {\r\n ua.DisplayClass = \"paginationbtncurrent paginationbtnanswered paginationbtnflagged\";\r\n } else {\r\n ua.DisplayClass = \" paginationbtncurrent paginationbtnanswered\";\r\n }\r\n\r\n }\r\n else {\r\n if (ua.Flagged == true) {\r\n ua.DisplayClass = \"paginationbtncurrent paginationbtnflagged\";\r\n } else {\r\n ua.DisplayClass = \"paginationbtncurrent paginationbtn\";\r\n }\r\n\r\n }\r\n //if (ua.HasAnswered == true && ua.Flagged == false) {\r\n // ua.DisplayClass = \"paginationbtncurrent paginationbtnanswered\";\r\n //}\r\n //if (ua.Flagged == true) {\r\n // ua.DisplayClass = \"paginationbtncurrent paginationbtnflagged\";\r\n //}\r\n //if (ua.HasAnswered == true && ua.Flagged == true) {\r\n // ua.DisplayClass = \"paginationbtncurrent paginationbtnanswered paginationbtnflagged\";\r\n //}\r\n //if (ua.HasAnswered == false && ua.Flagged == false) {\r\n // ua.DisplayClass = \"paginationbtncurrent\";\r\n //}\r\n }\r\n else {\r\n if (ua.HasAnswered == true) {\r\n if (ua.Flagged == true) {\r\n ua.DisplayClass = \"paginationbtnanswered paginationbtnflagged\";\r\n } else {\r\n ua.DisplayClass = \"paginationbtnanswered\";\r\n }\r\n\r\n }\r\n else {\r\n if (ua.Flagged == true) {\r\n ua.DisplayClass = \"paginationbtnflagged\";\r\n } else {\r\n ua.DisplayClass = \"paginationbtn\";\r\n }\r\n\r\n }\r\n }\r\n })\r\n ////console.log(sq)\r\n }\r\n $scope.SelectQuestion = function (idx,closeThingy) {\r\n $scope.goToTop(\"#content-top\");\r\n $scope.ql.questionloading = true;\r\n if (idx < 0) {\r\n idx = $scope.UserAssessment.Questions.length - 1\r\n }\r\n if ($scope.UserAssessment) {\r\n \r\n\r\n $scope.SelectQuestionIdx = idx;\r\n $scope.SelectedQuestion = $scope.UserAssessment.Questions[idx];\r\n\r\n \r\n // #$%^&% what a pain in the assessment to make this crap scroll properly\r\n var elem = document.getElementById(\"pgq-\" + idx);\r\n //var elemm = document.getElementById(\"pgm-\" + idx);\r\n var currpgq = angular.element(elem);\r\n //var currpgm = angular.element(elemm);\r\n var scrollpos = currpgq.prop('offsetTop');\r\n //var scrollposm = currpgm.prop('offsetTop');\r\n ////////console.log(scrollpos+' ++ '+ idx);\r\n if(closeThingy){\r\n $timeout(function(){\r\n $scope.pagiTogVisible = false;\r\n },350)\r\n\r\n }\r\n $(\"#paginatedqscroll\").animate({ scrollTop: scrollpos });\r\n ////console.log($scope.SelectedQuestion)\r\n //$http.post('/Execute/GetWeightedQuestionsForSection', [$scope.User.UserName, $scope.SelectedQuestion.SectionId, ($scope.custom) ? 1 : 0]).success(function (data) {\r\n // $scope.QuestionWeights = data.RS_0;\r\n // angular.forEach($scope.QuestionWeights, function (qw) {\r\n // if (qw.Id == $scope.SelectedQuestion.QuestionId) {\r\n // //console.log(qw)\r\n // $scope.SelectedQuestion.Weight = qw.Weight\r\n // }\r\n // })\r\n\r\n //})\r\n ////console.log($scope.SelectedQuestion)\r\n //$(\"#paginatedqscrollmobile\").animate({scrollTop: scrollposm});\r\n }\r\n $scope.SelectedQColor($scope.SelectedQuestion)\r\n \r\n $timeout(function(){\r\n $scope.ql.questionloading = false;\r\n },250)\r\n }\r\n $scope.toggleMobilePagination = function(showhide) {\r\n //$scope.mobpag.ShowMobilePagination = !$scope.mobpag.ShowMobilePagination;\r\n //var toggler = angular.element(document.querySelector('#mobileqlist'))\r\n }\r\n function getTimeRemaining(endtime) {\r\n var t = Date.parse(endtime) - Date.parse(new Date());\r\n var seconds = Math.floor((t / 1000) % 60);\r\n var minutes = Math.floor((t / 1000 / 60) % 60);\r\n var hours = Math.floor((t / (1000 * 60 * 60)) % 24);\r\n var days = Math.floor(t / (1000 * 60 * 60 * 24));\r\n return {\r\n 'total': t,\r\n 'days': days,\r\n 'hours': hours,\r\n 'minutes': minutes,\r\n 'seconds': seconds\r\n };\r\n }\r\n \r\n $scope.loadUserAssessment = function (id) {\r\n if (id) {\r\n $http.post('/Execute/GetUserAssessmentMinutes', [$scope.id, ($scope.custom)?1:0]).success(function (data) {\r\n $scope.Allocation = data.RS_0[0];\r\n //$scope.Allocation.AutoScoreDateTime = new Date($scope.Allocation.AutoScoreDateTime + \" UTC\")\r\n $scope.Allocation.AutoScoreDateTime = new Date();\r\n $scope.Allocation.AutoScoreDateTime.setSeconds($scope.Allocation.AutoScoreDateTime.getSeconds() + parseInt($scope.Allocation.RemainingSeconds));\r\n //console.log($scope.Allocation)\r\n $scope.FlaggedQuestions = data.RS_1;\r\n //console.log($scope.FlaggedQuestions)\r\n if ($scope.Allocation.MinutesAllocated > 0) {\r\n $scope.timer = setInterval(function () {\r\n var d = getTimeRemaining($scope.Allocation.AutoScoreDateTime)\r\n $scope.TimeRemaining = pad(d.hours,2) + \":\" + pad(d.minutes,2) + \":\" + pad(d.seconds,2) \r\n ////////console.log($scope.TimeRemaining)\r\n $scope.$apply()\r\n if (d.total <= 0) {\r\n clearInterval($scope.timer)\r\n var params = [];\r\n params[0] = $scope.UserAssessmentId.toString();\r\n params[1] = (($scope.custom == true) ? 1 : 0);\r\n $scope.Scoring = true\r\n $http.post(\"/Execute/ScoreUserAssessment\", params).success(function (dta) {\r\n //OLD//$window.history.back();\r\n if ($scope.custom == true) {\r\n $location.path(\"/customscrip/\" + $scope.UserAssessmentId).search('scored');\r\n //alert(\"/customscrip/\" + $scope.UserAssessmentId)\r\n } else {\r\n $location.path(\"/prescription/\" + $scope.UserAssessmentId).search('scored');\r\n //alert(\"/prescription/\" + $scope.UserAssessmentId)\r\n }\r\n });\r\n }\r\n var changing = function (event, next) {\r\n if (($scope.TimeRemaining && d.total > 0) && !$scope.Scoring) {\r\n ////console.log('test listener')\r\n event.returnValue = function () {\r\n return true\r\n }\r\n }\r\n }\r\n $rootScope.$on('$stateChangeStart', function (event, next) {\r\n ////console.log(next)\r\n //console.log($scope.Scoring)\r\n window.removeEventListener('beforeunload', changing)\r\n if (($scope.TimeRemaining && d.total > 0) && !$scope.Scoring) {\r\n event.preventDefault();\r\n swal({\r\n title: \"You are working on a timed exam. If you leave, the time will continue to countdown.\",\r\n text: \"Do you want to leave?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n if (next.url.search(':Id') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':Id', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n window.location.href = next.overrideurl\r\n }\r\n else if (next.url.search(':CourseId') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':CourseId', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n //$window.location.href = next.url\r\n window.location.href = next.overrideurl\r\n }\r\n else {\r\n //console.log(next.overrideurl)\r\n window.location.href = next.url\r\n }\r\n //$window.location.href = next.url\r\n }\r\n else if (result.dismiss === 'cancel') {\r\n window.addEventListener('beforeunload', changing)\r\n event.preventDefault();\r\n }\r\n })\r\n }\r\n });\r\n window.addEventListener('beforeunload', changing)\r\n }, 1000)\r\n }\r\n });\r\n //console.log('id', $scope.id)\r\n var url = '/api/UserAssessments(' + $scope.id + 'L)?$expand=Questions,Assessment/AssessmentType'\r\n if ($scope.custom == true) {\r\n //alert('custom')\r\n url = '/CustomUserAssessment/' + $scope.id\r\n }\r\n $http.get(url).success(function (data) {\r\n //console.log(data.d)\r\n $scope.UserAssessment = data.d;\r\n $scope.UserAssessment.ScoreLocked = false;\r\n if($scope.UserAssessment.EndDateTime){\r\n $scope.UserAssessment.ScoreLocked = true;\r\n swal({\r\n title: 'Error',\r\n text: 'You\\'ve already scored this assessment, it cannot be restarted. To try again, start a new assessment.',\r\n type: 'error'\r\n }, function() {\r\n $window.location.href = '/activity/score-log';\r\n });\r\n }\r\n if(!$scope.custom){\r\n if(1*$scope.UserAssessment.Assessment.AssessmentType.Id == 34){\r\n $scope.IsQuickQuiz = true;\r\n }\r\n }\r\n $scope.SelectQuestionIdx = -1\r\n ////console.log($scope.UserAssessment.Questions);\r\n angular.forEach($scope.UserAssessment.Questions, function (q, idx) {\r\n ////console.log(idx)\r\n angular.forEach($scope.FlaggedQuestions, function (fq) {\r\n if (fq.QuestionId == q.QuestionId) {\r\n q.Flagged = true\r\n } \r\n })\r\n var ans = q.AnswersJSON.replace(/\\n/g, \"\");\r\n try {\r\n q.Answers = $.parseJSON(ans);\r\n angular.forEach(q.Answers, function (a) {\r\n a.HTML = a.HTML.replace(/>/g, \">\");\r\n a.HTML = a.HTML.replace(/</g, \"<\");\r\n a.HTML = a.HTML.replace(/&#37;/g, \"%\");\r\n a.HTML = a.HTML.replace(/&/g, \"&\");\r\n a.HTML = a.HTML.chall_FixAmazonURL();\r\n if(q.MultiAnswer==true){\r\n var answArr = q.SelectedAnswerIdArray.split(',');\r\n if(answArr.indexOf(a.Id)!==-1){\r\n a.Selected = true;\r\n }\r\n\r\n }\r\n });\r\n if (q.HasAnswered == false && $scope.SelectQuestionIdx == -1) {\r\n $scope.SelectQuestionIdx = idx;\r\n }\r\n q.HTML = q.HTML.replace(/ 0) {\r\n swal({\r\n title: \"Score assessment or go to flagged questions?\",\r\n text: \"There are \" + flagged + \" flagged questions remaning.
Would you like to score now or review the flagged questions?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Score Now\",\r\n cancelButtonText: \"Go to first Flagged Q\",\r\n closeOnConfirm: false,\r\n html: true\r\n },\r\n function (isConfirm) {\r\n $timeout(function () {\r\n \r\n if (isConfirm) {\r\n \r\n if (unanswered > 0) {\r\n //console.log('flagged go to ')\r\n swal({\r\n title: \"Score assessment with unanswered questions?\",\r\n text: \"There are \" + unanswered + \" unanswered questions remaning.
Are you sure you want to proceed?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes, Score Anyway\",\r\n cancelButtonText: \"No, Go Back\",\r\n html: true,\r\n //closeOnConfirm: false\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.Scoring = true;\r\n $scope.doRealScore($scope.IsQuickQuiz);\r\n }\r\n })\r\n }\r\n else {\r\n swal.close()\r\n $scope.Scoring = true;\r\n $scope.doRealScore($scope.IsQuickQuiz);\r\n }\r\n\r\n }\r\n else {\r\n for (i = 0; i < $scope.UserAssessment.Questions.length; i++) {\r\n if ($scope.UserAssessment.Questions[i].Flagged == true) {\r\n //console.log($scope.UserAssessment.Questions[i])\r\n $scope.SelectQuestion(i, false)\r\n break;\r\n }\r\n }\r\n }\r\n })\r\n })\r\n }\r\n if (unanswered > 0 && flagged == 0) {\r\n swal({\r\n title: \"Score assessment with unanswered questions?\",\r\n text: \"There are \" + unanswered + \" unanswered questions remaning.
Are you sure you want to proceed?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes, Score Anyway\",\r\n cancelButtonText: \"No, Go Back\",\r\n html: true,\r\n //closeOnConfirm: false\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.Scoring = true;\r\n $scope.doRealScore($scope.IsQuickQuiz);\r\n }\r\n\r\n });\r\n }\r\n if (unanswered == 0 && flagged == 0) {\r\n $scope.Scoring = true;\r\n $scope.doRealScore($scope.IsQuickQuiz);\r\n }\r\n }\r\n //////console.log($scope.UserAssessmentId)\r\n $scope.doRealScore = function (qq) {\r\n var params = [];\r\n params[0] = $scope.UserAssessmentId.toString();\r\n params[1] = (($scope.custom == true) ? 1 : 0);\r\n $http.post(\"/Execute/ScoreUserAssessment\", params).success(function (dta) {\r\n if (qq) {\r\n //alert('qqscoring')\r\n $http.post(\"/Execute/GetQuickQuizForUser\", [$scope.User.UserName, $scope.UserAssessment.Assessment.Id, $scope.UserAssessment.CourseId]).success(function (data) {\r\n ////////////console.log(data)\r\n $scope.QQScoreResult = data.RS_0[0];\r\n //////////console.log($scope.QQScoreResult);\r\n var newpoints = 1 * $scope.QQScoreResult.Points;\r\n if (typeof $scope.UserSettings.QQHighScore === 'undefined') {\r\n var qqhigh = 0;\r\n } else {\r\n var qqhigh = 1 * $scope.UserSettings.QQHighScore;\r\n }\r\n ////console.log(\"QQHIGH: \"+qqhigh+\"; NEWPOINTS: \"+newpoints);\r\n if (newpoints > qqhigh) {\r\n $scope.UserSettings.QQHighScore = newpoints;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (dataff) {\r\n swal(\"New High Score\", \"Congratulations, you've logged a new personal best. Keep on rockin'!\", \"success\");\r\n //$uibModal.close;\r\n $rootScope.$emit(\"ReloadQQ\", \"\");\r\n $location.path(\"/prescription/\" + $scope.UserAssessmentId).search('scored');\r\n }).error(function (errrr) {\r\n ////////////console.log(\"proErr\")\r\n ////////////console.log(\"newpoints: \" + newpoints + \" qqhigh: \" + qqhigh)\r\n });\r\n } else {\r\n $uibModal.close;\r\n $rootScope.$emit(\"ReloadQQ\", \"\");\r\n $location.path(\"/prescription/\" + $scope.UserAssessmentId).search('scored');\r\n }\r\n });\r\n } else {\r\n $uibModal.close;\r\n $rootScope.$emit(\"ReloadQQ\", \"\");\r\n if($scope.custom == true) {\r\n $location.path(\"/customscrip/\" + $scope.UserAssessmentId).search('scored');\r\n //alert(\"/customscrip/\" + $scope.UserAssessmentId)\r\n } else {\r\n $location.path(\"/prescription/\" + $scope.UserAssessmentId).search('scored');\r\n //alert(\"/prescription/\" + $scope.UserAssessmentId)\r\n }\r\n\r\n ////console.log(\"/prescription/\" + $scope.UserAssessmentId + '/' + $scope.custom)\r\n }\r\n //OLD//$window.history.back();\r\n //$scope.ExitAssessment();\r\n }).error(function (err) {\r\n alert(\"Communication with Server has been lost. The Assessment Will Be Paused.\");\r\n //OLD//$window.history.back();\r\n $scope.ExitAssessment();\r\n //$scope.pause();\r\n //$location.path(\"/QuestionPool/\" + $scope.UserAssessment.CourseId + '/' + $scope.UserAssessment.ChapterId + '/' + $scope.UserAssessment.TopicId + '/' + $scope.UserAssessment.AssessmentId);\r\n });\r\n }\r\n $scope.$watch(\"id\", function (newval) {\r\n if ($scope.id) {\r\n $scope.loadUserAssessment($scope.id);\r\n }\r\n });\r\n }\r\n }\r\n});\r\napp.directive('simulatorhistory', function ($parse, $http, $compile) {\r\n //// Old?\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/simulatorhistory.htm',\r\n scope: {\r\n courseid: '=',\r\n chapterid: '=',\r\n topicid: '=',\r\n subtopicid: '=',\r\n assessmentid: '='\r\n },\r\n controller: function ($scope, $http, $location) {\r\n $scope.ResumeAssessment = function (Assessment) {\r\n $location.path(\"/assessment/\" + Assessment.Id);\r\n }\r\n $scope.$watch(\"courseid\", function (newval) {\r\n if ($scope.courseid) {\r\n //$http.post(\"/CurrentUser\").success(function (u) {\r\n $scope.User = $rootScope.User;\r\n\r\n var params = [$scope.User.UserName, $scope.courseid, $scope.chapterid, $scope.topicid, $scope.subtopicid, $scope.assessmentid]\r\n //console.log(params);\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n $scope.Complete = data.RS_0;\r\n $scope.InProgress = data.RS_1;\r\n });\r\n //});\r\n }\r\n });\r\n }\r\n }\r\n});\r\napp.directive('assessmenthistory', function ($parse, $http, $compile, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/assessmenthistory.htm',\r\n scope: {\r\n courseid: '=',\r\n chapterid: '=',\r\n topicid: '=',\r\n subtopicid: '=',\r\n assessmentid: '=',\r\n assessmenttype: '=',\r\n canbecrash: '=',\r\n custom: '='\r\n },\r\n controller: function ($scope, $http, $location) {\r\n $scope.User = $rootScope.User;\r\n ////console.log($scope.User)\r\n $scope.Predicate = 'SortDateTime';\r\n $scope.Reverse = true;\r\n $scope.chSort = function(p) {\r\n var switchIt = ($scope.Predicate == p);\r\n if(switchIt){\r\n $scope.Reverse = !$scope.Reverse; \r\n }\r\n $scope.Predicate = p;\r\n } \r\n var Today = new Date();\r\n $scope.Today = Today\r\n $scope.editAssessment = false;\r\n $scope.editAss = function () {\r\n $scope.editAssessment = !$scope.editAssessment\r\n }\r\n //var Today = new Date(Todays + ' UTC')\r\n //$scope.custom = custom;\r\n $scope.ResumeAssessment = function (Assessment) {\r\n if ($scope.custom) {\r\n $location.path(\"/customassessment/\" + Assessment.Id);\r\n } else {\r\n $location.path(\"/assessment/\" + Assessment.Id);\r\n }\r\n }\r\n \r\n if (!$scope.custom && $scope.courseid == \"0\") {\r\n $scope.custom = true;\r\n }\r\n $scope.gotocustomreview = function () {\r\n $location.path(\"/customexam/\" + $scope.assessmentid + \"/review\")\r\n }\r\n ////console.log($scope.custom)\r\n $scope.Wait = false\r\n $scope.StartAssessment = function (IsCrash) {\r\n $scope.ShowLoad = true;\r\n $scope.Wait = true;\r\n var params = [$scope.User.UserName, $scope.courseid, $scope.chapterid, $scope.topicid, $scope.subtopicid || \"0\", $scope.assessmentid, CurrentUserTZoffsett]\r\n ////console.log('params', params)\r\n if ($scope.AssignmentsExist && $scope.Assignments.HasViewability && $scope.Viewabilty && $scope.Viewabilty.MinutesAllocated && $scope.Viewabilty.MinutesAllocated > 0 && new Date($scope.Assignments.EffectiveDateTime + ' UTC') > Today && new Date($scope.Assignments.DueDateTime + ' UTC') < Today) {\r\n if (confirm(\"This Assessment will be automatically scored in \" + $scope.Viewabilty.MinutesAllocated +\" Minute. Are you ready to start?\")) {\r\n if ($scope.custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n if ($scope.custom) {\r\n if (IsCrash) {\r\n $http.post(\"/Execute/StartNewCustomCrashAssessment\", params).success(function (data) {\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //console.log('custom exam', data)\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n } else {\r\n if (IsCrash) {\r\n $http.post(\"/Execute/StartNewCrashAssessment\", params).success(function (data) {\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n }\r\n $scope.ViewPrescription = function (Completed) {\r\n if ($scope.custom) {\r\n $location.path(\"/customscrip/\" + Completed.Id);\r\n } else {\r\n $location.path(\"/prescription/\" + Completed.Id);\r\n }\r\n }\r\n $scope.$watch(\"courseid\", function (newval) {\r\n if ($scope.courseid || $scope.courseid===0) {\r\n var params = [$scope.User.UserName, $scope.courseid, $scope.chapterid, $scope.topicid || \"0\", $scope.subtopicid || \"0\", $scope.assessmentid, (($scope.custom == true) ? 1 : 0)]\r\n ////console.log([$scope.User.UserName, $scope.assessmentid, $scope.custom])\r\n $scope.questats = {};\r\n ////console.log([$scope.User.UserName, $scope.assessmentid, ($scope.custom ? true : false)])\r\n\r\n $http.post(\"/Execute/AssessmentQuestionStatsForUser\", [$scope.User.UserName, $scope.assessmentid, ($scope.custom?true:false)]).success(function(data){\r\n $scope.questats = {\r\n answered: (1*data.RS_1[0].AnsweredCount),\r\n unanswered: (1*data.RS_1[0].UnAnsweredCount),\r\n total: (1*data.RS_1[0].AnsweredCount+1*data.RS_1[0].UnAnsweredCount)\r\n }\r\n })\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n /*$scope.Predicate = $scope.Predicate;\r\n $scope.Reverse = $scope.Reverse;*/\r\n $scope.Complete = data.RS_0;\r\n \r\n angular.forEach($scope.Complete, function (com) {\r\n com.EndDateTime = new Date(com.EndDateTime + \" UTC\");\r\n com.StartDateTime = new Date(com.StartDateTime + \" UTC\");\r\n com.SortDateTime = com.EndDateTime;\r\n com.Score = 1*com.Score;\r\n com.Scored = true;\r\n });\r\n $scope.InProgress = data.RS_1;\r\n angular.forEach($scope.InProgress, function (inp) {\r\n inp.StartDateTime = new Date(inp.StartDateTime + \" UTC\");\r\n inp.SortDateTime = inp.StartDateTime;\r\n inp.Score = 1*inp.Score;\r\n inp.Scored = false;\r\n });\r\n\r\n $scope.AllHistory = $scope.Complete.concat($scope.InProgress);\r\n ////console.log($scope.AllHistory);\r\n if (data.RS_3) {\r\n ////console.log(params)\r\n $scope.Viewabilty = data.RS_3[0];\r\n $scope.Assignments = data.RS_2[0];\r\n $scope.QuestionStats = data.RS_4[0];\r\n ////console.log($scope.Viewabilty.Viewable)\r\n ////console.log($scope.QuestionStats)\r\n $scope.AssignmentsExist = false;\r\n //$scope.HasViewability = true;\r\n if(data.RS_2.length) {\r\n $scope.AssignmentsExist = true;\r\n $scope.Assignments.EffectiveDateTime = new Date($scope.Assignments.EffectiveDateTime + ' UTC');\r\n $scope.Assignments.DueDateTime = new Date($scope.Assignments.DueDateTime + ' UTC')\r\n if ($scope.Assignments.Viewablity == 3) {\r\n\r\n ////console.log($scope.Assignments.EffectiveDateTime, $scope.Assignments.DueDateTime, Today)\r\n $scope.Assignments.HasViewability = $scope.Assignments.EffectiveDateTime < Today && $scope.Assignments.DueDateTime > Today;\r\n }\r\n if ($scope.Assignments.Viewablity == 2) {\r\n\r\n $scope.Assignments.HasViewability = $scope.Assignments.EffectiveDateTime < Today;\r\n ////console.log($scope.Assignments)\r\n\r\n }\r\n if ($scope.Assignments.Viewablity == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n\r\n }\r\n }\r\n\r\n }\r\n else {\r\n $scope.Assignments = data.RS_2[0];\r\n if ($scope.Assignments.Viewable && $scope.Assignments.Viewable == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n }\r\n $scope.AssStats = data.RS_4[0];\r\n \r\n \r\n ////console.log(data)\r\n \r\n\r\n ////console.log($scope.Assignments)\r\n if ($scope.Viewabilty) {\r\n if ($scope.Viewabilty.ShowLeaderBoard == '') {\r\n $scope.Viewabilty.ShowLeaderBoard = '0'\r\n }\r\n if ($scope.Viewabilty.PrescriptiveReport == '') {\r\n $scope.Viewabilty.PrescriptiveReport = '1'\r\n }\r\n if ($scope.Viewabilty.MinutesAllocated == '') {\r\n $scope.Viewabilty.MinutesAllocated = '0'\r\n }\r\n }\r\n ////console.log($scope.Viewabilty)\r\n });\r\n \r\n }\r\n });\r\n }\r\n }\r\n});\r\napp.directive('questionpool', function ($parse, $http, $compile, $rootScope, $timeout) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/questionpool.htm',\r\n scope: {\r\n id: '=',\r\n chapterid: '=',\r\n courseid: '=',\r\n topicid: '=',\r\n selectedtab: '=',\r\n },\r\n controller: function ($scope, $http, $compile, $location, $state, $timeout) {\r\n $scope.PopLinkies = function() {\r\n $timeout(function(){\r\n jQuery('a')\r\n .filter('[href^=\"http\"], [href^=\"//\"]')\r\n .not('[href*=\"' + window.location.host + '\"]')\r\n .attr('rel', 'noopener noreferrer')\r\n .attr('target', '_blank');\r\n })\r\n\r\n };\r\n\r\n $timeout(function() {\r\n ////console.log('SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS')\r\n $scope.PopLinkies();\r\n\r\n })\r\n $scope.SelectedTabIndex = -1;\r\n if ($scope.courseid == 0) { $scope.src = 0 } else { $scope.src = 1 };\r\n $scope.ImageLoader = ImageLoader;\r\n $rootScope.courseid = $scope.courseid;\r\n $rootScope.chapterid = $scope.chapterid;\r\n $rootScope.topicid = $scope.topicid;\r\n $scope.View = {}\r\n $scope.User = $rootScope.User;\r\n $http.post(\"/Execute/GetTopicForCME\", [$scope.topicid]).success(function (data) {\r\n //console.log(data)\r\n angular.forEach(data.RS_1, function (qp) {\r\n if (qp.IsQP == \"True\") {\r\n $scope.Whattoshow = qp;\r\n }\r\n })\r\n \r\n //console.log($scope.Whattoshow)\r\n })\r\n \r\n $scope.$watch('id', function (n, o) {\r\n if ($scope.id) {\r\n if ($scope.courseid == 0) { $scope.src = 0 } else { $scope.src = 1 };\r\n var params = [$scope.id.toString(), $scope.courseid.toString(), $scope.chapterid.toString(), $scope.topicid.toString(), $rootScope.User.UserId]\r\n //console.log(params)\r\n $http.post(\"/Execute/GetAssessment\", params).success(function (result) {\r\n //console.log(result)\r\n $scope.Assessment = result.RS_0[0];\r\n //console.log('ass', $scope.Assessment)\r\n $scope.View = result.RS_1[0];\r\n //console.log($scope.View)\r\n if ($scope.View.Viewable == \"\") {\r\n $scope.View.Viewable = '1'\r\n }\r\n if ($scope.View.DisplayPracticeReview == \"\") {\r\n $scope.View.DisplayPracticeReview = '1'\r\n }\r\n \r\n $rootScope.Assessment = $scope.Assessment;\r\n $state.current.title = 'Assessment - ' + $scope.Assessment.Name\r\n if ($scope.View.DisplayPracticeReview == 0) {\r\n $scope.SelectedTabIndex = 2;\r\n } else {\r\n $scope.LoadTab();\r\n //if ($scope.courseid !== '1106') {\r\n // $scope.SelectedTabIndex = 0;\r\n //} else {\r\n // $scope.SelectedTabIndex = 2;\r\n //}\r\n }\r\n //$scope.LoadTab();\r\n });\r\n }\r\n });\r\n $scope.UpdateUrl = function (idx) {\r\n //debugger\r\n ////console.log(idx)\r\n if ($scope.View) {\r\n //////console.log($scope.View)\r\n switch (idx) {\r\n case 1:\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Practice')\r\n break;\r\n case 2:\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Review')\r\n break;\r\n case 3:\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Assessment')\r\n break;\r\n case 4:\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Leaderboard')\r\n break;\r\n default:\r\n if ($scope.View.DisplayPracticeReview == '1') {\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Practice')\r\n } else {\r\n $location.url('/QuestionPool/' + $scope.id + '/' + $scope.courseid + '/' + $scope.chapterid + '/' + $scope.topicid + '/Assessment')\r\n }\r\n }\r\n }\r\n };\r\n $scope.LoadTab = function () {\r\n //////console.log($scope.selectedtab)\r\n if (typeof $scope.selectedtab !== 'undefined') {\r\n switch ($scope.selectedtab) {\r\n case 'Practice':\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n case 'Review':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case 'Assessment':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case 'Leaderboard':\r\n $scope.SelectedTabIndex = 3;\r\n }\r\n }\r\n };\r\n \r\n },\r\n link: function($scope) {\r\n //var watch = $scope.$watch('selectedtab', function() {\r\n //$scope.$evalAsync(function() {\r\n $timeout(function() {\r\n $scope.PopLinkies();\r\n\r\n })\r\n //})\r\n\r\n }\r\n\r\n }\r\n});\r\napp.directive('review', function ($parse, $http, $compile,$rootScope,$timeout) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/Review.htm',\r\n scope: {\r\n assessmentid: '=',\r\n src: '=',\r\n },\r\n controller: function ($scope, $http, $rootScope, $window, $timeout) {\r\n $scope.PopLinkies = function() {\r\n $timeout(function(){\r\n jQuery('a')\r\n .filter('[href^=\"http\"], [href^=\"//\"]')\r\n .not('[href*=\"' + window.location.host + '\"]')\r\n .attr('rel', 'noopener noreferrer')\r\n .attr('target', '_blank');\r\n })\r\n\r\n };\r\n\r\n $timeout(function() {\r\n ////console.log('SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS')\r\n $scope.PopLinkies();\r\n\r\n })\r\n //console.log($scope.assessmentid, $scope.src)\r\n $scope.GoToTop = function(){\r\n $window.scrollTo(0, 0);\r\n }\r\n $scope.ImageLoader = ImageLoader;\r\n $scope.User = $rootScope.User;\r\n $scope.NextSection = function () {\r\n if ($scope.SectionIndex + 1 < $scope.Sections.length) {\r\n $scope.SectionIndex += 1\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n }\r\n }\r\n $scope.PreviousSection = function () {\r\n if ($scope.SectionIndex > 0) {\r\n $scope.SectionIndex -= 1\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n }\r\n }\r\n $scope.changeSection = function (sec) {\r\n $scope.Section = sec\r\n //console.log(sec)\r\n }\r\n $scope.loadqp = function () {\r\n //console.log('src', $scope.src, $scope.assessmentid)\r\n $scope.loading = true;\r\n if ($scope.Section) { delete $scope.Section }\r\n if ($scope.assessmentid) {\r\n $http.post(\"/Execute/GetPracticeAndReviewSections\", [$scope.assessmentid, $scope.src]).success(function (result) {\r\n //console.log('first', result)\r\n var sec = result.RS_0;\r\n angular.forEach(sec, function (s) {\r\n $http.post(\"/Execute/GetPracticeAndReviewSectionQuestions\", [s.Id, $scope.src]).success(function (result) {\r\n //console.log('result', result.RS_0)\r\n s.SectionQuestions = result.RS_0\r\n angular.forEach(s.SectionQuestions, function (sq) {\r\n try {\r\n sq.Question = JSON.parse(sq.Question)\r\n sq.Question.CorrectRemediation = sq.CorrectRemediation.chall_FixAmazonURL()\r\n sq.Question.editQ = false\r\n delete sq.CorrectRemediation\r\n sq.Question.IncorrectRemediation = sq.IncorrectRemediation.chall_FixAmazonURL()\r\n delete sq.IncorrectRemediation;\r\n if (sq.LastReview) {\r\n sq.LastReview = new Date(sq.LastReview)\r\n }\r\n \r\n if (sq.SourceTypeId == '1') {\r\n sq.Question.IsCustom = false\r\n //console.log('custom', sq.Question.IsCustom)\r\n }\r\n else {\r\n sq.Question.IsCustom = true\r\n }\r\n sq.Question.HTML = sq.Question.HTML.chall_FixAmazonURL();\r\n angular.forEach(sq.Question.Answers, function(sqa){\r\n sqa.HTML = sqa.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&').chall_FixAmazonURL();\r\n })\r\n } catch (e) {\r\n //////console.log(sq.Question)\r\n }\r\n });\r\n });\r\n });\r\n $scope.Sections = sec;\r\n $scope.SectionIndex = 0;\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n $scope.loading = false;\r\n $scope.$emit('dataloaded');\r\n });\r\n }\r\n }\r\n $scope.$watch('assessmentid', function (n, o) {\r\n $scope.loadqp();\r\n });\r\n },\r\n link: function($scope,element,attrs) {\r\n var watch = $scope.$watch('Section', function() {\r\n //console.log(\"SECTION\")\r\n $scope.$evalAsync(function() {\r\n //$timeout(function() {\r\n $scope.PopLinkies();\r\n\r\n })\r\n })\r\n\r\n }\r\n }\r\n});\r\napp.directive('externalLinkCrap', ['$timeout', function ($timeout) {\r\n return {\r\n link: function ($scope, element, attrs) {\r\n //console.log('ELC FIRED')\r\n $scope.$on('dataloaded', function () {\r\n $timeout(function () {\r\n //console.log('BCAST DATALOADED')\r\n jQuery('a')\r\n .filter('[href^=\"http\"], [href^=\"//\"]')\r\n .not('[href*=\"' + window.location.host + '\"]')\r\n .attr('rel', 'noopener noreferrer')\r\n .attr('target', '_blank');\r\n }, 200, false);\r\n })\r\n }\r\n };\r\n}]);\r\n\r\napp.directive('inlineQuestion', function($parse,$http,$compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/inlineQuestion.html',\r\n scope: {\r\n questionid: '=',\r\n displaymode: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $window, $timeout) {\r\n $scope.IsCheater = $rootScope.IsCheater;\r\n $scope.CheckAnswer = function (querstion) {\r\n //////console.log(querstion)\r\n if (!querstion.Tries) { querstion.Tries = 0 }\r\n querstion.Tries += 1;\r\n querstion.RemainingTries = (2 - querstion.Tries);\r\n if (querstion.Tries > 1) {\r\n querstion.Disabled = true;\r\n }\r\n if (querstion.MultiAnswer == true) {\r\n querstion.Correct = true;\r\n $.each(querstion.Answers, function (idx, ans) {\r\n //alert(ans.IsCorrect + \":\" + querstion.Selected)\r\n if (ans.IsCorrect != ans.Selected) {\r\n querstion.Correct = false;\r\n }\r\n });\r\n }\r\n else {\r\n querstion.Correct = false;\r\n $.each(querstion.Answers, function (idx, ans) {\r\n if (ans.IsCorrect == true && querstion.SelectedAnswerId == ans.Id) {\r\n querstion.Correct = true;\r\n }\r\n });\r\n }\r\n if (querstion.Correct == true) {\r\n querstion.Message = \"Correct\";\r\n querstion.Disabled = true;\r\n querstion.Remediation = querstion.CorrectRemediation;\r\n\r\n }\r\n else {\r\n querstion.Message = \"Incorrect\";\r\n if (querstion.Disabled == true) {\r\n querstion.Remediation = querstion.IncorrectRemediation;\r\n }\r\n }\r\n $scope.$emit('dataloaded');\r\n }\r\n $scope.loadQuestion = function() {\r\n $http.post(\"/Execute/GetQuestion\", [$scope.questionid, 1]).success(function (result) {\r\n $scope.Question = result.RS_0[0];\r\n $scope.Question.Question = JSON.parse($scope.Question.Question);\r\n\r\n $scope.Question.Question.editQ = false\r\n $scope.Question.Question.CorrectRemediation = $scope.Question.CorrectRemediation.chall_FixAmazonURL();\r\n delete $scope.Question.CorrectRemediation\r\n $scope.Question.Question.IncorrectRemediation = $scope.Question.IncorrectRemediation.chall_FixAmazonURL();\r\n delete $scope.Question.IncorrectRemediation\r\n ////console.log(sq.LastReview)\r\n if ($scope.Question.LastReview) {\r\n $scope.Question.LastReview = new Date(sq.LastReview)\r\n }\r\n $scope.Question.Question.HTML = $scope.Question.Question.HTML.chall_FixAmazonURL();\r\n angular.forEach($scope.Question.Question.Answers, function(sqa){\r\n sqa.HTML = sqa.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&').chall_FixAmazonURL();\r\n })\r\n\r\n console.log($scope.Question);\r\n });\r\n }\r\n $scope.loadQuestion();\r\n\r\n }\r\n }\r\n})\r\napp.directive('practice', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/Practice.htm',\r\n scope: {\r\n assessmentid: '=',\r\n src: '=',\r\n load: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $window, $timeout) {\r\n $scope.PopLinkies = function() {\r\n $timeout(function(){\r\n jQuery('a')\r\n .filter('[href^=\"http\"], [href^=\"//\"]')\r\n .not('[href*=\"' + window.location.host + '\"]')\r\n .attr('rel', 'noopener noreferrer')\r\n .attr('target', '_blank');\r\n })\r\n\r\n };\r\n\r\n $timeout(function() {\r\n ////console.log('SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS')\r\n $scope.PopLinkies();\r\n\r\n })\r\n $scope.GoToTop = function() {\r\n $window.scrollTo(0, 0);\r\n }\r\n $scope.IsCheater = $rootScope.IsCheater;\r\n $scope.ImageLoader = ImageLoader;\r\n $scope.User = $rootScope.User;\r\n $scope.CheckAnswer = function (querstion) {\r\n //////console.log(querstion)\r\n if (!querstion.Tries) { querstion.Tries = 0 }\r\n querstion.Tries += 1;\r\n querstion.RemainingTries = (2 - querstion.Tries);\r\n if (querstion.Tries > 1) {\r\n querstion.Disabled = true;\r\n }\r\n if (querstion.MultiAnswer == true) {\r\n querstion.Correct = true;\r\n $.each(querstion.Answers, function (idx, ans) {\r\n //alert(ans.IsCorrect + \":\" + querstion.Selected)\r\n if (ans.IsCorrect != ans.Selected) {\r\n querstion.Correct = false;\r\n }\r\n });\r\n }\r\n else {\r\n querstion.Correct = false;\r\n $.each(querstion.Answers, function (idx, ans) {\r\n if (ans.IsCorrect == true && querstion.SelectedAnswerId == ans.Id) {\r\n querstion.Correct = true;\r\n }\r\n });\r\n }\r\n if (querstion.Correct == true) {\r\n querstion.Message = \"Correct\";\r\n querstion.Disabled = true;\r\n querstion.Remediation = querstion.CorrectRemediation;\r\n\r\n }\r\n else {\r\n querstion.Message = \"Incorrect\";\r\n if (querstion.Disabled == true) {\r\n querstion.Remediation = querstion.IncorrectRemediation;\r\n }\r\n }\r\n $scope.$emit('dataloaded');\r\n }\r\n /*$scope.$watch('assessmentid', function (n, o) {\r\n\r\n });*/\r\n $scope.NextSection = function () {\r\n if ($scope.SectionIndex + 1 < $scope.Sections.length) {\r\n $scope.SectionIndex += 1\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n }\r\n }\r\n $scope.PreviousSection = function () {\r\n if ($scope.SectionIndex > 0) {\r\n $scope.SectionIndex -= 1\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n }\r\n }\r\n $scope.loadqp = function () {\r\n //$scope.loading = true;\r\n if ($scope.Section) { delete $scope.Section}\r\n if ($scope.assessmentid) {\r\n $http.post(\"/Execute/GetPracticeAndReviewSections\", [$scope.assessmentid, $scope.src]).success(function (result) {\r\n var sec = result.RS_0;\r\n angular.forEach(sec, function (s) {\r\n $http.post(\"/Execute/GetPracticeAndReviewSectionQuestions\", [s.Id, $scope.src]).success(function (result) {\r\n s.SectionQuestions = result.RS_0\r\n //console.log(s.SectionQuestions)\r\n angular.forEach(s.SectionQuestions, function (sq) {\r\n try {\r\n sq.Question = JSON.parse(sq.Question)\r\n sq.Question.editQ = false\r\n sq.Question.CorrectRemediation = sq.CorrectRemediation.chall_FixAmazonURL();\r\n delete sq.CorrectRemediation \r\n sq.Question.IncorrectRemediation = sq.IncorrectRemediation.chall_FixAmazonURL();\r\n delete sq.IncorrectRemediation\r\n ////console.log(sq.LastReview)\r\n if (sq.LastReview) {\r\n sq.LastReview = new Date(sq.LastReview)\r\n }\r\n sq.Question.HTML = sq.Question.HTML.chall_FixAmazonURL();\r\n angular.forEach(sq.Question.Answers, function(sqa){\r\n sqa.HTML = sqa.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&').chall_FixAmazonURL();\r\n })\r\n } catch (e) {\r\n //////console.log(sq.Question)\r\n }\r\n });\r\n \r\n });\r\n });\r\n $scope.Sections = sec;\r\n $scope.SectionIndex = 0;\r\n $scope.Section = $scope.Sections[$scope.SectionIndex]\r\n ////console.log($scope.Section)\r\n //$scope.loading = false;\r\n });\r\n }\r\n }\r\n $scope.$watch('load', function (n, o) {\r\n $scope.loadqp();\r\n }\r\n );\r\n }\r\n }\r\n});\r\napp.directive('reviewq', function ($parse, $http, $compile, $uibModal, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/ReviewQuestionButton.htm',\r\n scope: {\r\n question: '=',\r\n index: '=',\r\n iscustom: '='\r\n },\r\n controller: function ($scope, $http) {\r\n ////console.log($scope.question)\r\n \r\n var q = $scope.question;\r\n if (!$scope.iscustom) {\r\n q.iscustomq = false\r\n }\r\n else {\r\n q.iscustomq = $scope.iscustom\r\n }\r\n ////console.log('custom?', q.iscustomq)\r\n var idx = $scope.index;\r\n ////console.log($scope.question)\r\n if ($scope.question.QuestionId === undefined || $scope.question.QuestionId === null) {\r\n $scope.question.QuestionId = $scope.question.Id;\r\n };\r\n if ($scope.question.Answers === undefined || $scope.question.Answers === null) {\r\n if ($scope.question.Column1) {\r\n $scope.question.Answers = JSON.parse($scope.question.Column1)\r\n }\r\n }\r\n $scope.User = $rootScope.User;\r\n ////////console.log($scope.User)\r\n ////////console.log($scope.question)\r\n $http.post(\"/Execute/IsQuestionUnderReview\", [q.QuestionId, ((q.iscustomq == true) ? 1 : 0)]).success(function (resp) {\r\n var QunderR = resp.RS_0[0].Result;\r\n if (QunderR === 'True') {\r\n $scope.UnderReview = true;\r\n }else{\r\n $scope.UnderReview = false;\r\n }\r\n });\r\n $scope.ReportQuestion = function (q, idx) {\r\n if (idx === undefined || idx === null) {\r\n idx = 0;\r\n }\r\n ////console.log(q);\r\n $http.post(\"/Execute/IsQuestionUnderReview\", [q.QuestionId, ((q.iscustomq == true) ? 1 : 0)]).success(function (resp) {\r\n var QunderR = resp.RS_0[0].Result;\r\n if (QunderR === 'True') {\r\n swal({\r\n title: \"Question Under Review\",\r\n text: \"We have received feedback from other users regarding this question, and it is currently under review by our staff.\",\r\n type: \"info\"\r\n });\r\n } else {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: '/app/tpls/QuestionFeedback.htm',\r\n size: 'xlg-dark',\r\n controller: function ($scope, $http, $rootScope, items, App) {\r\n $scope.Question = items.question;\r\n //console.log('custom?', q.iscustomq)\r\n \r\n if (items.CourseId === undefined) {\r\n $scope.CourseId = $rootScope.courseid\r\n }\r\n else {\r\n $scope.CourseId = items.CourseId;\r\n }\r\n if (items.ChapterId === undefined) {\r\n $scope.ChapterId = $rootScope.chapterid;\r\n }\r\n else {\r\n $scope.ChapterId = items.ChapterId;\r\n }\r\n if (items.TopicId === undefined) {\r\n $scope.TopicId = $rootScope.topicid;\r\n }\r\n else {\r\n $scope.TopicId = items.TopicId;\r\n }\r\n if (items.SubTopicId == undefined) {\r\n if (!$rootScope.subtopicid) {\r\n $scope.SubTopicId = 0\r\n }\r\n else {\r\n $scope.SubTopicId = $rootScope.subtopicid\r\n }\r\n \r\n }\r\n else {\r\n $scope.SubTopicId = items.SubTopicId;\r\n }\r\n \r\n if (items.AssessmentId === undefined) {\r\n if ($rootScope.Assessment !== undefined) {\r\n $scope.AssessmentId = $rootScope.Assessment.Id;\r\n }\r\n else {\r\n $scope.AssessmentId = q.Name;\r\n }\r\n }\r\n else {\r\n $scope.AssessmentId = items.AssessmentId;\r\n }\r\n $scope.Question.UserComments = \"\";\r\n\r\n $scope.UpdateUserComments = function (e) {\r\n //////////////console.log(e)\r\n //$scope.Question.UserComments = e.currentTarget.value;\r\n }\r\n if (q.iscustomq && $scope.CourseId == undefined) {\r\n $scope.CourseId = \"0\"\r\n $scope.ChapterId = \"0\"\r\n $scope.TopicId = \"0\"\r\n $scope.SubTopicId = \"0\"\r\n $scope.AssessmentId = \"0\"\r\n }\r\n //console.log($scope.CourseId)\r\n $scope.ok = function () {\r\n var pathIds = [];\r\n pathIds[0] = $scope.Question.QuestionId;\r\n pathIds[1] = $scope.User.UserName;\r\n pathIds[2] = $scope.CourseId;\r\n pathIds[3] = $scope.ChapterId;\r\n pathIds[4] = $scope.TopicId;\r\n pathIds[5] = $scope.SubTopicId; // ?\r\n pathIds[6] = $scope.AssessmentId;\r\n pathIds[7] = idx;\r\n pathIds[8] = $scope.Question.UserComments;\r\n pathIds[9] = $scope.Question.iscustomq\r\n //console.log(pathIds);\r\n $http.post(\"/Execute/SendContentErrorReport\", pathIds).success(function (data) {\r\n if ($scope.Question.iscustomq == false) {\r\n alert(\"Thank you for your Question Report submission - We're on it.\\n\\nYour satisfaction is very important to us. We will review your comments and take appropriate editorial steps, as warranted by our editorial board of board-certified physician educators.\\n\\nIf we have any further questions regarding this submission, we will contact you shortly via email. If not, please know your findings are being attended to and any corrective actions are occurring as fast as possible.\\n\\nWe update our courses daily, so once we have a resolution, any corrections will appear automatically in your content assets.\\n\\nThank you,\\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n }\r\n else {\r\n alert(\"Thank you for your Question Report submission.\\n\\nThe Author of this question has been notified of your report, and any appropri. Thank you. \");\r\n }\r\n $scope.close();\r\n });\r\n }\r\n $scope.close = function () {\r\n modalInstance.close();\r\n }\r\n },\r\n resolve: {\r\n items: function ()\r\n {\r\n return {\r\n question: q,\r\n CourseId: ((q.CourseId) ? \"0\" : q.CourseId),\r\n ChapterId: ((q.ChapterId) ? \"0\" : q.ChapterId),\r\n TopicId: ((q.TopicId) ? \"0\" : q.TopicId),\r\n SubTopicId: ((q.SubTopicId) ? \"0\" : q.SubTopicId),\r\n AssessmentId: ((q.AssessmentId) ? \"0\" : q.AssessmentId)\r\n }\r\n }\r\n }\r\n });\r\n }\r\n });\r\n\r\n }\r\n }\r\n }\r\n});\r\napp.directive('numbersOnly', function () {\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attr, ngModelCtrl) {\r\n function fromUser(text) {\r\n if (text) {\r\n var transformedInput = text.replace(/[^0-9]/g, '');\r\n\r\n if (transformedInput !== text) {\r\n ngModelCtrl.$setViewValue(transformedInput);\r\n ngModelCtrl.$render();\r\n }\r\n return transformedInput;\r\n }\r\n return undefined;\r\n }\r\n ngModelCtrl.$parsers.push(fromUser);\r\n }\r\n };\r\n});\r\napp.directive('paymentoptions', function () {\r\n return {\r\n restrict: 'E',\r\n //replace: true,\r\n templateUrl: 'app/pages/profile/paymentoptions.html',\r\n scope: {\r\n forcheckout: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $cookies, $cookieStore, $timeout) {\r\n $scope.PmtLoading=true;\r\n if($scope.user) {\r\n //console.log($scope.user)\r\n }\r\n $scope.User = $rootScope.User;\r\n $scope.SetDefaultPayment = function (payId) {\r\n var params\r\n if ($scope.user) {\r\n params = [payId, $scope.user.UserId]\r\n } else {\r\n params = [payId]\r\n }\r\n $http.post(\"/SetDefaultPayment\", [params]).success(function (data) {\r\n ////console.log(data);\r\n });\r\n }\r\n $scope.IsExpired = function(exp) {\r\n if(exp){\r\n var expArr = exp.split('/');\r\n var now = new Date();\r\n var disMonth = new Date(now.getFullYear(),now.getMonth(),1);\r\n var expD = new Date(expArr[1],(expArr[0]-1),1);\r\n return (expD < disMonth);\r\n }else{\r\n return false;\r\n }\r\n }\r\n $scope.DeletePaymentOption = function (payId) {\r\n var params\r\n //var payId = 1*payId;\r\n if ($scope.user) {\r\n params = [payId, $scope.user.UserId]\r\n } else {\r\n params = [payId, $scope.User.UserId]\r\n }\r\n $http.post(\"/DeletePaymentOption\", params).success(function (data) {\r\n ////console.log(data);\r\n $scope.LoadPaymentOptions();\r\n });\r\n }\r\n $scope.LoadPaymentOptions = function () {\r\n $scope.PmtLoading = true;\r\n var uid = $scope.User.UserId\r\n if ($scope.user) {\r\n //console.log($scope.user)\r\n uid = $scope.user.UserId\r\n }\r\n //console.log(uid)\r\n $http.post(\"/GetPaymentOptions\", [uid]).success(function (data) {\r\n //console.log(data)\r\n angular.forEach(data, function (d) {\r\n d.isDefault = d.isDefault == 'True';\r\n if (d.isDefault == true) {\r\n $scope.DefaultPaymentId = d.id;\r\n $scope.DefaultPaymentExp = d.ssl_exp_date;\r\n }\r\n });\r\n $scope.PaymentOptions = data;\r\n if($scope.forcheckout){\r\n\r\n $scope.SetTransactionPayment($scope.DefaultPaymentId,$scope.DefaultPaymentExp);\r\n $scope.PaymentId = $scope.DefaultPaymentId\r\n ////console.log($scope.DefaultPaymentId)\r\n\r\n\r\n }\r\n $scope.PmtLoading = false;\r\n });\r\n }\r\n $scope.SetTransactionPayment = function (id,exp) {\r\n ////console.log(id)\r\n $scope.$broadcast('TransactionPayment', id);\r\n $scope.$emit('TransactionPayment', id);\r\n $scope.$broadcast('TransactionPaymentExp', exp);\r\n $scope.$emit('TransactionPaymentExp', exp);\r\n }\r\n $scope.AddNewPayment = function () {\r\n if($scope.user) {\r\n $scope.NewPayment = {\r\n \"CardNumber\": \"\",\r\n \"FirstName\": $scope.user.FirstName,\r\n \"LastName\": $scope.user.LastName,\r\n \"Address1\": $scope.user.Profile.Street,\r\n \"Address2\": $scope.user.Profile.Unit,\r\n \"City\": $scope.user.Profile.City,\r\n \"StateProvince\": $scope.user.Profile.Region,\r\n \"Postal\": $scope.user.Profile.PostalCode,\r\n \"MakeDefault\": true\r\n };\r\n } else {\r\n $scope.NewPayment = {\r\n \"CardNumber\": \"\",\r\n \"FirstName\": $scope.User.FirstName,\r\n \"LastName\": $scope.User.LastName,\r\n \"Address1\": $scope.User.Profile.Street,\r\n \"Address2\": $scope.User.Profile.Unit,\r\n \"City\": $scope.User.Profile.City,\r\n \"StateProvince\": $scope.User.Profile.Region,\r\n \"Postal\": $scope.User.Profile.PostalCode,\r\n \"MakeDefault\": true\r\n };\r\n }\r\n\r\n if ($scope.user) {\r\n $scope.NewPayment.UserId = $scope.user.UserId\r\n } else {\r\n $scope.NewPayment.UserId = $scope.User.UserId\r\n }\r\n //console.log($scope.NewPayment)\r\n }\r\n $scope.CancelNewPayment = function () {\r\n delete $scope.NewPayment;\r\n }\r\n $scope.SubmitNewPayment = function () {\r\n $scope.wait = true;\r\n //console.log($scope.NewPayment);\r\n $http.post(\"/AddPaymentOption\", $scope.NewPayment).success(function (data) {\r\n ////console.log(data);\r\n $scope.wait = false;\r\n if (data != \"All Good\") {\r\n swal(\r\n {\r\n title: 'Error',\r\n type: 'error',\r\n html: true,\r\n text: 'Sorry, we couldn\\'t validate that payment information.
Please double-check it and try again.
If you need assistance, contact support.'\r\n }\r\n );\r\n } else {\r\n $scope.LoadPaymentOptions();\r\n delete $scope.NewPayment;\r\n }\r\n }).error(function (err) {\r\n //////console.log(err);\r\n $scope.wait = false;\r\n delete $scope.NewPayment;\r\n });\r\n }\r\n $scope.LoadPaymentOptions();\r\n $scope.$watch('user', function (n, o) {\r\n $scope.PmtLoading = true;\r\n if ($scope.user) {\r\n //console.log($scope.user)\r\n $http.post('/GetUser', [$scope.user.UserName]).success(function (d) {\r\n ////console.log(d)\r\n $scope.User = d\r\n })\r\n $scope.LoadPaymentOptions();\r\n }\r\n $scope.PmtLoading = false;\r\n })\r\n }\r\n }\r\n})\r\napp.directive('userprofile', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n //replace: true,\r\n templateUrl: 'app/pages/profile/profile.html',\r\n scope: {\r\n username: '=',\r\n restricted: '=?'\r\n },\r\n controller: function ($scope, $rootScope, $http, $timeout, $cookies, $cookieStore) {\r\n $scope.User = $rootScope.User;\r\n $scope.Sortulator = function(year) {\r\n return year === 'Before 2000' ? '0' : year;\r\n }\r\n $scope.ResetAdaptive = function() {\r\n /*var date = new Date();\r\n var utcdate = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(),\r\n date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n var newdate = new Date(utcdate);\r\n var formatteddate = newdate.formatSQLDateTime();*/\r\n var utcStr = new Date().toUTCString();\r\n var utcDate = new Date(utcStr);\r\n var formatteddate = utcDate.formatSQLDateTime();\r\n //alert(formatteddate);\r\n swal(\r\n {\r\n title: \"Are you sure?\",\r\n text: \"This will reset your adaptive learning metadata.

Scores and prescriptions will not be affected. Continue?\",\r\n html: true,\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonColor: \"#FF0000\",\r\n confirmButtonText: \"Yes, reset data now.\",\r\n closeOnConfirm: false\r\n },\r\n function() {\r\n $http.post(\"/Execute/SetAdaptiveLearningEffectiveDate\", [$scope.User.UserId,formatteddate]).success(function (data) {\r\n swal\r\n ({\r\n title: \"Adaptive learning reset successfully.\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n }).error(function(data){\r\n swal\r\n ({\r\n title: \"There was an error processing the request.\",\r\n type: \"error\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n })\r\n }\r\n )\r\n\r\n }\r\n $scope.getType = function(v){\r\n ////console.log(typeof(v))\r\n return typeof(v);\r\n }\r\n $scope.GetAdaptiveDate = function () {\r\n //console.log('go')\r\n $http.post(\"/Execute/GetAdaptiveLearningEffectiveDate\", [$scope.User.UserId]).success(function (data) {\r\n $scope.ResetDate = data.RS_0[0]\r\n })\r\n }\r\n $scope.WaitLoading = false;\r\n $scope.PwWaitLoading = false;\r\n $scope.UserIsPremium = false;\r\n $scope.UserIsCheater = false;\r\n $scope.UserIsAuthor = false\r\n $scope.LoadRoles = function () {\r\n if ($scope.User) {\r\n $scope.UserIsPremium = false;\r\n $scope.UserIsCheater = false;\r\n $scope.UserIsAuthor = false\r\n $scope.ShowPremiumExtend = false;\r\n $http.post(\"/Execute/GetUserRoleList\", [$scope.User.UserName]).success(function (data) {\r\n $scope.UserRoles = data.RS_0;\r\n angular.forEach($scope.UserRoles, function (r) {\r\n //console.log(r);\r\n if (r.RoleID == \"45\") {\r\n $scope.UserIsPremium = true;\r\n $scope.PremiumEffective = r.EffectiveDate\r\n $scope.PremiumExpires = r.ExpiryDate\r\n $scope.PremiumExtension = new Date(r.ExpiryDate)\r\n }\r\n if (r.RoleID == \"44\") {\r\n $scope.UserIsCheater = true;\r\n }\r\n if (r.RoleID == \"49\") {\r\n $scope.UserIsAuthor = true;\r\n }\r\n });\r\n })\r\n }\r\n }\r\n $scope.ChangePremium = function (action, uid) {\r\n swal({\r\n title: \"Reason for Change\",\r\n text: \"\",\r\n type: \"input\",\r\n showCancelButton: true,\r\n closeOnConfirm: false,\r\n animation: \"slide-from-top\",\r\n inputPlaceholder: \"Write something\"\r\n },\r\n function (inputValue) {\r\n if (inputValue === false) return false;\r\n\r\n if (inputValue === \"\") {\r\n swal.showInputError(\"You need to write something!\");\r\n return false\r\n }\r\n if (action == 'Remove') {\r\n $http.post(\"/Execute/Admin_DeletePremium\", [$scope.User.UserId, $rootScope.User.UserId, inputValue]).success(function (data) {\r\n swal(\"Premium Removed\", \"\", \"success\");\r\n $scope.LoadRoles();\r\n });\r\n }\r\n if (action == 'MakeLife') {\r\n $http.post(\"/Execute/Admin_MakePremiumLifetime\", [$scope.User.UserId, $rootScope.User.UserId, inputValue]).success(function (data) {\r\n swal(\"Premium Updated\", \"\", \"success\");\r\n $scope.LoadRoles();\r\n });\r\n }\r\n if (action == 'Extend') {\r\n ////console.log([$scope.User.UserId, $scope.PremiumExtension, $rootScope.User.UserId, inputValue])\r\n $http.post(\"/Execute/Admin_SetPremiumExpiration\", [$scope.User.UserId, $scope.PremiumExtension , $rootScope.User.UserId, inputValue]).success(function (data) {\r\n swal(\"Premium Updated\", \"\", \"success\");\r\n $scope.LoadRoles();\r\n });\r\n }\r\n\r\n });\r\n\r\n }\r\n $scope.ExtensionChange = function (d) {\r\n ////console.log(d)\r\n $scope.PremiumExtension = d;\r\n }\r\n $scope.MakeCheater = function (uid) {\r\n ////console.log([uid, $rootScope.User.UserId])\r\n $http.post(\"/Execute/Admin_MakeCheater\", [uid,$rootScope.User.UserId]).success(function (data) {\r\n $scope.LoadRoles()\r\n });\r\n };\r\n $scope.MakeAuthor = function (uid) {\r\n ////console.log([uid, $rootScope.User.UserId])\r\n $http.post(\"/Execute/Admin_MakeAuthor\", [uid, $rootScope.User.UserId]).success(function (data) {\r\n $scope.LoadRoles()\r\n });\r\n };\r\n $scope.UnMakeAuthor = function (uid) {\r\n ////console.log([uid])\r\n $http.post(\"/Execute/Admin_UnMakeAuthor\", [uid]).success(function (data) {\r\n $scope.LoadRoles()\r\n });\r\n };\r\n $scope.UnMakeCheater = function (uid) {\r\n ////console.log([uid])\r\n $http.post(\"/Execute/Admin_UnMakeCheater\", [uid]).success(function (data) {\r\n $scope.LoadRoles()\r\n });\r\n };\r\n $scope.LoadSubscriptions = function () {\r\n if ($scope.User) {\r\n $http.post(\"/Execute/GetUserSubscriptions\", [$scope.User.UserName]).success(function (data) {\r\n\r\n $scope.UserSubscriptions = data.RS_0;\r\n $scope.AvailableSubscriptions = data.RS_1;\r\n })\r\n }\r\n }\r\n $scope.AddSubscriptionChange = function (scrp) {\r\n $scope.SubscriptionsToAdd = scrp\r\n //console.log($scope.SubscriptionsToAdd)\r\n }\r\n $scope.AddSubscriptionToUser = function (scrp) {\r\n swal({\r\n title: \"An input!\",\r\n text: \"Write something interesting:\",\r\n type: \"input\",\r\n showCancelButton: true,\r\n closeOnConfirm: false,\r\n animation: \"slide-from-top\",\r\n inputPlaceholder: \"Write something\"\r\n },\r\n function (inputValue) {\r\n if (inputValue === false) return false;\r\n\r\n if (inputValue === \"\") {\r\n swal.showInputError(\"You need to write something!\");\r\n return false\r\n }\r\n //inputValue = replaceAll(\"'\", \"\\\\'\", inputValue)\r\n swal(\"Subscription Added\", \"\", \"success\");\r\n $http.post(\"/Execute/AddScrpsToUserNotify\", [$scope.User.UserId, scrp.Id.toString(), $rootScope.User.UserName, inputValue]).success(function (data) {\r\n delete $scope.SubscriptionsToAdd\r\n $scope.LoadSubscriptions()\r\n });\r\n });\r\n\r\n }\r\n $scope.RemoveSubscription = function (scrp) {\r\n $http.post(\"/Execute/DeleteScripForUser\", [$scope.User.UserId, scrp.Id.toString()]).success(function (data) {\r\n delete $scope.SubscriptionsToAdd\r\n $scope.LoadSubscriptions()\r\n });\r\n }\r\n $scope.EditCell = $scope.EditCity = $scope.EditCountry = $scope.EditFax = $scope.EditPostalCode = $scope.EditRegion = $scope.EditStreet = $scope.EditTelephone = $scope.EditUnit = false;\r\n $scope.EditProfile = $scope.EditUsername = false;\r\n $scope.$watch('username', function (n, o) {\r\n if ($scope.EditUsername == false) {\r\n $scope.EditCell = $scope.EditCity = $scope.EditCountry = $scope.EditFax = $scope.EditPostalCode = $scope.EditRegion = $scope.EditStreet = $scope.EditTelephone = $scope.EditUnit = false;\r\n $scope.EditProfile = false;\r\n //$scope.Original = {UserName : n.UserName}\r\n $scope.LoadProfile(n);\r\n //console.log(n)\r\n }\r\n });\r\n $scope.Revert = function () {\r\n $scope.LoadProfile($scope.username)\r\n }\r\n $scope.Specialties = Globals.Specialties;\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.AdditionalSpecialties = Globals.AdditionalSpecialties;\r\n $scope.AdditionalDegrees = Globals.AdditionalDegrees;\r\n $scope.ClinicianTypes = Globals.ClinicianTypes;\r\n $scope.States = Globals.StateProvince;\r\n $scope.Countries = Globals.Countries;\r\n //console.log(Globals.Countries)\r\n $scope.AcceptableContactMethods = Globals.AcceptableContactMethods;\r\n $scope.TestingYears = Globals.SpecYears;\r\n $scope.Salutations = Globals.Salutations;\r\n $scope.CheckUsername = function (uname) {\r\n if (uname == $scope.Username) {\r\n $scope.UsernameStatus = \"Current\";\r\n } else {\r\n if (uname.length > 4) {\r\n var reg = /^[0-9a-zA-Z\\-]+$/;\r\n if (reg.test(uname) || validateEmail(uname)) {\r\n $http.post(\"Execute/CheckUserExists\", [uname]).success(function (data) {\r\n $scope.UsernameStatus = data.RS_0[0].Status;\r\n if ($scope.UsernameStatus == 'Available') {\r\n $scope.UsernameStatusStyle = { color: 'green' };\r\n } else {\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n });\r\n } else {\r\n $scope.UsernameStatus = \"Invalid Characters\";\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n } else {\r\n $scope.UsernameStatus = \"Too Short\";\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n }\r\n }\r\n $scope.SaveUsername = function () {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.username = $scope.User.UserName;\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Username Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveFirstName = function () {\r\n $scope.User.Profile.FirstName = $scope.User.FirstName;\r\n ////console.log($scope.User)\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"First Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveLastName = function () {\r\n $scope.User.Profile.LastName = $scope.User.LastName;\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Last Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveDisplayName = function () {\r\n $scope.User.Profile.DisplayName = $scope.User.DisplayName;\r\n $http.post(\"/SaveUserInfo\", $scope.Profile).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n alert(\"\", \"Display Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveEmail = function () {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Email Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.LoadPassword = function () {\r\n $http.post(\"/CurrentUser\").success(function (data) {\r\n $scope.UserInfo = data;\r\n ////console.log($scope.UserInfo);\r\n });\r\n }\r\n $http.post(\"/CurrentUser\").success(function (data) {\r\n $scope.CurrentUser = data;\r\n ////console.log($scope.CurrentUser);\r\n });\r\n $scope.NewPassObj = {};\r\n\r\n $scope.UpdateInstitution = function (i) {\r\n ////console.log(i)\r\n if (i!=null) { \r\n $scope.User.Institution = i.Name;\r\n $scope.User.InstitutionId = i.Id;\r\n $scope.User.Profile.Institution = i.Theme;\r\n $scope.User.Profile.Class = \"\";\r\n }\r\n }\r\n $scope.SavePassword = function () {\r\n if (!$scope.NewPassObj.NewPassword || !$scope.NewPassObj.ConfirmPassword) {\r\n swal( \"Error\", \"Password must not be blank\",\"error\", null, null, null);\r\n } else if ($scope.NewPassObj.ConfirmPassword !== $scope.NewPassObj.NewPassword) {\r\n swal(\"Error\", \"Passwords do not match\", \"error\", null, null, null);\r\n } else if ($scope.NewPassObj.ConfirmPassword.length < 6) {\r\n swal(\"Error\", \"Password must be at least 6 characters long\", \"error\", null, null, null);\r\n } else {\r\n $http.post(\"/Nosferatu\", [$scope.NewPassObj.NewPassword]).success(function (data) {\r\n $scope.LoadPassword();\r\n swal(\"Password Saved\", \"\", \"success\", null, 1750, null);\r\n $scope.NewPassObj = {};\r\n $scope.passwordForm.$setPristine();\r\n $scope.passwordForm.$setUntouched();\r\n });\r\n }\r\n }\r\n $scope.LoadProfile = function (username) {\r\n //console.log(username)\r\n if (username) {\r\n $http.post(\"/GetUser\", [username]).success(function (data) {\r\n $scope.EditUsername == false\r\n $scope.EditUsername = false;\r\n $scope.EditFirstName = false;\r\n $scope.EditLastName = false;\r\n $scope.EditEmail = false;\r\n $scope.UsernameStatus = \"Current\";\r\n $scope.UsernameStatusStyle = { display: 'none' };\r\n angular.forEach($scope.Specialties, function (s) {\r\n //////console.log(s);\r\n if (data.Profile.Specialty == s.title) {\r\n data.Profile.Specialty = s.id\r\n }\r\n })\r\n $scope.User = data;\r\n //console.log($scope.User)\r\n $http.post(\"/Execute/GetUserSettings\", [$scope.User.UserId]).success(function (data0) {\r\n $scope.UserSettings = JSON.parse(data0.RS_0[0].Settings)\r\n });\r\n\r\n $scope.User.Profile.OriginalNickname = $scope.User.Profile.Nickname;\r\n if (!$scope.Institutions) {\r\n $http.post(\"/Execute/GetInstitutions\").success(function (ins) {\r\n $scope.Institutions = [];\r\n angular.forEach(ins.RS_0, function (i) {\r\n if (i.SplendidId != '') {\r\n $scope.Institutions.push(i)\r\n }\r\n })\r\n $scope.Institutions.unshift({ Id: 0, \"Name\": \"Retail\", \"Theme\": \"\" })\r\n angular.forEach($scope.Institutions, function (i) {\r\n if (i.Id == $scope.User.InstitutionId) {\r\n $scope.SelectedInstitution = i;\r\n }\r\n });\r\n });\r\n } else {\r\n angular.forEach($scope.Institutions, function (i) {\r\n if (i.Id == $scope.User.InstitutionId) {\r\n ////console.log(\"here\")\r\n $scope.SelectedInstitution = i;\r\n }\r\n });\r\n }\r\n $scope.User.Profile.AcceptableContactMethodArr = $scope.User.Profile.AcceptableContactMethod.split('|');\r\n $scope.User.Profile.HasRetailInterest = ($scope.User.Profile.HasRetailInterest == \"True\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.User.Profile.HasAcademicInterest == \"True\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.User.Profile.HasCorporateInterest == \"True\");\r\n //$scope.User.Profile['Premium AutoRenew Opt-Out'] = ($scope.User.Profile['Premium AutoRenew Opt-Out'] == \"True\");\r\n $http.post(\"/Execute/GetUserPremiumRenewalStats\", [$scope.User.UserId]).success(function (rs) {\r\n $scope.User.PremiumInfo = rs.RS_0[0];\r\n $scope.User.PremiumInfo.ExpiryDate = new Date($scope.User.PremiumInfo.ExpiryDate + \" UTC\")\r\n ////console.log($scope.User)\r\n });\r\n $scope.GetAdaptiveDate()\r\n \r\n });\r\n }\r\n\r\n }\r\n $scope.SaveProfile = function () {\r\n $scope.WaitLoading = true;\r\n $scope.User.Profile.AcceptableContactMethod = $scope.User.Profile.AcceptableContactMethodArr.join('|');\r\n if ($scope.User.Profile.AddressType == 'home') {\r\n $scope.User.Profile.CompanyName = '';\r\n $scope.User.Profile.Title = '';\r\n }\r\n $scope.User.Profile.HasRetailInterest = ($scope.User.Profile.HasRetailInterest ? \"True\" : \"False\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.User.Profile.HasAcademicInterest ? \"True\" : \"False\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.User.Profile.HasCorporateInterest ? \"True\" : \"False\");\r\n if($scope.User.Profile.Country == null) {\r\n $scope.User.Profile.Country = \"\";\r\n }\r\n /** Original Save action, replaced with one that checks nickname first\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.WaitLoading = false;\r\n $scope.LoadProfile($scope.User.UserName);\r\n swal({\r\n title: \"Profile Updated\",\r\n type: \"success\"\r\n });\r\n });\r\n */\r\n if($scope.User.Profile.Nickname !== $scope.User.Profile.OriginalNickname){\r\n $http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [$scope.User.Profile.Nickname]).success(function (datablap) {\r\n //////console.log(data)\r\n if (datablap.RS_0[\"0\"].Message == \"All Good\") {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n //////console.log($scope.User)\r\n $scope.LoadProfile($scope.User.UserName);\r\n $scope.WaitLoading = false;\r\n swal({\r\n title: \"Profile Updated\",\r\n type: \"success\"\r\n });\r\n });\r\n } else {\r\n $scope.WaitLoading = false;\r\n swal({\r\n html: true,\r\n title: \"Gaming Alias Already Exists\",\r\n text: \"The gaming alias \" + $scope.User.Profile.Nickname + \" is associated with an existing account. Please choose a different one.\",\r\n type: \"error\"\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#inputGamingAlias').select();\r\n })\r\n\r\n });\r\n }\r\n });\r\n } else {\r\n //console.log($scope.User)\r\n\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n\r\n ////console.log($scope.User)\r\n $scope.LoadProfile($scope.User.UserName);\r\n $scope.WaitLoading = false;\r\n swal({\r\n title: \"Profile Updated\",\r\n type: \"success\"\r\n });\r\n });\r\n }\r\n }\r\n\r\n\r\n $scope.Regions = {\r\n };\r\n $scope.GetRegions = function (Country) {\r\n //////console.log($scope.Regions[\"United States\"]);\r\n return $scope.Regions[Country];\r\n };\r\n $scope.OnlyTelChars = /^[0-9\\.\\(\\)\\-\\+\\ ]+$/;\r\n ////////console.log(\"bind\")\r\n \r\n \r\n \r\n },\r\n link: function (scope, http) {\r\n ////////console.log(\"link\")\r\n }\r\n }\r\n});\r\napp.directive('institutionmanager', function ($parse, $http, $location, $compile, $rootScope, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/InstitutionManager.htm',\r\n scope: {\r\n instid: '=',\r\n selectedtab: '='\r\n },\r\n controller: function ($scope, toastr, toastrConfig, $state) {\r\n var openedToasts = [];\r\n ////console.log($scope.Institution.Settings);\r\n ////console.log($rootScope.InstitutionSettings)\r\n $scope.CalculteAllocation = function (fn) {\r\n \r\n if ($scope.Institution.Users && $scope.Institution.Settings) {\r\n //////console.log($scope.Institution.Users)\r\n $scope.UnAllocatedCount = 0\r\n $scope.StakeHolderCount = 0\r\n $scope.StudentCount = 0\r\n $scope.InactiveCount = 0\r\n $scope.FacultyCount = 0\r\n $scope.AdminCount = 0\r\n \r\n angular.forEach($scope.Institution.Users, function (u) {\r\n var al = false;\r\n angular.forEach($scope.Institution.Settings.StudentClasses, function (sc) {\r\n if (u.ClassName == sc) { $scope.StudentCount += 1; al = true; }\r\n });\r\n angular.forEach($scope.Institution.Settings.InactiveClasses, function (ia) {\r\n if (u.ClassName == ia) { $scope.InactiveCount += 1; al = true; }\r\n });\r\n if (u.ClassName == $scope.Institution.Settings.FacultyTerm) { $scope.FacultyCount += 1; al = true; }\r\n if (u.ClassName == $scope.Institution.Settings.AdminTerm) { $scope.AdminCount += 1; al = true; }\r\n if (u.ClassName == 'Stake Holder') { $scope.StakeHolderCount += 1; al = true; }\r\n if (al == false || u == '' || u == []) { $scope.UnAllocatedCount += 1 }\r\n //////console.log(u)\r\n });\r\n //if ($scope.Institution.Users == [] || $scope.Institution.Users == '') {\r\n // ////console.log('count it')\r\n // $scope.UnAllocatedCount = parseInt($scope.Institution.StudentSlots) + parseInt($scope.Institution.FacultySlots);\r\n //}\r\n var isValid = true;\r\n if ($scope.UnAllocatedCount > 0) {\r\n isValid = false;\r\n toastr['error']('You have ' + $scope.UnAllocatedCount + ' UnAllocated User(s)', '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (($scope.FacultyCount + $scope.AdminCount) > $scope.Institution.FacultySlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + $scope.Institution.Settings.FacultyTerm + '
Limit: ' + $scope.Institution.FacultySlots + '
Allocated: ' + ($scope.FacultyCount + $scope.AdminCount), '

Allocation Error

')\r\n }\r\n if ($scope.StudentCount > $scope.Institution.StudentSlots) {\r\n isValid = false;\r\n toastr['error']('Too Many Users Allocated to ' + $scope.Institution.Settings.LearnerTerm + '
Limit: ' + $scope.Institution.StudentSlots + '
Allocated: ' + $scope.StudentCount, '

Allocation Error

')\r\n }\r\n if(fn){fn(isValid)}\r\n }\r\n }\r\n angular.extend(toastrConfig, \r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n $scope.AddStudentClasses = function (inst) {\r\n ////console.log(inst)\r\n if (inst.StudentClasses == undefined) {\r\n inst.StudentClasses = [];\r\n inst.StudentClasses.push('')\r\n }\r\n else {\r\n inst.StudentClasses.push('')\r\n }\r\n \r\n }\r\n $scope.AddInactiveClasses = function (inst) {\r\n ////console.log(inst)\r\n if (inst.InactiveClasses == undefined) {\r\n inst.InactiveClasses = [];\r\n inst.InactiveClasses.push('')\r\n }\r\n else {\r\n inst.InactiveClasses.push('')\r\n }\r\n\r\n }\r\n $scope.SelectedTabIndex = 0;\r\n //var today = new Date()\r\n //$scope.selCourse = []\r\n $scope.ExpiredFilter = function (course) {\r\n //console.log(course)\r\n if (isDate(course.Expired)) {\r\n return course.Expired <= $scope.Today\r\n } else {\r\n return true\r\n }\r\n }\r\n $scope.filterExpired = []\r\n $scope.filterExpired.selected = true\r\n $scope.filterTheExpired = function (fe, courses) {\r\n if (fe.selected == true) {\r\n courses = $filter('filter')(courses, function () {\r\n if (isDate(courses.Expired)) {\r\n return courses.Expired <= $scope.Today\r\n } else {\r\n return false\r\n }\r\n \r\n })\r\n }\r\n else {\r\n fe = courses\r\n }\r\n //console.log(courses)\r\n }\r\n\r\n $scope.showCourse2 = function (sel) {\r\n //console.log(sel)\r\n angular.forEach(sel, function (c) {\r\n //console.log(c)\r\n if (c.Expires != '') {\r\n c.Expires = new Date(c.Expires)\r\n }\r\n })\r\n $scope.selCourse2 = sel\r\n }\r\n $scope.IsDate = function (d) {\r\n if (Object.prototype.toString.call(d) === \"[object Date]\") {\r\n if (isNaN(d.valueOf())) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n $scope.showCourse = function (sel) {\r\n //console.log(sel)\r\n angular.forEach(sel, function (c) {\r\n //console.log(c)\r\n //if (c.Expires != '') {\r\n // c.Expires = new Date(c.Expires)\r\n // }\r\n })\r\n $scope.selCourse = sel\r\n //if (c[0] != undefined) {\r\n // $scope.selCourse = c[0]\r\n // if ($scope.selCourse.Expires != '') {\r\n // $scope.selCourse.Expires = new Date($scope.selCourse.Expires)\r\n // }\r\n //}\r\n ////console.log($scope.selCourse)\r\n }\r\n $scope.ExpireCourse = function (c) {\r\n //console.log(c)\r\n $scope.Today = new Date()\r\n //angular.forEach(Sel, function (c) {\r\n if (c.Expires == '' || c.Expires == null || new Date(c.Expires) > $scope.Today || isNaN(c.Expires)) {\r\n $scope.ExpirationDate = $scope.Today\r\n }\r\n else {\r\n $scope.ExpirationDate = new Date(c.Expires)\r\n $scope.ExpirationDate = new Date($scope.ExpirationDate.setDate($scope.ExpirationDate.getDate() + 10000))\r\n }\r\n c.Expires = $scope.ExpirationDate\r\n //console.log([c.Id, $scope.Institution.Id, $scope.Today, $scope.ExpirationDate])\r\n $http.post(\"/Execute/SetInstitutionalCourseEffectivity\", [c.Id, $scope.Institution.Id, $scope.Today, $scope.ExpirationDate]).success(function (data) {\r\n //console.log('done')\r\n\r\n $scope.countAssigned($scope.Institution)\r\n //console.log(c)\r\n $scope.LoadAssets($scope.Institution)\r\n });\r\n //})\r\n \r\n\r\n \r\n }\r\n $scope.load = function () {\r\n $http.post(\"/Execute/GetInstitutions\").success(function (d) {\r\n $scope.ParentInstitutions = [];\r\n $scope.ParentInstitutions.push({ Id: \"0\", Name: \"No Parent\" })\r\n angular.forEach(d.RS_0, function (inst) {\r\n if (inst.Id != $scope.instid) {\r\n $scope.ParentInstitutions.push(inst)\r\n }\r\n });\r\n $http.post(\"Hubspot/GetCompanies\").success(function (hsd) {\r\n //console.log(hsd);\r\n $scope.Companies = [];\r\n angular.forEach(hsd, function (c) {\r\n //console.log(c);\r\n $scope.Companies.push({ Id: c.id, Name: c.properties.name });\r\n });\r\n //console.log(hsd);\r\n $http.post(\"Execute/GetAllAccounts\").success(function (acd) {\r\n $scope.Accounts = acd.RS_0;\r\n $http.post(\"/Execute/GetInstitution\", [$scope.instid]).success(function (data) {\r\n $scope.Institution = data.RS_0[0];\r\n console.log($scope.Institution)\r\n $scope.Institution.OnBoardDate = new Date($scope.Institution.OnBoardDate);\r\n $scope.Institution.ImpersonateEmail = ($scope.Institution.ImpersonateEmail == \"True\");\r\n $scope.Institution.Inactive = ($scope.Institution.Inactive == \"True\");\r\n $scope.Institution.InactiveT = $scope.Institution.Inactive\r\n $scope.Classifications = data.RS_1;\r\n $state.current.title = \"INSTITUTION ADMINISTRATION: \"+$scope.Institution.Name;\r\n $scope.LoadSettings($scope.Institution, function () {\r\n $scope.LoadAssets($scope.Institution);\r\n $scope.LoadUsers($scope.Institution);\r\n });\r\n });\r\n });\r\n });\r\n });\r\n \r\n $http.post(\"/Execute/GetAllInstitutionAddIns\", [$scope.instid]).success(function (d) {\r\n var today = new Date()\r\n $scope.instMilestones = d.RS_0\r\n //console.log($scope.instMilestones)\r\n $scope.HasEM = false\r\n $scope.HasFM = false\r\n $scope.HasIM = false\r\n $scope.HasPEDS = false\r\n $scope.HasEPA = false\r\n angular.forEach($scope.instMilestones, function (msl) {\r\n //console.log(new Date(msl.Expires) > today, msl.AddInId)\r\n if (msl.AddInId == 5) {\r\n if ((new Date(msl.Expires) > today || msl.Expires == '')) {\r\n\r\n $scope.HasEPA = true\r\n }\r\n else {\r\n $scope.HasEPA = false\r\n }\r\n }\r\n if (msl.AddInId == 4) {\r\n if ((new Date(msl.Expires) > today || msl.Expires == '')) {\r\n\r\n $scope.HasPEDS = true\r\n }\r\n else {\r\n $scope.HasPEDS = false\r\n }\r\n }\r\n if (msl.AddInId == 3) {\r\n if ((new Date(msl.Expires) > today || msl.Expires == '')) {\r\n\r\n $scope.HasIM = true\r\n }\r\n else {\r\n $scope.HasIM = false\r\n }\r\n }\r\n if (msl.AddInId == 2) {\r\n if ((new Date(msl.Expires) > today || msl.Expires == '')) {\r\n\r\n $scope.HasFM = true\r\n }\r\n else {\r\n $scope.HasFM = false\r\n }\r\n\r\n }\r\n if (msl.AddInId == 1) {\r\n if ((new Date(msl.Expires) > today || msl.Expires == '')) {\r\n\r\n $scope.HasEM = true\r\n }\r\n else {\r\n $scope.HasEM = false\r\n }\r\n }\r\n\r\n \r\n })\r\n ////console.log($scope.instMilestones, $scope.HasEM, $scope.HasFM)\r\n })\r\n };\r\n $scope.checkmilestone = function () {\r\n $http.post(\"/Execute/GetAvailableAddins\").success(function (d) {\r\n // $scope.InstAddIns = d.RS_0\r\n //console.log(d.RS_0)\r\n\r\n })\r\n }\r\n \r\n $scope.toggleMilestone = function (msl, check) {\r\n \r\n $scope.today = new Date(\"January 1, 2018 01:01:01\")\r\n //console.log($scope.instid, msl, $scope.today, check)\r\n if (check == true) {\r\n $scope.MilestoneValue = msl\r\n ////console.log(new Date(today.setFullYear(today.getFullYear() + 1000)))\r\n $http.post(\"/Execute/SetAddinExpires\", [$scope.instid, msl, new Date($scope.today.setFullYear($scope.today.getFullYear() + 1000))]).success(function (d) {\r\n $scope.checkmilestone()\r\n })\r\n }\r\n else {\r\n $http.post(\"/Execute/SetAddinExpires\", [$scope.instid, msl, $scope.today]).success(function (d) {\r\n //console.log(d)\r\n })\r\n }\r\n }\r\n if ($scope.instid) {\r\n \r\n $scope.id = $scope.instid;\r\n //////console.log($scope.id)\r\n $scope.load();\r\n }\r\n $scope.$on('ReAllocate', function (s) {\r\n //////console.log(s);\r\n $scope.CalculteAllocation();\r\n });\r\n $scope.AdminTermChanged = function () {\r\n $scope.Institution.IsDirty = true;\r\n $scope.$broadcast('StudentClassesChanged', 'Class Removed');\r\n }\r\n \r\n $scope.FacultyTermChanged = function () {\r\n $scope.Institution.IsDirty = true;\r\n $scope.$broadcast('StudentClassesChanged', 'Class Removed');\r\n }\r\n $scope.UpdateClassName = function (arr, idx, val) {\r\n arr[idx] = val;\r\n $scope.$broadcast('StudentClassesChanged', val);\r\n }\r\n $scope.SaveSettings = function (i) {\r\n i.Settings.FacultyRoles = [];\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n if (Role.Selected) {\r\n i.Settings.FacultyRoles.push({ Id: Role.Id, Name: Role.Name });\r\n }\r\n });\r\n i.Settings.AdminRoles = [];\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n if (Role.Selected) {\r\n i.Settings.AdminRoles.push({ Id: Role.Id, Name: Role.Name });\r\n }\r\n });\r\n i.Settings.LearnerRoles = [];\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n if (Role.Selected) {\r\n i.Settings.LearnerRoles.push({ Id: Role.Id, Name: Role.Name });\r\n }\r\n });\r\n var val = JSON.stringify(i.Settings);\r\n //////console.log(JSON.stringify([i.Id, val]));\r\n $http.post(\"/Execute/SaveInstitutionSettings\", JSON.stringify([i.Id, val])).success(function (data) {\r\n i.IsDirty = false\r\n $scope.SettingsHaveChanged = true;\r\n toastr['success']('Settings Saved', '

Success

');\r\n });\r\n }\r\n $scope.LoadSettings = function (i, fn) {\r\n //console.log(\"stt\")\r\n if (!i.Settings) {\r\n $scope.FacultyRoles = angular.copy(Globals.InstitutionalFacultyRoles);\r\n $scope.LearnerRoles = angular.copy(Globals.InstitutionalLearnerRoles);\r\n $scope.AdminRoles = angular.copy(Globals.InstitutionalAdminRoles);\r\n if (!i.Settings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [i.Id]).success(function (data) {\r\n if (data.RS_0.length > 0) {\r\n i.Settings = JSON.parse(data.RS_0[0].SettingsJSON);\r\n if (!i.Settings.InactiveClasses) {\r\n i.Settings.InactiveClasses = [];\r\n }\r\n }\r\n else {\r\n i.Settings = {\r\n FacultyTerm: \"Faculty\",\r\n FacultyRoles: [],\r\n LearnerTerm: \"Student\",\r\n LearnerRoles: [],\r\n StudentClasses: [\"PGY1\", \"PGY2\", \"PGY3\"],\r\n InactiveClasses: [\"Graduated\"],\r\n Classes: function () {\r\n var lst = angular.copy(this.StudentClasses);\r\n lst.unshift(this.FacultyTerm)\r\n return lst;\r\n }\r\n }\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n switch ($scope.selectedtab) {\r\n case 'Extended':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case 'Assets':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case 'Users':\r\n $scope.SelectedTabIndex = 3;\r\n break;\r\n case 'Allocation':\r\n $scope.SelectedTabIndex = 4;\r\n break;\r\n default:\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n }\r\n if (fn) { fn(); }\r\n //$scope.CalculteAllocation();\r\n });\r\n \r\n } else {\r\n if (!i.Settings.InactiveClasses) {\r\n i.Settings.InactiveClasses = [\"Graduated\"]\r\n }\r\n switch ($scope.selectedtab) {\r\n case 'Extended':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case 'Assets':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case 'Users':\r\n $scope.SelectedTabIndex = 3;\r\n break;\r\n case 'Allocation':\r\n $scope.SelectedTabIndex = 4;\r\n break;\r\n default:\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n //$scope.CalculteAllocation();\r\n if (fn) { fn(); }\r\n }\r\n } else {\r\n if (fn) { fn(); }\r\n }\r\n \r\n }\r\n $scope.DeleteClass = function (idx) {\r\n $scope.Institution.Settings.StudentClasses.splice(idx, 1);\r\n $scope.$broadcast('StudentClassesChanged', 'Class Removed');\r\n }\r\n $scope.DeleteInactiveClass = function (idx) {\r\n $scope.Institution.Settings.InactiveClasses.splice(idx, 1);\r\n $scope.$broadcast('StudentClassesChanged', 'Class Removed');\r\n }\r\n $scope.NewTerm = function (i) {\r\n\r\n $scope.Terms.push({ Id: 0, InstitutionId: i.Id, StartDateTime: new Date(), EndDateTime: null, Name: \"New Academic Period\", IsEditing:true})\r\n }\r\n $scope.SaveTerm = function (term) {\r\n term.IsEditing = false;\r\n //NewStart = NewStart.setHours(0, 1, 0, 0)\r\n //NewEnd = NewEnd.setHours(23, 59, 0, 0);\r\n term.StartDateTime.setHours(0, 0, 0, 0)\r\n\r\n var enddt = ''\r\n if (isDate(term.EndDateTime)) {\r\n enddt = term.EndDateTime.toISOString().replace('.000Z', '')\r\n }\r\n var params = [term.Id.toString(), term.InstitutionId.toString(), term.StartDateTime.toISOString().replace('.000Z',''), enddt, term.Name]\r\n //console.log(params);\r\n $http.post(\"/Execute/SaveInstitutionTermEffectivity\", params).success(function (data) {\r\n //console.log(data);\r\n });\r\n }\r\n $scope.LoadTerms = function (i) {\r\n $http.post(\"/Execute/GetInstitutionTermEffectivity\", [i.Id]).success(function (data) {\r\n $scope.Terms = data.RS_0;\r\n angular.forEach($scope.Terms, function (term) {\r\n term.StartDateTime = new Date(term.StartDateTime);\r\n if (term.EndDateTime) {\r\n term.EndDateTime = new Date(term.EndDateTime);\r\n }\r\n term.IsEditing = false;\r\n });\r\n });\r\n }\r\n $scope.Today = new Date()\r\n $scope.countAssigned = function (i) {\r\n $scope.totalFiltered = 0\r\n angular.forEach(i.Assigned, function (ass) {\r\n ass.selected = false\r\n ass.class = ''\r\n ass.Name = ass.Name\r\n if (new Date(ass.Expires) <= $scope.Today) {\r\n ass.selected = true\r\n //console.log(ass.Name.startsWith(\"* \"))\r\n //console.log(ass.Name.endsWith(' *'))\r\n if (((ass.Name.startsWith('* ')) && (ass.Name.endsWith(' *')))==false) {\r\n ass.Name = '* ' + ass.Name + ' *'\r\n }\r\n\r\n $scope.totalFiltered++\r\n }\r\n else\r\n {\r\n ass.Name = ass.Name.replace('* ', '').replace(' *', '')\r\n }\r\n\r\n\r\n })\r\n }\r\n $scope.LoadAssets = function (i) {\r\n if (!i.Assigned || !i.Available) {\r\n //console.log(i.Id)\r\n $http.post(\"/Execute/GetInstitutionCourses\", [i.Id]).success(function (data) {\r\n i.Assigned = data.RS_0;\r\n i.Available = data.RS_1;\r\n angular.forEach(i.Assigned, function (ass) {\r\n //ass.Expires = new date(ass.Expires)\r\n //ass.Effective = new date(ass.Effective)\r\n })\r\n $scope.countAssigned(i)\r\n //console.log(i.Assigned)\r\n });\r\n }\r\n }\r\n $scope.LoadUsers = function (i) {\r\n \r\n $scope.LoadSettings(i, function () {\r\n \r\n var classfilter = i.Settings.InactiveClasses.join(',');\r\n if ($scope.ShowInactive) {\r\n classfilter = \"\"\r\n }\r\n \r\n if (!i.Users && !i.retrievingusers) {\r\n i.InactiveUsers = [];\r\n if (!i.Classes) { i.Classes = []; }\r\n console.log([i.Id, classfilter])\r\n i.retrievingusers = true\r\n \r\n $http.post(\"/GetInstitutionMembers\", [i.Id, classfilter]).success(function (data) {\r\n delete i.retrievingusers\r\n console.log(data)\r\n if (data.RS_0) {\r\n i.Users = data.RS_0;\r\n }\r\n else {\r\n i.Users = []\r\n }\r\n angular.forEach(i.Users, function (u) {\r\n u.drag = true;\r\n var ClassExists = false;\r\n var cls\r\n angular.forEach(i.Classes, function (c) {\r\n if (c.Name == u.ClassName) {\r\n ClassExists = true;\r\n cls = c;\r\n }\r\n });\r\n if (ClassExists == false) {\r\n cls = { Name: u.ClassName, Members: [] }\r\n i.Classes.push(cls);\r\n }\r\n if (u.ClassName == '') { u.ClassName ='Unassigned'}\r\n cls.Members.push(u);\r\n //$http.get(\"/GetPassword/\" + u.Username).success(function (pass) {\r\n // u.Password = pass\r\n //});\r\n \r\n\r\n });\r\n //$scope.CalculteAllocation();\r\n });\r\n }\r\n });\r\n }\r\n $scope.AddSelected = function (inst, selArr) {\r\n //console.log(selArr)\r\n var s = $(\"#lstAvailable\" + inst.Id).val();\r\n $.each(inst.Available, function (idx, crs) {\r\n $.each(selArr, function (index, sel) {\r\n if (crs.Id == sel.Id) {\r\n //crs.Expires = new Date('2049-01-01')\r\n crs.NeedToAdd = true;\r\n }\r\n })\r\n });\r\n var newArr = [];\r\n $.each(inst.Available, function (i, crs) {\r\n if (crs.NeedToAdd == true) {\r\n //crs.Expires = new Date('2049-01-01')\r\n crs.selected = false\r\n inst.Assigned.push(crs);\r\n }\r\n else {\r\n newArr.push(crs);\r\n }\r\n delete crs.NeedToAdd\r\n });\r\n //console.log(inst.Assigned)\r\n inst.Available = newArr;\r\n inst.IsDirty = true;\r\n }\r\n $scope.RemoveSelected = function (inst, sel) {\r\n var s = $(\"#lstAssigned\" + inst.Id).val();\r\n $.each(inst.Assigned, function (idx, crs) {\r\n if (crs.Id == sel.Id) {\r\n crs.NeedToAdd = true;\r\n }\r\n });\r\n var newArr = [];\r\n $.each(inst.Assigned, function (i, crs) {\r\n if (crs.NeedToAdd == true) {\r\n inst.Available.push(crs);\r\n }\r\n else {\r\n newArr.push(crs);\r\n }\r\n delete crs.NeedToAdd\r\n });\r\n inst.Assigned = newArr;\r\n inst.IsDirty = true;\r\n //console.log(inst.Assigned)\r\n }\r\n $scope.LogoChanged = function (obj) {\r\n //////console.log(obj);\r\n $scope.NewLogo = true;\r\n $scope.$apply();\r\n }\r\n $scope.uploadComplete = function (data, inst) {\r\n //////console.log(inst);\r\n $scope.NewLogo = false;\r\n inst.LogoPath = data.RelativeURL;\r\n }\r\n $scope.AddUsers = function () {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/UploadUsers.htm',\r\n windowClass: 'confirm',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Reason = \"\";\r\n $scope.Institution = items.Institution;\r\n $scope.uploadComplete = function (content, Institution) {\r\n //////console.log(content);\r\n $uibModalInstance.close(content)\r\n }\r\n $scope.cancel = function () {\r\n $uibModalInstance.close(false);\r\n }\r\n $scope.commit = function () {\r\n\r\n }\r\n },\r\n resolve: { items: function () { return { Institution: $scope.Institution } } }\r\n });\r\n mi.result.then(function (usrs) {\r\n\r\n if (usrs) {\r\n angular.forEach(usrs, function (u) {\r\n var usrExist = false;\r\n angular.forEach($scope.Institution.Users, function (iu) {\r\n if (u.Username == iu.Username) {\r\n usrExist = true;\r\n iu.Email = u.Email;\r\n iu.FirstName = u.FirstName;\r\n iu.LastName = u.LastName;\r\n iu.ClassName = u.ClassName;\r\n iu.IsDirty = true;\r\n }\r\n });\r\n ////////console.log(reload);\r\n if (!usrExist) {\r\n $scope.Institution.Users.push(u);\r\n }\r\n });\r\n ////////console.log($scope.Institution.Users);\r\n var lst = $scope.Institution.Users\r\n $scope.$broadcast('StudentsChanged', '');\r\n //$scope.$emit('StudentsChanged', $scope.Institution.Users);\r\n }\r\n });\r\n }\r\n $scope.SaveInstitution = function (i) {\r\n var isValidMessage = \"\";\r\n if (isNaN(i.FacultySlots)) {\r\n i.FacultySlots = 0;\r\n }\r\n if (isNaN(i.StudentSlots)) {\r\n i.StudentSlots = 0;\r\n isValidMessage = \"You have no students!\";\r\n }\r\n if (i.SplendidId.length < 1) {\r\n isValidMessage = \"CRM Account Id is required\";\r\n }\r\n if (i.HubspotId.length < 1) {\r\n isValidMessage = \"Hubspot Id is required\";\r\n }\r\n if (isValidMessage == \"\") {\r\n i.Inactive = i.InactiveT;\r\n var p = [i.Id.toString(), i.Name, i.Domain, i.Theme, i.LogoPath, i.Classification_Id, i.Description, i.ImpersonateEmail, i.FacultySlots, i.StudentSlots, i.SFID, i.Inactive, i.ParentId, i.OnBoardDate.formatSQL(), i.SplendidId, i.HubspotId];\r\n console.log(p);\r\n $http.post(\"/Execute/SaveInstitution\", p).success(function (data) {\r\n ////console.log(data)\r\n if ($scope.instid == 0) {\r\n $location.path(\"/inst/\" + data.RS_0[0].Id);\r\n }\r\n i.IsDirty = false;\r\n });\r\n }\r\n else {\r\n alert(isValidMessage)\r\n }\r\n\r\n }\r\n $scope.SaveAss = function (inst) {\r\n var params = [];\r\n params[0] = inst.Id;\r\n var AssArray = [];\r\n angular.forEach(inst.Assigned, function (crs) {\r\n AssArray.push(crs.Id);\r\n });\r\n params[1] = AssArray.join();\r\n //console.log(params)\r\n $http.post(\"/Execute/SetInstitutionCourses\", params).success(function (data) {\r\n $scope.NewAssigned = data;\r\n //console.log($scope.NewAssigned)\r\n toastr['success']('Course Assets Saved!');\r\n ////console.log('did it')\r\n });\r\n };\r\n $scope.UserSaveProgress=0\r\n $scope.UsersSaving = false;\r\n $scope.totalFiltered = 0\r\n $scope.UserChanged = function (u) {\r\n console.log(u)\r\n u.IsDirty = true;\r\n }\r\n $scope.SaveUser = function (idx, lst, msg, fn) {\r\n $scope.UsersSaving = true;\r\n if (idx <= (lst.length-1)) {\r\n //console.log(idx)\r\n $http.post(\"/UpdateInstitutionUser/\" + $scope.Institution.Id, [lst[idx]]).success(function (d) {\r\n\r\n if (d.startsWith('Error:')) {\r\n toastr['error']('Error Saving Users', d);\r\n }\r\n else if (d.startsWith('Warning:')) {\r\n toastr['warning']('Users Saved with Errors', d);\r\n }\r\n else {\r\n delete lst[idx].IsDirty\r\n }\r\n $scope.UserSaveProgress = Math.round(((idx+1) / lst.length)*100)\r\n $scope.SaveUser(idx + 1, lst, msg, fn);\r\n });\r\n }\r\n else {\r\n //angular.forEach(msg, function (m) {\r\n $scope.UsersSaving=false;\r\n fn();\r\n\r\n //});\r\n \r\n }\r\n //$http.post(\"/UpdateInstitutionUser/\" + $scope.Institution.Id, [lst[idx]]).success(function (d) {\r\n\r\n //});\r\n }\r\n $scope.SaveUsers = function () {\r\n console.log($scope.Institution.Users);\r\n $scope.CalculteAllocation(function (isValid) {\r\n console.log(isValid);\r\n if (isValid) {\r\n var usrs = []\r\n angular.forEach($scope.Institution.Users, function (u) {\r\n if (!u.UserID) { u.UserID = 0 };\r\n //console.log(u);\r\n if (u.IsDirty || u.UserID == 0 || $scope.SettingsHaveChanged) {\r\n usrs.push(u)\r\n }\r\n })\r\n console.log(usrs);\r\n msg = []\r\n $scope.SaveUser(0, usrs, msg, function () {\r\n toastr['success']('Users Saved', '

Success

');\r\n $scope.UserSaveProgress = 0;\r\n delete $scope.SettingsHaveChanged;\r\n });\r\n }\r\n });\r\n //angular.extend(toastrConfig, $scope.ToastOptions);\r\n //openedToasts.push(toastr['error']('Please Correct The Following
  • Error 1
  • Error 2
', '

Validation Error

'));\r\n //var strOptions = {};\r\n //for (var o in $scope.options) if (o != 'msg' && o != 'title') strOptions[o] = $scope.options[o];\r\n //$scope.optionsStr = \"toastr.\" + $scope.options.type + \"(\\'\" + $scope.options.msg + \"\\', \\'\" + $scope.options.title + \"\\', \" + JSON.stringify(strOptions, null, 2) + \")\";\r\n\r\n }\r\n //$scope.LoadUsers();\r\n }\r\n }\r\n});\r\napp.directive('institutionuserlist', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n //templateUrl: '/app/tpls/InstitutionUserList.htm',\r\n templateUrl: '/app/tpls/InstitutionUserList_2.0.htm',\r\n scope: { institution: '=' },\r\n controller: function ($scope, $http, $filter,$rootScope, $uibModal, editableOptions, editableThemes) {\r\n $scope.origInstitution = $scope.institution;\r\n $scope.cur = !$rootScope.User.isStaff;\r\n $scope.bgStyle = function (u) {\r\n //console\r\n if (u.ClassName == 'Unassigned') {\r\n return { \"background-color\": \"red\" }\r\n } else if (u.ClassName == $scope.institution.Settings.AdminTerm) {\r\n return { \"background-color\": \"rgba(0,127,255,0.5)\", \"color\":\"white\"}\r\n }\r\n }\r\n $scope.rowClass = function(u) {\r\n if(u.ClassName == 'Unassigned' || u.ClassName == $scope.institution.Settings.AdminTerm) {\r\n return \"inst-highlighted-row\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n $scope.editableTableData = []\r\n editableOptions.theme = 'bs3';\r\n editableThemes['bs3'].submitTpl = '';\r\n editableThemes['bs3'].cancelTpl = '';\r\n var w = null;\r\n var u = null;\r\n $scope.$watch('institution', function (v) {\r\n if ($scope.institution) {\r\n if (w == null) {\r\n w = $scope.$watch('institution.Settings', function (v) {\r\n $scope.loadClasses()\r\n });\r\n }\r\n if (u == null) {\r\n u = $scope.$watch('institution.Users', function (v) {\r\n $scope.CalculteAllocation();\r\n });\r\n }\r\n $scope.editableTableData = $scope.institution.Users;\r\n $scope.institution.SavePrompt = false;\r\n $scope.$parent.Inst.SavePrompt = false;\r\n }\r\n });\r\n $scope.CalculteAllocation = function () {\r\n if ($scope.institution.Users && $scope.institution.Settings) {\r\n $scope.UnAllocatedCount = 0\r\n $scope.StakeHolderCount = 0\r\n $scope.StudentCount = 0\r\n $scope.InactiveCount = 0\r\n $scope.FacultyCount = 0\r\n $scope.AdminCount = 0\r\n ////////console.log($scope.institution.Settings)\r\n angular.forEach($scope.institution.Users, function (u) {\r\n var al = false;\r\n angular.forEach($scope.institution.Settings.StudentClasses, function (sc) {\r\n if (u.ClassName == sc) { $scope.StudentCount += 1; al = true; }\r\n });\r\n angular.forEach($scope.institution.Settings.InactiveClasses, function (ia) {\r\n if (u.ClassName == ia) { $scope.InactiveCount += 1; al = true; }\r\n });\r\n if (u.ClassName == $scope.institution.Settings.FacultyTerm) { $scope.FacultyCount += 1; al = true; }\r\n if (u.ClassName == $scope.institution.Settings.AdminTerm) { $scope.AdminCount += 1; al = true; }\r\n if (u.ClassName == 'Stake Holder') { $scope.StakeHolderCount += 1; al = true; }\r\n if (al == false) { $scope.UnAllocatedCount += 1}\r\n });\r\n $scope.$broadcast('ReAllocate', 'br');\r\n $scope.$emit('ReAllocate', 'em');\r\n }\r\n };\r\n $scope.addUser = function (i) {\r\n $scope.inserteduser = {\r\n FirstName: '',\r\n LastName: '',\r\n Username: '',\r\n Password: '',\r\n Email: '',\r\n Class: null,\r\n };\r\n i.Users.push($scope.inserteduser);\r\n };\r\n $scope.loadClasses = function(){\r\n if ($scope.institution.Settings) {\r\n $scope.Classes = [];//angular.copy($scope.institution.Settings.StudentClasses);\r\n angular.forEach($scope.institution.Settings.StudentClasses, function (i) {\r\n $scope.Classes.push({ value: i, text: i });\r\n });\r\n angular.forEach($scope.institution.Settings.InactiveClasses, function (i) {\r\n $scope.Classes.push({ value: i, text: i });\r\n });\r\n $scope.Classes.push({ value: $scope.institution.Settings.FacultyTerm, text: $scope.institution.Settings.FacultyTerm });\r\n $scope.Classes.push({ value: $scope.institution.Settings.AdminTerm, text: $scope.institution.Settings.AdminTerm });\r\n $scope.Classes.push({ value: 'Stake Holder', text: 'Stake Holder' });\r\n $scope.CalculteAllocation()\r\n }\r\n }\r\n $scope.AddUsers = function () {\r\n var mi = $uibModal.open({\r\n templateUrl: '/app/tpls/UploadUsers.htm',\r\n windowClass: 'confirm',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, $uibModalInstance, items) {\r\n $scope.Reason = \"\";\r\n $scope.Institution = items.Institution;\r\n $scope.uploadComplete = function (content, Institution) {\r\n //////console.log(content);\r\n $uibModalInstance.close(content)\r\n }\r\n $scope.cancel = function () {\r\n $uibModalInstance.close(false);\r\n }\r\n $scope.commit = function () {\r\n\r\n }\r\n },\r\n resolve: { items: function () { return { Institution: $scope.Institution } } }\r\n });\r\n mi.result.then(function (usrs) {\r\n\r\n if (usrs) {\r\n angular.forEach(usrs, function (u) {\r\n var usrExist = false;\r\n angular.forEach($scope.Institution.Users, function (iu) {\r\n if (u.Username == iu.Username) {\r\n usrExist = true;\r\n iu.Email = u.Email;\r\n iu.FirstName = u.FirstName;\r\n iu.LastName = u.LastName;\r\n iu.ClassName = u.ClassName;\r\n }\r\n });\r\n ////////console.log(reload);\r\n if (!usrExist) {\r\n $scope.Institution.Users.push(u);\r\n }\r\n });\r\n ////////console.log($scope.Institution.Users);\r\n var lst = $scope.Institution.Users\r\n $scope.$broadcast('StudentsChanged', '');\r\n //$scope.$emit('StudentsChanged', $scope.Institution.Users);\r\n }\r\n });\r\n }\r\n $scope.$on('StudentClassesChanged', function () {\r\n //////console.log('StudentClassesChanged');\r\n $scope.loadClasses();\r\n });\r\n $scope.SaveUsers = function (i) {\r\n $rootScope.FullScreenLoading=true;\r\n $scope.CalculteAllocation(i, function (isValid) {\r\n if (isValid) {\r\n $http.post(\"/UpdateInstitutionUser/\" + i.Id, i.Users).success(function (d) {\r\n $rootScope.FullScreenLoading=false;\r\n toastr['success']('Users Saved', '

Success

');\r\n });\r\n }\r\n });\r\n //angular.extend(toastrConfig, $scope.ToastOptions);\r\n //openedToasts.push(toastr['error']('Please Correct The Following
  • Error 1
  • Error 2
', '

Validation Error

'));\r\n //var strOptions = {};\r\n //for (var o in $scope.options) if (o != 'msg' && o != 'title') strOptions[o] = $scope.options[o];\r\n //$scope.optionsStr = \"toastr.\" + $scope.options.type + \"(\\'\" + $scope.options.msg + \"\\', \\'\" + $scope.options.title + \"\\', \" + JSON.stringify(strOptions, null, 2) + \")\";\r\n\r\n }\r\n $scope.$on('StudentsChanged', function (users) {\r\n if ($scope.institution) {\r\n if (Array.isArray($scope.institution.Users)) {\r\n //////console.log($scope.institution.Users)\r\n $scope.institution.Users\r\n } else {\r\n //////console.log($scope.institution.Users)\r\n }\r\n }\r\n });\r\n }\r\n }\r\n});\r\napp.directive('institutionusers', function ($parse, $http, $compile) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/InstitutionUsers.htm',\r\n scope: { institution: '=' },\r\n controller: function ($scope, $http) {\r\n var fromlst\r\n $scope.options = {\r\n accept: function (event, ui, item_id, index) {\r\n //////console.log(event, ui, item_id, index)\r\n return true;\r\n }\r\n }\r\n $scope.FacultySlotsAvailable = function () {\r\n //////console.log($scope.list1.length)\r\n return $scope.list1.length <= 3;\r\n }\r\n $scope.testValid = function (lst, itm) {\r\n //////console.log(lst)\r\n return true;\r\n }\r\n $scope.Institution = $scope.institution;\r\n $scope.onDrop = function (event, ui) {\r\n angular.forEach($scope.listAdm, function (u) { u.ClassName = $scope.Institution.Settings.AdminTerm })\r\n angular.forEach($scope.list0, function (u) { u.ClassName = '' })\r\n angular.forEach($scope.list1, function (u) { u.ClassName = $scope.Institution.Settings.FacultyTerm })\r\n angular.forEach($scope.list2, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[0] })\r\n angular.forEach($scope.list3, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[1] })\r\n angular.forEach($scope.list4, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[2] })\r\n angular.forEach($scope.list5, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[3] })\r\n angular.forEach($scope.list6, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[4] })\r\n angular.forEach($scope.list7, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[5] })\r\n angular.forEach($scope.list8, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[6] })\r\n angular.forEach($scope.list9, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[7] })\r\n angular.forEach($scope.ilist0, function (u) { u.ClassName = $scope.Institution.Settings.InactiveClasses[0] })\r\n angular.forEach($scope.ilist1, function (u) { u.ClassName = $scope.Institution.Settings.InactiveClasses[1] })\r\n angular.forEach($scope.ilist2, function (u) { u.ClassName = $scope.Institution.Settings.InactiveClasses[2] })\r\n //angular.forEach($scope.list10, function (u) { u.ClassName = $scope.Institution.Settings.StudentClasses[8] })\r\n //////console.log($scope.list0);\r\n //////console.log($scope.ilist0);\r\n };\r\n $scope.set_item_id = function (event, ui, item_id, index, frm) {\r\n //fromlst = frm\r\n ////////console.log(event);\r\n ////////console.log(ui);\r\n ////////console.log('item_id');\r\n ////////console.log(item_id);\r\n ////////console.log('index');\r\n ////////console.log(index);\r\n }\r\n $scope.StudentsSlotsAvailable = function () {\r\n return true;\r\n }\r\n $scope.$on('StudentClassesChanged', function (val) {\r\n $scope.Allocate($scope.institution);\r\n });\r\n $scope.$on('StudentsChanged', function (val) {\r\n $scope.Allocate($scope.institution);\r\n });\r\n $scope.$watch('institution', function (n, o) {\r\n $scope.Institution = $scope.institution;\r\n if ($scope.institution) {\r\n $scope.LoadUsers($scope.institution)\r\n }\r\n })\r\n $scope.Allocate = function (i) {\r\n $scope.listAdm = []\r\n $scope.ilist0 = []\r\n $scope.ilist1 = []\r\n $scope.ilist2 = []\r\n $scope.list0 = []\r\n $scope.list1 = []\r\n $scope.list2 = []\r\n $scope.list3 = []\r\n $scope.list4 = []\r\n $scope.list5 = []\r\n $scope.list6 = []\r\n $scope.list7 = []\r\n $scope.list8 = []\r\n $scope.list9 = []\r\n $scope.list10 = []\r\n angular.forEach(i.Users, function (u) {\r\n u.drag = true;\r\n u.title = u.DisplayName\r\n u.allocated = false;\r\n if (u.ClassName == i.Settings.FacultyTerm) {\r\n $scope.list1.push(u);\r\n u.allocated = true;\r\n } else {\r\n\r\n if (u.ClassName == i.Settings.AdminTerm) {\r\n $scope.listAdm.push(u);\r\n u.allocated = true;\r\n } else {\r\n angular.forEach(i.Settings.StudentClasses, function (c, idx) {\r\n if (u.ClassName == c) {\r\n $scope[\"list\" + (idx + 2)].push(u);\r\n u.allocated = true;\r\n }\r\n });\r\n }\r\n }\r\n if (u.allocated == false) {\r\n $scope.list0.push(u);\r\n }\r\n $scope.$broadcast('StudentsAllocated', '');\r\n });\r\n }\r\n $scope.LoadUsers = function (i) {\r\n console.log(\"zzz\");\r\n $scope.LoadSettings(i, function () {\r\n if (!i.Users) {\r\n if (!i.Classes) { i.Classes = []; }\r\n $http.post(\"/Execute/GetInstitutionMembers\", [i.Id]).success(function (data) {\r\n if (data.RS_0) {\r\n i.Users = data.RS_0;\r\n }\r\n else {\r\n //////console.log('2509')\r\n i.Users = []\r\n }\r\n //$scope.$broadcast('StudentsLoaded')\r\n //$scope.$emit('StudentsLoaded')\r\n $scope.Allocate(i);\r\n });\r\n }\r\n });\r\n }\r\n $scope.LoadSettings = function (i, fn) {\r\n console.log(\"?\")\r\n $scope.FacultyRoles = angular.copy(Globals.InstitutionalFacultyRoles);\r\n $scope.LearnerRoles = angular.copy(Globals.InstitutionalLearnerRoles);\r\n $scope.AdminRoles = angular.copy(Globals.InstitutionalAdminRoles);\r\n if (!i.Settings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [i.Id]).success(function (data) {\r\n if (data.RS_0.length > 0) {\r\n i.Settings = JSON.parse(data.RS_0[0].SettingsJSON);\r\n }\r\n else {\r\n i.Settings = {\r\n FacultyTerm: \"Faculty\",\r\n FacultyRoles: [],\r\n LearnerTerm: \"Student\",\r\n LearnerRoles: [],\r\n StudentClasses: [\"PGY1\", \"PGY2\", \"PGY3\"],\r\n Classes: function () {\r\n var lst = angular.copy(this.StudentClasses);\r\n lst.unshift(this.FacultyTerm)\r\n return lst;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n if (fn) { fn(); }\r\n }\r\n\r\n }\r\n }\r\n});\r\napp.directive('progdashmain', function($parse,$http,$compile,$location){\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/progdashmain.html',\r\n controller: function($scope, $rootScope, $http, $stateParams, $state, $filter, $location) {\r\n $scope.doodle = {};\r\n },\r\n\r\n }\r\n});\r\napp.directive('marketingSnippet', function($parse,$http,$compile,$location){\r\n return{\r\n restrict: 'E',\r\n replace: true,\r\n template: '',\r\n scope: {\r\n snippet: '@'\r\n },\r\n controller: function($scope,$rootScope,$compile,$http,$stateParams,$state,$filter,$location) {\r\n $scope.SnippetOutput = '';\r\n $scope.snippets = [\r\n {\r\n id: 1,\r\n slug: 'regbullets',\r\n html: '
    \\n' +\r\n '
  • Free trial any products - board review, QBanks & CME course assets
  • \\n' +\r\n '
  • One-time purchase products - buy assets once, use forever, no re-buys!
  • \\n' +\r\n '
  • Save money every year - annual renewal keeps everything fresh and useful for less
  • \\n' +\r\n '
  • Enjoy free new content - free board review questions and CME credits weekly
  • \\n' +\r\n '
  • Stay informed and proficient - clinical news updates, critical MOC dates, guideline changes and more
  • \\n' +\r\n '
  • Remove MOC stress & complexity forever - craft a personalized \"on-call\" solution for your MOC, CME, and compliance needs.
  • \\n' +\r\n '
' +\r\n '
' +\r\n '

' +\r\n '' +\r\n '

'\r\n },\r\n {\r\n id: 2,\r\n slug: 'dantest',\r\n html: '

This Should Be An H1.

'\r\n }\r\n ];\r\n $scope.SnippetOutput = jQuery.grep($scope.snippets, function(snip){\r\n return snip.slug === $scope.snippet;\r\n })\r\n //console.log($scope.snippets)\r\n }\r\n }\r\n})\r\napp.directive('quickquizdata', function($parse,$http,$compile,$location){\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/quickquizdata.html',\r\n controller: function($scope, $rootScope, $http, $stateParams, $state, $filter, $location) {\r\n $scope.doodle = {};\r\n },\r\n\r\n }\r\n});\r\napp.directive('progdashtabs', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/progdashtabs.htm',\r\n scope: {\r\n selectedtab: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $state, $filter, toastr, toastrConfig) {\r\n var openedToasts = [];\r\n $scope.SelectedTabIndex = 0;\r\n $scope.User = $rootScope.User;\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n $scope.uploadComplete = function (content, Institution) {\r\n //////console.log(content);\r\n angular.forEach(content, function (u) {\r\n var usrExist = false;\r\n angular.forEach($scope.Inst.Users, function (iu) {\r\n if (u.Username == iu.Username) {\r\n usrExist = true;\r\n iu.Email = u.Email;\r\n iu.FirstName = u.FirstName;\r\n iu.LastName = u.LastName;\r\n iu.ClassName = u.ClassName;\r\n }\r\n });\r\n if (!usrExist) {\r\n $scope.Inst.Users.push(u);\r\n }\r\n });\r\n Institution.SavePrompt = true;\r\n }\r\n $scope.CalculteAllocation = function (i,fn) {\r\n if (i.Users && i.Settings) {\r\n $scope.UnAllocatedCount = 0\r\n $scope.StakeHolderCount = 0\r\n $scope.StudentCount = 0\r\n $scope.InactiveCount = 0\r\n $scope.FacultyCount = 0\r\n $scope.AdminCount = 0\r\n angular.forEach(i.Users, function (u) {\r\n var al = false;\r\n angular.forEach(i.Settings.StudentClasses, function (sc) {\r\n if (u.ClassName == sc) { $scope.StudentCount += 1; al = true; }\r\n });\r\n angular.forEach(i.Settings.InactiveClasses, function (ia) {\r\n if (u.ClassName == ia) { $scope.InactiveCount += 1; al = true; }\r\n });\r\n if (u.ClassName == i.Settings.FacultyTerm) { $scope.FacultyCount += 1; al = true; }\r\n if (u.ClassName == i.Settings.AdminTerm) { $scope.AdminCount += 1; al = true; }\r\n if (u.ClassName == 'Stake Holder') { $scope.StakeHolderCount += 1; al = true; }\r\n if (al == false) { $scope.UnAllocatedCount += 1 }\r\n });\r\n var isValid = true;\r\n if ($scope.FacultyCount > i.FacultySlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.FacultyTerm + '
Limit: ' + i.FacultySlots + '
Allocated: ' + $scope.FacultyCount, '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if ($scope.StudentCount > i.StudentSlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.LearnerTerm + '
Limit: ' + i.StudentSlots + '
Allocated: ' + $scope.StudentCount, '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (fn) { fn(isValid) }\r\n }\r\n }\r\n\r\n $scope.LoadAssets = function (i) {\r\n if (!i.Assigned || !i.Available) {\r\n $http.post(\"/Execute/GetInstitutionCourses\", [i.Id]).success(function (data) {\r\n i.Assigned = data.RS_0;\r\n i.Available = data.RS_1;\r\n //////console.log(i)\r\n });\r\n }\r\n }\r\n $scope.LoadUsers = function (i) {\r\n $scope.LoadSettings(i, function () {\r\n if (!i.Users) {\r\n i.InactiveUsers = [];\r\n if (!i.Classes) { i.Classes = []; }\r\n $http.post(\"/Execute/GetInstitutionMembers\", [i.Id]).success(function (data) {\r\n if (data.RS_0) {\r\n i.Users = data.RS_0;\r\n }\r\n else {\r\n i.Users = []\r\n }\r\n angular.forEach(i.Users, function (u) {\r\n u.drag = true;\r\n var ClassExists = false;\r\n var cls\r\n angular.forEach(i.Classes, function (c) {\r\n if (c.Name == u.ClassName) {\r\n ClassExists = true;\r\n cls = c;\r\n }\r\n });\r\n if (ClassExists == false) {\r\n cls = { Name: u.ClassName, Members: [] }\r\n i.Classes.push(cls);\r\n }\r\n if (u.ClassName == '') { u.ClassName = 'Unassigned' }\r\n cls.Members.push(u);\r\n \r\n $http.get(\"/GetPassword/\" + u.Username).success(function (pass) {\r\n u.Password = pass\r\n });\r\n $scope.CalculteAllocation(i);\r\n });\r\n });\r\n $scope.Inst = i;\r\n }\r\n });\r\n }\r\n $scope.$watch(function () {\r\n return $location.path();\r\n },\r\n function (a) {\r\n //////console.log(a)\r\n if (a.startsWith('/ProgramDashboard/'))\r\n {\r\n switch (a) {\r\n case '/ProgramDashboard/':\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n case '/ProgramDashboard/Assignment Activity':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case '/ProgramDashboard/User Activity':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case '/ProgramDashboard/Activity by Course':\r\n $scope.SelectedTabIndex = 3;\r\n break;\r\n case '/ProgramDashboard/Assignment Manager':\r\n $scope.SelectedTabIndex = 4;\r\n break;\r\n case '/ProgramDashboard/Quick Quiz Data':\r\n $scope.SelectedTabIndex = 5;\r\n break;\r\n case '/ProgramDashboard/Home':\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n case '/ProgramDashboard/Manage Users':\r\n $scope.SelectedTabIndex = 6;\r\n break;\r\n default:\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n }\r\n\r\n }\r\n });\r\n //$scope.$on('$routeChangeStart', function (e, next, last) {\r\n // //////console.log(e)\r\n // if (next.$$route.controller === last.$$route.controller) {\r\n // e.preventDefault();\r\n // $route.current = last.$$route;\r\n // //////console.log(\"ss\")\r\n // }\r\n //});\r\n $scope.LoadSettings = function (i, fn) {\r\n if (!i.Settings) {\r\n $scope.FacultyRoles = angular.copy(Globals.InstitutionalFacultyRoles);\r\n $scope.LearnerRoles = angular.copy(Globals.InstitutionalLearnerRoles);\r\n $scope.AdminRoles = angular.copy(Globals.InstitutionalAdminRoles);\r\n if (!i.Settings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [i.Id]).success(function (data) {\r\n if (data.RS_0.length > 0) {\r\n i.Settings = JSON.parse(data.RS_0[0].SettingsJSON);\r\n }\r\n else {\r\n i.Settings = {\r\n FacultyTerm: \"Faculty\",\r\n FacultyRoles: [],\r\n LearnerTerm: \"Student\",\r\n LearnerRoles: [],\r\n StudentClasses: [\"PGY1\", \"PGY2\", \"PGY3\"],\r\n InactiveClasses: [\"Graduated\"],\r\n Classes: function () {\r\n var lst = angular.copy(this.StudentClasses);\r\n lst.unshift(this.FacultyTerm)\r\n return lst;\r\n }\r\n }\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n\r\n if (fn) { fn(); }\r\n });\r\n } else {\r\n if (!i.Settings.InactiveClasses) {\r\n i.Settings.InactiveClasses = [\"Graduated\"]\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n if (fn) { fn(); }\r\n }\r\n } else {\r\n if (fn) { fn(); }\r\n }\r\n }\r\n $scope.SetURL = function (idx) {\r\n switch (idx) {\r\n case 0:\r\n $location.url('/ProgramDashboard/')\r\n //$scope.$apply();\r\n break;\r\n case 1:\r\n $location.url('/ProgramDashboard/Assignment Activity')\r\n //$scope.$apply();\r\n break;\r\n case 2:\r\n $location.url('/ProgramDashboard/User Activity')\r\n //$scope.$apply();\r\n break;\r\n case 3:\r\n $location.url('/ProgramDashboard/Activity by Course')\r\n //$scope.$apply();\r\n break;\r\n case 4:\r\n $location.url('/ProgramDashboard/Assignment Manager')\r\n //$scope.$apply();\r\n break;\r\n case 5:\r\n $location.url('/ProgramDashboard/Quick Quiz Data')\r\n //$scope.$apply();\r\n break;\r\n case 6:\r\n $location.url('/ProgramDashboard/Manage Users')\r\n //$scope.$apply();\r\n break;\r\n default:\r\n $location.url('/ProgramDashboard/')\r\n //$scope.$apply();\r\n break;\r\n }\r\n\r\n }\r\n $scope.SaveUsers = function (i) {\r\n $scope.CalculteAllocation(i, function (isValid) {\r\n if (isValid) {\r\n //////console.log('valid');\r\n $http.post(\"/UpdateInstitutionUser/\" + i.Id, i.Users).success(function (d) {\r\n //////console.log(d);\r\n toastr['success']('Users Saved', '

Success

');\r\n //////console.log(i)\r\n i.SavePrompt = false;\r\n });\r\n }\r\n });\r\n //angular.extend(toastrConfig, $scope.ToastOptions);\r\n //openedToasts.push(toastr['error']('Please Correct The Following
  • Error 1
  • Error 2
', '

Validation Error

'));\r\n //var strOptions = {};\r\n //for (var o in $scope.options) if (o != 'msg' && o != 'title') strOptions[o] = $scope.options[o];\r\n //$scope.optionsStr = \"toastr.\" + $scope.options.type + \"(\\'\" + $scope.options.msg + \"\\', \\'\" + $scope.options.title + \"\\', \" + JSON.stringify(strOptions, null, 2) + \")\";\r\n\r\n }\r\n $scope.LoadInstitution = function () {\r\n $location.url('/ProgramDashboard/Manage Users')\r\n $http.post(\"/Execute/GetInstitution\", [$scope.User.InstitutionId]).success(function (data) {\r\n var inst = data.RS_0[0];\r\n ////////console.log(inst)\r\n inst.ImpersonateEmail = (inst.ImpersonateEmail == \"True\");\r\n inst.Inactive = (inst.Inactive == \"True\");\r\n inst.InactiveT = inst.Inactive;\r\n inst.SavePrompt = false;\r\n $scope.Classifications = data.RS_1;\r\n $scope.LoadUsers(inst);\r\n $scope.LoadAssets(inst);\r\n });\r\n }\r\n $scope.LoadTab = function () {\r\n ////////console.log($scope.selectedtab)\r\n switch ($scope.selectedtab) {\r\n case 'Assignment Activity':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case 'User Activity':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case 'Activity by Course':\r\n $scope.SelectedTabIndex = 3;\r\n break;\r\n case 'Assignment Manager':\r\n $scope.SelectedTabIndex = 4;\r\n break;\r\n case 'Quick Quiz Data':\r\n $scope.SelectedTabIndex = 5;\r\n break;\r\n case 'Home':\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n case 'Manage Users':\r\n $scope.SelectedTabIndex = 6;\r\n break;\r\n default:\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n }\r\n };\r\n $scope.LoadTab();\r\n }\r\n }\r\n});\r\napp.directive('institutionbyassignmentPaged', function ($parse, $http, $compile, App, $rootScope, $uibModal, toastr, toastrConfig) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/InstitutionByAssignmentPaged.htm',\r\n controller: function ($scope, $http, $rootScope, $filter, $location) {\r\n angular.extend(toastrConfig,\r\n {\r\n \r\n positionClass: 'toast-top-full-width',\r\n \r\n\r\n });\r\n function GetAssForExport(idx, lst, o, fn) {\r\n if (idx < lst.length) {\r\n var p = lst[idx]\r\n ////console.log(p)\r\n var params = [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTimeString, p.EffectiveDateTimeString]\r\n ////console.log(p)\r\n $http.post(\"/Execute/GetAssignmentDetailv3\", params).success(function (data) {\r\n ////console.log(data.RS_0)\r\n angular.forEach(data.RS_0, function (i) {\r\n if (i.TimesTaken != \"\") {\r\n var row = {\"AssignmentName\": lst[idx].Label, \"Effective\": lst[idx].EffectiveDateTimeDisplay, Due: lst[idx].DueDateTimeDisplay, IsCustom: (i.IsCustom != 0), \"Class\": i.Class, \"FirstName\": i.FirstName, \"LastName\": i.LastName, \"Best\": i.Highest, \"CompletedDate\": i.CompletedDate, \"HighScore\": i.Highest, \"LowScore\": i.Lowest, \"AverageScore\": i.Average, TimesTaken: i.TimesTaken };\r\n ////console.log(o)\r\n o.push(row);\r\n }\r\n })\r\n GetAssForExport(idx + 1, lst, o, fn)\r\n });\r\n } else {\r\n fn(o)\r\n }\r\n }\r\n $scope.User = $rootScope.User;\r\n $scope.IsExporting = false;\r\n $scope.ProcessExport = function () {\r\n $scope.IsExporting = true;\r\n ////console.log($scope.pagedItems)\r\n var items = []\r\n angular.forEach($scope.pagedItems, function (pg) {\r\n angular.forEach(pg, function (itm) {\r\n ////console.log(itm);\r\n items.push(itm)\r\n //items.push({\r\n // AssignmentName: itm.Label,\r\n // Effective: itm.EffectiveDateTime,\r\n // Due: itm.DueDateTime,\r\n // AssigneeCount: itm.AssignmentCount,\r\n // Complete: itm.CompletedOnTime,\r\n // Incomplete: itm.Delinquent\r\n //});\r\n });\r\n });\r\n var out = []\r\n GetAssForExport(0, items, out, function () {\r\n //console.log(out);\r\n var form = document.createElement('form');\r\n form.action = '/Export' + guid() + '.csv';\r\n form.method = 'POST';\r\n form.target = '_blank';\r\n form.style.display = 'none';\r\n\r\n var input = document.createElement('input');\r\n input.type = 'text';\r\n input.name = 'data';\r\n input.value = JSON.stringify(out);\r\n\r\n var submit = document.createElement('input');\r\n submit.type = 'submit';\r\n submit.id = 'submitProject';\r\n\r\n form.appendChild(input);\r\n form.appendChild(submit);\r\n document.body.appendChild(form);\r\n ////console.log(form)\r\n form.submit()\r\n document.body.removeChild(form);\r\n ////console.log(form)\r\n $scope.IsExporting = false;\r\n })\r\n }\r\n $scope.InstitutionUserList = $rootScope.InstitutionUserList\r\n $scope.ShowByStatus = '';\r\n $scope.assignmentLabels = [\"Complete\", \"Failed\", \"Active\"];\r\n $scope.assignmentOptions = {\r\n segmentShowStroke: false,\r\n responsive: true,\r\n maintainAspectRatio: false,\r\n tooltips: false\r\n };\r\n $scope.IsOn = true;\r\n $scope.assignmentDataNotActiveColors = ['rgb(153, 153, 153)', 'rgb(153, 153, 153)', 'rgb(153, 153, 153)', 'rgb(153, 153, 153)', 'rgb(153, 153, 153)', 'rgb(153, 153, 153)', 'rgb(153, 153, 153)']\r\n $scope.assignmentDataNotActiveOptions = {\r\n segmentShowStroke: false,\r\n responsive: true,\r\n maintainAspectRatio: false,\r\n fill: true,\r\n colors: ['red'],\r\n tooltips: false\r\n };\r\n $scope.Archive = function (p) {\r\n $http.post('/Execute/GetAssignmentDefinitionFull', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.EffectiveDateTime.toISOString().replace(\".000Z\", \"\"), p.DueDateTime.toISOString().replace(\".000Z\", \"\")]).success(function (data) {\r\n $scope.assignments = data.RS_1;\r\n ////console.log($scope.assignments)\r\n var params = [];\r\n angular.forEach($scope.assignments, function (a) {\r\n params.push(a.Id)\r\n })\r\n params = params.join(',')\r\n ////console.log(params)\r\n $http.post('/Execute/ArchiveAssignments', [params]).success(function (d) {\r\n $scope.archived = d;\r\n ////console.log(d)\r\n alert('Assignment Archived')\r\n $scope.loadassignment();\r\n })\r\n });\r\n }\r\n\r\n $scope.EditAssignment = function (p) {\r\n var assignmentModal = $uibModal.open({\r\n templateUrl: 'app/tpls/EditAssignment.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $sce, $rootScope, $filter, $timeout, $uibModal) {\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n $scope.IdArray = [];\r\n $scope.AssignmentName = p.Label;\r\n $scope.ScoresSumForAvg = 0;\r\n $scope.NumberOfScores = 0;\r\n $scope.ListOfScores = [];\r\n $scope.AddAssignees = function (obj, evt) {\r\n if (!obj.AddAssignees) {\r\n obj.AddAssignees = { visible: false, top: evt.pageY, left: evt.pageX }\r\n }\r\n obj.AddAssignees.visible = !obj.AddAssignees.visible;\r\n $scope.CurrentAssignment = obj;\r\n \r\n }\r\n $scope.Reassign = function (obj, evt) {\r\n if (!obj.Reassign) {\r\n obj.Reassign = { visible: false, top: evt.pageY, left: evt.pageX }\r\n }\r\n obj.Reassign.visible = !obj.Reassign.visible;\r\n $scope.CurrentAssignment = obj;\r\n }\r\n ////////console.log($scope.Assignment)\r\n $scope.Today = new Date();\r\n $scope.TodayPlusWeek = (new Date).addDays(14)\r\n //console.log(p)\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $http.post('/Execute/GetAssignmentDefinitionFull', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.EffectiveDateTime, p.DueDateTime]).success(function (d) {\r\n $scope.AssignmentDefinition = d.RS_0[0];\r\n $scope.AssignmentDefinition.EffectiveDateTime = new Date(p.EffectiveDateTime + ' UTC');\r\n //$scope.AssignmentDefinition.EffectiveDateTimeDisplay = new Date(p.EffectiveDateTime + ' UTC');\r\n $scope.AssignmentDefinition.DueDateTime = new Date(p.DueDateTime + ' UTC');\r\n //$scope.AssignmentDefinition.DueDateTimeDisplay = new Date(p.DueDateTime + ' UTC');\r\n if ($scope.AssignmentDefinition.NotifyComplete == \"True\") {\r\n $scope.AssignmentDefinition.NotifyComplete = 1;\r\n }\r\n if ($scope.AssignmentDefinition.NotifyComplete == \"False\" || $scope.AssignmentDefinition.NotifyComplete == '') {\r\n $scope.AssignmentDefinition.NotifyComplete = 0;\r\n }\r\n if ($scope.AssignmentDefinition.DueDateNotify == \"True\") {\r\n $scope.AssignmentDefinition.DueDateNotify = 1;\r\n }\r\n if ($scope.AssignmentDefinition.DueDateNotify == \"False\" || $scope.AssignmentDefinition.DueDateNotify == '') {\r\n $scope.AssignmentDefinition.DueDateNotify = 0;\r\n }\r\n $scope.AssignmentDefinition.PendingHours = $scope.AssignmentDefinition.PendingHours / 24;\r\n if ($scope.AssignmentDefinition.PendingHours < 0) {\r\n $scope.AssignmentDefinition.PendingHours = 0;\r\n }\r\n $scope.AssignmentDefinition.ReminderHours = $scope.AssignmentDefinition.ReminderHours / 24;\r\n if ($scope.AssignmentDefinition.ReminderHours < 0) {\r\n $scope.AssignmentDefinition.ReminderHours = 0;\r\n }\r\n $scope.AssignmentDefinition.Passing_Score = Number($scope.AssignmentDefinition.Passing_Score)\r\n if ($scope.AssignmentDefinition.ReminderHours > 0) {\r\n $scope.ReminderIncomplete = true;\r\n }\r\n else {\r\n $scope.ReminderIncomplete = false;\r\n }\r\n if ($scope.AssignmentDefinition.PendingHours > 0) {\r\n $scope.SendIncompletePending = true;\r\n }\r\n else {\r\n $scope.SendIncompletePending = false;\r\n }\r\n $scope.AssignmentDefinition.NotifyComplete = Number($scope.AssignmentDefinition.NotifyComplete)\r\n $scope.AssignmentDefinition.NumberOfTries = Number($scope.AssignmentDefinition.NumberOfTries)\r\n $scope.AssignmentDefinition.MinutesAllocated = Number($scope.AssignmentDefinition.MinutesAllocated)\r\n $scope.OldAssignDefinition = $scope.AssignmentDefinition;\r\n $scope.AssignmentDefinition.NotifyUpdatedAssignment = \"0\";\r\n //console.log($scope.AssignmentDefinition)\r\n //console.log($scope.AssignmentDefinition.ReminderHours)\r\n //console.log($scope.ReminderIncomplete)\r\n //console.log($scope.SendIncompletePending)\r\n if ($scope.AssignmentDefinition.Note.length > 150) {\r\n $scope.AssignmentDefinition.Note = '';\r\n }\r\n //if ($scope.AssignmentDefinition.PracticeReview == '') {\r\n // $scope.AssignmentDefinition.PracticeReview = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.Viewablity == '') {\r\n // $scope.AssignmentDefinition.Viewablity = '1';\r\n //}\r\n //if ($scope.AssignmentDefinition.ShowLeaderBoard == '') {\r\n // $scope.AssignmentDefinition.ShowLeaderBoard = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.PrescriptiveReport == '') {\r\n // $scope.AssignmentDefinition.PrescriptiveReport = '2';\r\n //}\r\n //if ($scope.AssignmentDefinition.NumberOfTries == '') {\r\n // $scope.AssignmentDefinition.NumberOfTries = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.MinutesAllocated == NaN || $scope.AssignmentDefinition.MinutesAllocated == '') {\r\n // $scope.AssignmentDefinition.MinutesAllocated = 0;\r\n //}\r\n ////console.log($scope.AssignmentDefinition)\r\n ////console.log(d)\r\n //d.RS_0[0] = populated values\r\n angular.forEach(d.RS_1, function (r) {\r\n $scope.IdArray.push(r.Id);\r\n });\r\n ////////console.log($scope.IdArray)\r\n $scope.institution = [];\r\n $scope.AdvancedEdit = function (id, Assignment) {\r\n $rootScope.AssignmentDefinition = Assignment;\r\n $location.path(\"/assignment/\" + id);\r\n }\r\n ////console.log(p)\r\n $http.post('/Execute/GetAssignmentDetailv3', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTimeString, p.EffectiveDateTimeString]).success(function (datas) {\r\n\r\n $scope.Assignment = datas.RS_0;\r\n //console.log($scope.Assignment)\r\n\r\n //$scope.AssignmentUsers = p.Assignees;\r\n ////////console.log($scope.AssignmentUsers)\r\n $scope.Assignment.Classes = [];\r\n var tot = 0;\r\n var totcnt = 0;\r\n \r\n angular.forEach($scope.Assignment, function (u) {\r\n u.Highest = 1 * u.Highest;\r\n if (u.Highest > 0) {\r\n tot = (tot + 1 * u.Highest);\r\n totcnt++;\r\n }\r\n $scope.ScoresSumForAvg += u.Highest;\r\n if (u.Highest > 0) {\r\n $scope.NumberOfScores++;\r\n $scope.ListOfScores.push(u.Highest);\r\n }\r\n u.TimesTaken = 1 * u.TimesTaken;\r\n $scope.TotalAttempts += u.TimesTaken;\r\n if (((1 * u.Highest) < (1 * u.Passing_Score)) && ((1 * u.TimesTaken) > 0)) {\r\n $scope.FailFails++;\r\n u.AssStatus = 'Fail';\r\n }\r\n if (u.TimesTaken == 0) {\r\n $scope.NoAttempt++;\r\n u.AssStatus = 'NoAttempt';\r\n }\r\n if ((1 * u.Highest) >= (1 * u.Passing_Score)) {\r\n $scope.Passed++;\r\n u.AssStatus = 'Pass';\r\n }\r\n var AssClass = null;\r\n \r\n u.EffectiveOpen = false;\r\n \r\n if (u.CompletedDate != null && u.CompletedDate != \"\") {\r\n if (typeof (u.CompletedDate) == 'undefined') {\r\n u.CompletedDate = null;\r\n } else {\r\n try {\r\n u.CompletedDate = new Date(u.CompletedDate + \" UTC\");\r\n } catch (e) {\r\n u.CompletedDate = null;\r\n }\r\n }\r\n }\r\n u.DueDateOpen = false;\r\n u.Unassign = false;\r\n u.isDirty = false;\r\n angular.forEach($scope.Assignment.Classes, function (cls) {\r\n if (cls.Name == u.Class) {\r\n AssClass = cls;\r\n }\r\n });\r\n if (AssClass == null) {\r\n AssClass = { \"Name\": u.Class, Unassign: false, \"Students\": [] }\r\n $scope.Assignment.Classes.push(AssClass);\r\n }\r\n ////////////////console.log(st)\r\n AssClass.Students.push(u);\r\n ////////console.log($scope.Assignment.Classes)\r\n });\r\n if (totcnt > 0) {\r\n $scope.AssAverage = (tot / totcnt).toFixed(0);\r\n } else {\r\n $scope.AssAverage = 0;\r\n }\r\n $scope.Delete = function (p) {\r\n if (confirm('Are you sure you want to delete this Assignment? You can not undo this.')) {\r\n toastr['info']('', 'Deleting Assignments...', {\r\n positionClass: 'toast-top-full-width',\r\n allowHtml: true,\r\n timeOut: 0,\r\n extendedTimeOut: 0,\r\n //autoDismiss: false,\r\n \r\n onShown: function () {\r\n var lst = [];\r\n $scope.AssignmenttoDelete = p\r\n angular.forEach($scope.AssignmenttoDelete, function (asdel) {\r\n ////console.log(asdel)\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [asdel.AssignmentId, $scope.User.UserId] });\r\n ////console.log('deleted')\r\n })\r\n $scope.Pocess(0, lst, function () {\r\n toastr.clear()\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n }\r\n })\r\n }\r\n };\r\n \r\n $scope.UpdateDue = function (due) {\r\n $scope.AssignmentDefinition.DueDateTime = new Date(due);\r\n //$scope.Assignment.DueDateTime = Date.parse($scope.Assignment.DueDateTime)\r\n\r\n }\r\n $scope.UpdateEffective = function (eff) {\r\n $scope.AssignmentDefinition.EffectiveDateTime = eff;\r\n //$scope.Assignment.EffectiveDateTime = Date.parse($scope.Assignment.EffectiveDateTime)\r\n }\r\n $scope.AvgHighest = ($scope.NumberOfScores > 0 ? ($scope.ScoresSumForAvg / $scope.NumberOfScores) : \"No Scores\");\r\n $scope.HighestBest = $scope.ListOfScores[$scope.ListOfScores.length - 1];\r\n $scope.LowestBest = $scope.ListOfScores[0];\r\n ////////console.log($scope.HighestBest)\r\n var newAssigneesArray = [];\r\n $scope.newAssignees = [];\r\n $scope.InstitutionUsersList = $rootScope.InstitutionUserList\r\n angular.forEach($rootScope.InstitutionUserList, function (iu) {\r\n \r\n angular.forEach($scope.Assignment, function (assign) {\r\n if (assign.Student_id === iu.UserID) {\r\n assign.Email = iu.Email;\r\n }\r\n })\r\n var found = $filter('filter')($scope.Assignment, { Student_id: iu.UserID }, true);\r\n \r\n if (found.length === 0) {\r\n newAssigneesArray.push(iu);\r\n }\r\n\r\n });\r\n $scope.UnassignClicked = function (User, selected) {\r\n User.Unassign = selected;\r\n $scope.UnassignButton = true;\r\n //////console.log(User)\r\n }\r\n $scope.UnassignUsers = function (Assignment) {\r\n var lst = [];\r\n angular.forEach(Assignment, function (st) {\r\n if (st.Unassign == true) {\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [st.AssignmentId, $scope.User.UserId] });\r\n ////console.log('Assignment Deleted')\r\n }\r\n })\r\n $scope.Pocess(0, lst, function () {\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n }\r\n $scope.newAssignees = newAssigneesArray;\r\n $scope.ActiveAssignees = [];\r\n if ($rootScope.InstitutionSettings.InactiveClasses) {\r\n angular.forEach($scope.newAssignees, function (stu) {\r\n if (!$rootScope.InstitutionSettings.InactiveClasses.includes(stu.Class)) {\r\n $scope.ActiveAssignees.push(stu)\r\n //////console.log(stu)\r\n }\r\n });\r\n $scope.newAssignees = $scope.ActiveAssignees;\r\n }\r\n \r\n ////console.log($scope.newAssignees)\r\n $scope.EditLeaderboard = function (lb) {\r\n $scope.AssignmentDefinition.ShowLeaderBoard = lb;\r\n ////console.log($scope.AssignmentDefinition.ShowLeaderBoard)\r\n }\r\n $scope.EditViewability = function (view) {\r\n $scope.AssignmentDefinition.Viewability = view;\r\n }\r\n $scope.EditPracticeReview = function (pr) {\r\n $scope.AssignmentDefinition.PracticeReview = pr;\r\n }\r\n $scope.EditAttempts = function () {\r\n $scope.EditAtmps = !$scope.EditAtmps;\r\n }\r\n $scope.EditTimeLimit = function () {\r\n $scope.EditTime = !$scope.EditTime;\r\n }\r\n \r\n $scope.SetReminderIncomplete = function (val) {\r\n //$scope.ReminderIncomplete = val;\r\n //if (val == true) {\r\n // $scope.ReminderIncomplete = true;\r\n //}\r\n //else {\r\n // $scope.ReminderIncomplete = false;\r\n //}\r\n //console.log($scope.ReminderIncomplete)\r\n //console.log(val)\r\n }\r\n $scope.SetSendPendingHours = function (v) {\r\n $scope.PendingHours = v;\r\n if ($scope.PendingHours < 0) {\r\n $scope.PendingHours = 0;\r\n }\r\n }\r\n $scope.SetSendPendingRecipients = function (v) {\r\n $scope.PendingRecipients = v;\r\n }\r\n $scope.SetSendIncompletePending = function (v) {\r\n $scope.SendIncompletePending = v;\r\n }\r\n $scope.SetDueDateNotify = function (v) {\r\n $scope.AssignmentDefinition.DueDateNotify = v;\r\n }\r\n $scope.SetDueDateRecipients = function (v) {\r\n $scope.AssignmentDefinition.DueDateRecipients = v;\r\n }\r\n $scope.SetNotifyComplete = function (v) {\r\n $scope.AssignmentDefinition.NotifyComplete = v;\r\n //console.log(v)\r\n }\r\n $scope.SetCompleteRecipients = function (v) {\r\n $scope.AssignmentDefinition.CompleteRecipients = v;\r\n }\r\n $scope.SetPassingScore = function (PassingScore) {\r\n $scope.AssignmentDefinition.Passing_Score = parseInt(PassingScore)\r\n }\r\n $scope.SetMinutesAllocated = function (v) {\r\n if (isNaN(v)) {\r\n $scope.AssignmentDefinition.MinutesAllocated = 0;\r\n $scope.$apply();\r\n } else {\r\n $scope.AssignmentDefinition.MinutesAllocated = v;\r\n }\r\n ////console.log($scope.AssignmentDefinition.MinutesAllocated)\r\n }\r\n $scope.SetNumTries = function (v) {\r\n if (isNaN(v)) {\r\n $scope.AssignmentDefinition.NumberOfTries = 0;\r\n $scope.$apply();\r\n } else {\r\n $scope.AssignmentDefinition.NumberOfTries = v;\r\n }\r\n //console.log($scope.AssignmentDefinition.NumberOfTries)\r\n }\r\n $scope.SetReminderHours = function (v) {\r\n $scope.AssignmentDefinition.ReminderHours = v;\r\n if ($scope.AssignmentDefinition.ReminderHours < 0) {\r\n $scope.AssignmentDefinition.ReminderHours = 0;\r\n }\r\n }\r\n //console.log($scope.Assignment)\r\n $scope.selectedAssignees = [];\r\n $scope.SelectAll = {};\r\n $scope.SelectAll.AllSelected = false;\r\n $scope.selectAllAssignees = function () {\r\n $scope.selectedAssignees = [];\r\n angular.forEach($scope.newAssignees, function (na) {\r\n if ($scope.SelectAll.AllSelected == true) {\r\n na.Selected = true;\r\n } else {\r\n na.Selected = false;\r\n }\r\n });\r\n if ($scope.SelectAll.AllSelected == true) {\r\n angular.forEach($scope.newAssignees, function (na) {\r\n na.Selected = true;\r\n if (na.UserID !== '') {\r\n $scope.selectedAssignees.push(na.UserID)\r\n }\r\n });\r\n } else {\r\n angular.forEach($scope.newAssignees, function (na) {\r\n na.Selected = false;\r\n $scope.selectedAssignees.splice($scope.selectedAssignees.indexOf(na.UserID), 1);\r\n });\r\n }\r\n //console.log($scope.selectedAssignees)\r\n }\r\n $scope.selectAssignees = function (student, selected) {\r\n \r\n if (student.Selected === true) {\r\n $scope.selectedAssignees.push(student.UserID)\r\n }\r\n else {\r\n $scope.SelectAll.AllSelected = false;\r\n $scope.selectedAssignees.splice($scope.selectedAssignees.indexOf(student.UserID), 1);\r\n }\r\n //////console.log($scope.selectedAssignees)\r\n }\r\n //console.log($scope.Assignment);\r\n \r\n\r\n $scope.SaveSingleAssignment = function (user, NewStart, NewEnd) {\r\n ////console.log(user)\r\n var p = [];\r\n ////console.log($scope.AssignmentDefinition)\r\n NewStart = NewStart.setHours(0, 1, 0, 0)\r\n NewEnd = NewEnd.setHours(23, 59, 0, 0);\r\n NewStart = new Date(NewStart)\r\n NewEnd = new Date(NewEnd)\r\n var p = [];\r\n p[0] = user.Student_id;\r\n p[1] = user.CourseId.toString();\r\n p[2] = ((user.ChapterId != null) ? user.ChapterId : 0).toString();\r\n p[3] = ((isNaN(user.TopicId) == false && user.TopicId != '') ? user.TopicId : 0).toString();\r\n p[4] = ((isNaN(user.SubTopicId) == false && user.SubTopicId != '') ? user.SubTopicId : 0).toString();\r\n p[5] = ((user.AssessmentId != null) ? user.AssessmentId : 0).toString();\r\n p[6] = parseInt(user.Passing_Score);\r\n p[7] = new Date(NewStart).toISOString().replace('.000Z', '');\r\n p[8] = new Date(NewEnd).toISOString().replace('.000Z', '');\r\n p[9] = parseInt($scope.AssignmentDefinition.AssignedByUserId);\r\n p[10] = $scope.AssignmentDefinition.Note;\r\n p[11] = ($scope.AssignmentDefinition.Viewablity) ? $scope.AssignmentDefinition.Viewablity : 1;\r\n p[12] = ($scope.AssignmentDefinition.MinutesAllocated) ? $scope.AssignmentDefinition.MinutesAllocated : 0; //Minutes Allocated -- Placeholder [0 represents no time limit]\r\n p[13] = parseInt($scope.AssignmentDefinition.NumberOfTries ? $scope.AssignmentDefinition.NumberOfTries : 0);\r\n p[14] = ($scope.AssignmentDefinition.ShowLeaderBoard) ? $scope.AssignmentDefinition.ShowLeaderBoard : 0;\r\n p[15] = ($scope.AssignmentDefinition.PracticeReview) ? $scope.AssignmentDefinition.PracticeReview : 1;\r\n p[16] = ($scope.AssignmentDefinition.PrescriptiveReport) ? $scope.AssignmentDefinition.PrescriptiveReport : 1;\r\n p[17] = \"\";\r\n p[18] = (($scope.ReminderIncomplete == true) ? $scope.AssignmentDefinition.ReminderHours * 24 : -1); //ReminderHours\r\n p[19] = $scope.AssignmentDefinition.DueDateNotify; //DueDateNotify\r\n p[20] = (($scope.SendIncompletePending == true) ? $scope.AssignmentDefinition.PendingHours * 24 : -1); //PendingHours\r\n p[21] = $scope.AssignmentDefinition.NotifyComplete; //NotifyComplete\r\n p[22] = $scope.AssignmentDefinition.DueDateRecipients; //DueDateRecipients\r\n p[23] = $scope.AssignmentDefinition.PendingRecipients; //PendingRecipients\r\n p[24] = $scope.AssignmentDefinition.CompleteRecipients; //CompleteRecipients\r\n p[25] = $scope.AssignmentDefinition.NotifyUpdatedAssignment; //NotifyCode\r\n //console.log(p)\r\n $http.post(\"/Execute/SaveAssignmentWithNotify\", p).success(function (data) {\r\n $scope.NewAssignment = data.RS_0;\r\n $scope.NewAssignment = data.RS_0;\r\n if ($scope.AssignmentDefinition.NotifyUpdatedAssignment == 1 || $scope.AssignmentDefinition.NotifyUpdatedAssignment == 3) {\r\n var emailEffective = new Date($scope.AssignmentDefinition.EffectiveDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n var emailDue = new Date($scope.AssignmentDefinition.DueDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n var msg = {};\r\n var rooturl = document.domain;\r\n var ass = $scope.AssignmentDefinition;\r\n msg.ToName = st.FirstName + ' ' + st.LastName;\r\n msg.ToAddress = st.Email;\r\n msg.Subject = 'Attention ' + msg.ToName + ' - Your Challenger Course Assignment has been modified';\r\n //if (Institution.ImpersonateEmail == true) {\r\n // msg.FromName = $rootScope.User.DisplayName;\r\n // msg.FromAddress = $rootScope.User.Email;\r\n //}\r\n //else {\r\n if ($scope.AssignmentDefinition.PracticeReview == 1) {\r\n $scope.PracticeReviewmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 2) {\r\n $scope.PracticeReviewmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 3) {\r\n $scope.PracticeReviewmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 4) {\r\n $scope.PracticeReviewmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 0) {\r\n $scope.PracticeReviewmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 1) {\r\n $scope.PrescriptiveReportmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 2) {\r\n $scope.PrescriptiveReportmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 3) {\r\n $scope.PrescriptiveReportmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 4) {\r\n $scope.PrescriptiveReportmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 0) {\r\n $scope.PrescriptiveReportmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.MinutesAllocated > 0) {\r\n $scope.MinutesAllocatedmsg = 'Yes. ' + $scope.AssignmentDefinition.MinutesAllocated + ' Minutes.';\r\n };\r\n if ($scope.AssignmentDefinition.MinutesAllocated == 0) {\r\n $scope.MinutesAllocatedmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries > 0) {\r\n $scope.NumberOfTriesmsg = 'Yes. ' + $scope.AssignmentDefinition.NumberOfTries + ' Tries.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries == 0) {\r\n $scope.NumberOfTriesmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 1) {\r\n $scope.ShowLeaderBoardmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 2) {\r\n $scope.ShowLeaderBoardmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 3) {\r\n $scope.ShowLeaderBoardmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 4) {\r\n $scope.ShowLeaderBoardmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 0) {\r\n $scope.ShowLeaderBoardmsg = 'No.';\r\n }\r\n msg.FromName = \"Challenger CME\";\r\n msg.FromAddress = \"donotreply@challengercorporation.com\";\r\n //}\r\n msg.Body = \"The following work has been updated to you by \" + $scope.User.DisplayName;\r\n msg.Body += '

You can access your assignments by clicking \"My Assignments\" in your Challenger account at ' + rooturl + '.

';\r\n //msg.Body += '

Assignment Settings:
'\r\n //msg.Body += '

Can I see the Assignment\\'s Practice and Review sections? ' + $scope.PracticeReviewmsg + '
';\r\n //msg.Body += '

Can I review my answers after I have taken the Assignment? ' + $scope.PrescriptiveReportmsg + '
';\r\n //msg.Body += '

Is there a time limit? ' + $scope.MinutesAllocatedmsg + '
';\r\n //msg.Body += '

Is there a limited number of attempts allowed? ' + $scope.NumberOfTriesmsg + '
';\r\n //msg.Body += '

Is there a leaderboard? ' + $scope.MinutesAllocatedmsg + '

';\r\n if ($scope.AssignmentDefinition.CourseId == 0 || $scope.AssignmentDefinition.TopicId == 0) {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n else {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n\r\n\r\n\r\n //////console.log(msg)\r\n $http.post(\"/SendNotification\", msg).success(function (data) {\r\n $scope.Sent = data;\r\n //////console.log(data)\r\n //////console.log(msg)\r\n \r\n \r\n\r\n })\r\n }\r\n });\r\n \r\n \r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n }\r\n $scope.MakeAssignment = function () {\r\n $scope.howManyAssignees = $scope.selectedAssignees.length;\r\n $scope.selectedAssignees = $scope.selectedAssignees.toString();\r\n //console.log($scope.selectedAssignees)\r\n //CHANGE THE ASS PATH PROC BELOW ass ass ass\r\n var parambalams = [$scope.Assignment[0].AssignmentId, $scope.selectedAssignees, $scope.User.UserId, CurrentUserTZoffsett];\r\n //console.log(parambalams)\r\n $http.post(\"/Execute/CopyAssignmentToUsers\", parambalams).success(function (data) {\r\n //////console.log(parambalams)\r\n //console.log(data)\r\n angular.forEach($scope.newAssignees, function (as) {\r\n as.Selected = false;\r\n });\r\n \r\n assignmentModal.close($scope.Assignment)\r\n alert($scope.howManyAssignees + \" user\" + ($scope.howManyAssignees === 1 ? '' : 's') + \" added.\", \"Success!\");\r\n $scope.loadassignment();\r\n }).error(function () {\r\n alert(\"There was a problem copying the assignment to the selected users. Please try again in a few minutes.

If you continue to receive this message, contact support.\", \"Error\", \"error\");\r\n });\r\n };\r\n\r\n });\r\n });\r\n $scope.SaveProgress = 0;\r\n $scope.Pocess = function (idx, lst, fn) {\r\n if ((idx) < lst.length) {\r\n //////////////console.log(lst[idx])\r\n $http.post(lst[idx].URL, lst[idx].params).success(function (d) {\r\n ////////////////console.log(d)\r\n $scope.SaveProgress = ((idx + 1) / lst.length) * 100\r\n $scope.Pocess(idx + 1, lst, fn);\r\n }).error(function (err) {\r\n alert(\"Error\");\r\n $scope.SaveProgress = (idx + 1) / lst.length\r\n $scope.Pocess(idx + 1, lst, fn);\r\n });\r\n }\r\n else {\r\n fn();\r\n }\r\n }\r\n \r\n $scope.SaveChanges = function () {\r\n var lst = [];\r\n //var assignment = $scope.Assignment;\r\n //console.log($scope.AssignmentDefinition)\r\n ////console.log($scope.Assignment)\r\n if ($scope.Assignment.DueDateTime < $scope.Assignment.EffectiveDateTime) {\r\n swal('Error','Due Date cannot be set before Effective Date','warning');\r\n }\r\n if ($scope.AssignmentDefinition.Passing_Score > 100 || $scope.AssignmentDefinition.Passing_Score < 0) {\r\n swal('Error', 'Invalid Passing Score', 'warning');\r\n }\r\n if ($scope.AssignmentDefinition.MinutesAllocated < 0) {\r\n swal('Error', 'Invalid Time Limit', 'warning');\r\n }\r\n if (parseInt($scope.AssignmentDefinition.NumberOfTries) < 0) {\r\n swal('Error', 'Invalid Number of Attempts', 'warning');\r\n }\r\n ////console.log(parseInt($scope.AssignmentDefinition.NumberOfTries) >= 0)\r\n ////console.log(parseInt($scope.AssignmentDefinition.MinutesAllocated) >= 0)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score > 0)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score > 0)\r\n //if (parseInt($scope.AssignmentDefinition.NumberOfTries) >= 0 && parseInt($scope.AssignmentDefinition.MinutesAllocated) >= 0 && 100 >= $scope.AssignmentDefinition.Passing_Score && $scope.AssignmentDefinition.Passing_Score > 0 && $scope.AssignmentDefinition.DueDateTime > $scope.AssignmentDefinition.EffectiveDateTime) {\r\n \r\n $scope.AssignmentDefinition.EffectiveDateTime = $scope.AssignmentDefinition.EffectiveDateTime.setHours(0, 1, 0, 0)\r\n $scope.AssignmentDefinition.DueDateTime = $scope.AssignmentDefinition.DueDateTime.setHours(23, 59, 0, 0);\r\n $scope.AssignmentDefinition.DueDateTime = new Date($scope.AssignmentDefinition.DueDateTime)\r\n $scope.AssignmentDefinition.EffectiveDateTime = new Date($scope.AssignmentDefinition.EffectiveDateTime)\r\n angular.forEach($scope.Assignment.Classes, function (cls) {\r\n angular.forEach(cls.Students, function (st) {\r\n //////console.log(st)\r\n //////console.log($scope.Assignment)\r\n var s = [];\r\n s[0] = st.Student_id;\r\n s[1] = st.CourseId;\r\n s[2] = st.ChapterId;\r\n s[3] = st.TopicId;\r\n s[4] = 0 + \"\";\r\n s[5] = st.AssessmentId;\r\n s[6] = parseInt($scope.AssignmentDefinition.Passing_Score);\r\n s[7] = new Date($scope.AssignmentDefinition.EffectiveDateTime).toISOString().replace('.000Z', '');\r\n s[8] = new Date($scope.AssignmentDefinition.DueDateTime).toISOString().replace('.000Z', '');\r\n s[9] = $scope.AssignmentDefinition.AssignedByUserId;\r\n s[10] = $scope.AssignmentDefinition.Note;\r\n s[11] = ($scope.AssignmentDefinition.Viewablity) ? $scope.AssignmentDefinition.Viewablity : 1;\r\n s[12] = ($scope.AssignmentDefinition.MinutesAllocated) ? $scope.AssignmentDefinition.MinutesAllocated : 0; //Minutes Allocated -- Placeholder [0 represents no time limit]\r\n s[13] = parseInt($scope.AssignmentDefinition.NumberOfTries ? $scope.AssignmentDefinition.NumberOfTries : 0);\r\n s[14] = ($scope.AssignmentDefinition.ShowLeaderBoard) ? $scope.AssignmentDefinition.ShowLeaderBoard : 0;\r\n s[15] = ($scope.AssignmentDefinition.PracticeReview) ? $scope.AssignmentDefinition.PracticeReview : 1;\r\n s[16] = ($scope.AssignmentDefinition.PrescriptiveReport) ? $scope.AssignmentDefinition.PrescriptiveReport : 1;\r\n s[17] = st.AssignmentId;\r\n s[18] = (($scope.ReminderIncomplete == true) ? $scope.AssignmentDefinition.ReminderHours * 24 : -1); //ReminderHours\r\n s[19] = $scope.AssignmentDefinition.DueDateNotify; //DueDateNotify\r\n s[20] = (($scope.SendIncompletePending == true) ? $scope.AssignmentDefinition.PendingHours * 24 : -1); //PendingHours\r\n s[21] = $scope.AssignmentDefinition.NotifyComplete; //NotifyComplete\r\n s[22] = $scope.AssignmentDefinition.DueDateRecipients; //DueDateRecipients\r\n s[23] = $scope.AssignmentDefinition.PendingRecipients; //PendingRecipients\r\n s[24] = $scope.AssignmentDefinition.CompleteRecipients; //CompleteRecipients\r\n s[25] = $scope.AssignmentDefinition.NotifyUpdatedAssignment; //NotifyCode\r\n //console.log(s)\r\n $http.post(\"/Execute/SaveAssignmentWithNotify\", s).success(function (data) {\r\n $scope.NewAssignment = data.RS_0;\r\n //console.log(data)\r\n if ($scope.AssignmentDefinition.NotifyUpdatedAssignment == 1 || $scope.AssignmentDefinition.NotifyUpdatedAssignment == 3) {\r\n var emailEffective = new Date($scope.AssignmentDefinition.EffectiveDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n var emailDue = new Date($scope.AssignmentDefinition.DueDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n\r\n var msg = {};\r\n var rooturl = document.domain;\r\n var ass = $scope.AssignmentDefinition;\r\n msg.ToName = st.FirstName + ' ' + st.LastName;\r\n msg.ToAddress = st.Email;\r\n msg.Subject = 'Attention ' + msg.ToName + ' - Your assignment has been updated';\r\n //if (Institution.ImpersonateEmail == true) {\r\n // msg.FromName = $rootScope.User.DisplayName;\r\n // msg.FromAddress = $rootScope.User.Email;\r\n //}\r\n //else {\r\n if ($scope.AssignmentDefinition.PracticeReview == 1) {\r\n $scope.PracticeReviewmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 2) {\r\n $scope.PracticeReviewmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 3) {\r\n $scope.PracticeReviewmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 4) {\r\n $scope.PracticeReviewmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 0) {\r\n $scope.PracticeReviewmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 1) {\r\n $scope.PrescriptiveReportmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 2) {\r\n $scope.PrescriptiveReportmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 3) {\r\n $scope.PrescriptiveReportmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 4) {\r\n $scope.PrescriptiveReportmsg = 'Only available ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 0) {\r\n $scope.PrescriptiveReportmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.MinutesAllocated > 0) {\r\n $scope.MinutesAllocatedmsg = 'Yes. ' + $scope.AssignmentDefinition.MinutesAllocated + ' Minutes.';\r\n };\r\n if ($scope.AssignmentDefinition.MinutesAllocated == 0) {\r\n $scope.MinutesAllocatedmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries > 0) {\r\n $scope.NumberOfTriesmsg = 'Yes. ' + $scope.AssignmentDefinition.NumberOfTries + ' Tries.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries == 0) {\r\n $scope.NumberOfTriesmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 1) {\r\n $scope.ShowLeaderBoardmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 2) {\r\n $scope.ShowLeaderBoardmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 3) {\r\n $scope.ShowLeaderBoardmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 4) {\r\n $scope.ShowLeaderBoardmsg = 'Only available after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 0) {\r\n $scope.ShowLeaderBoardmsg = 'No.';\r\n }\r\n msg.FromName = \"Challenger CME\";\r\n msg.FromAddress = \"donotreply@challengercorporation.com\";\r\n //}\r\n msg.Body = \"The following work has been updated by \" + $scope.User.DisplayName;\r\n msg.Body += '

You can access your assignments by clicking \"My Assignments\" in your Challenger account at ' + rooturl + '.

';\r\n //msg.Body += '

Assignment Settings:
'\r\n //msg.Body += '

Can I see the Assignment\\'s Practice and Review sections? ' + $scope.PracticeReviewmsg + '
';\r\n //msg.Body += '

Can I review my answers after I have taken the Assignment? ' + $scope.PrescriptiveReportmsg + '
';\r\n //msg.Body += '

Is there a time limit? ' + $scope.MinutesAllocatedmsg + '
';\r\n //msg.Body += '

Is there a limited number of attempts allowed? ' + $scope.NumberOfTriesmsg + '
';\r\n //msg.Body += '

Is there a leaderboard? ' + $scope.MinutesAllocatedmsg + '

';\r\n if ($scope.AssignmentDefinition.CourseId == 0 || $scope.AssignmentDefinition.TopicId == 0) {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n else {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n\r\n //////console.log(msg)\r\n $http.post(\"/SendNotification\", msg).success(function (data) {\r\n $scope.Sent = data;\r\n //////console.log(data)\r\n //////console.log(msg)\r\n \r\n \r\n \r\n })\r\n }\r\n \r\n \r\n //alert('Assignment Updated!')\r\n })\r\n\r\n\r\n //$scope.Assignment.EffectiveDateTime.setHours(0);\r\n //$scope.Assignment.EffectiveDateTime.setMinutes(0);\r\n //$scope.Assignment.EffectiveDateTime.setSeconds(0);\r\n //st.DueDateTime = $scope.Assignment.DueDateTime;\r\n //st.Effective = $scope.Assignment.EffectiveDateTime\r\n //lst.push({ \"Action\": \"Update\", \"URL\": \"/Execute/AssignmentMinorMod\", \"params\": [st.AssignmentId, st.Passing_Score, st.DueDateTime.toISOString(), st.Effective.toISOString(), $rootScope.UserSettings.Scheduler.NotifyUpdatedAssignment] });\r\n //////console.log('Assignment Saved')\r\n \r\n });\r\n });\r\n //resolve: {\r\n // items: function () {\r\n // return {\r\n // CourseId: $scope.CourseId,\r\n // ChapterId: $scope.ChapterId,\r\n // TopicId: (($scope.topicId == null) ? 0 : $scope.topicId),\r\n // SubTopicId: (($scope.subTopicId == null) ? 0 : $scope.subTopicId),\r\n // AssessmentId: $scope.assessmentId\r\n // }\r\n // }\r\n //}\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n alert('Assignment Updated!')\r\n //}\r\n }\r\n\r\n },\r\n scope: $scope,\r\n });\r\n }\r\n $scope.assignmentDataNotActiveData = [100];\r\n $scope.UserFilter = '';\r\n $scope.filterNames = function (v) {\r\n $scope.UserFilter = v;\r\n }\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n ////console.log($scope.institutionsettings.Settings)\r\n $scope.assignmentDataNotActiveLabel = [\"Not Active\"]\r\n $scope.loadassignment = function () {\r\n $scope.$watch('UserFilter', function (v) {\r\n ////console.log(\"USERFILTER: \"+$scope.UserFilter);\r\n $scope.WaitI = true;\r\n //console.log([$scope.User.InstitutionId, ($scope.UserFilter || '')])\r\n $http.post(\"/Execute/GetAssignmentCalenderForInstitutionByUsers\", [$scope.User.InstitutionId, ($scope.UserFilter || '')]).success(function (cal) {\r\n $scope.WaitI = false;\r\n $scope.InstitutionCalendar = cal.RS_0;\r\n //console.log($scope.InstitutionCalendar)\r\n $scope.TodayDate = function () {\r\n var now = new Date();\r\n return $filter('date')(now, \"MMM dd, yyyy\")\r\n };\r\n $scope.TodayDateObj = new Date();\r\n $scope.TodayDateObj = new Date($scope.TodayDateObj + ' UTC');\r\n $scope.unixTodayDate = Date.parse($scope.TodayDateObj + ' UTC');\r\n $rootScope.InstitutionCalendar = $scope.InstitutionCalendar;\r\n ////console.log($scope.InstitutionCalendar);\r\n angular.forEach($scope.InstitutionCalendar, function (truncate) {\r\n truncate.Label = truncate.Label.replace(/Q & A<\\/b>: |Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A: |Q & A /g, \"\");\r\n truncate.EffectiveDateTimeString = truncate.EffectiveDateTime;\r\n truncate.EffectiveDateTimeDisplay = new Date(truncate.EffectiveDateTime + \" UTC\");\r\n truncate.DueDateTimeString = truncate.DueDateTime;\r\n truncate.DueDateTimeDisplay = new Date(truncate.DueDateTime + \" UTC\");\r\n truncate.unixEffectiveDateTime = Date.parse(truncate.EffectiveDateTime + \" UTC\");\r\n truncate.unixDueDateTime = Date.parse(truncate.DueDateTime + \" UTC\");\r\n if ($scope.TodayDateObj < truncate.EffectiveDateTimeDisplay) {\r\n truncate.assignmentStatus = 0;\r\n } else if (($scope.TodayDateObj <= truncate.DueDateTimeDisplay) && ($scope.TodayDateObj >= truncate.EffectiveDateTimeDisplay)) {\r\n truncate.assignmentStatus = 1;\r\n } else if ($scope.TodayDateObj > truncate.DueDateTimeDisplay) {\r\n truncate.assignmentStatus = 2;\r\n } else {\r\n truncate.assignmentStatus = -1;\r\n }\r\n truncate.assignData = [];\r\n truncate.assignFailedData = truncate.OnTime - truncate.CompletedOnTime;\r\n truncate.assignDatac = [truncate.CompletedOnTime, truncate.assignFailedData, truncate.Delinquent];\r\n\r\n $scope.assignLabs = [];\r\n\r\n });\r\n $scope.SaveProgress = 0;\r\n $scope.Pocess = function (idx, lst, fn) {\r\n if ((idx) < lst.length) {\r\n //////////////console.log(lst[idx])\r\n $http.post(lst[idx].URL, lst[idx].params).success(function (d) {\r\n ////////////////console.log(d)\r\n $scope.SaveProgress = ((idx + 1) / lst.length) * 100\r\n $scope.Pocess(idx + 1, lst, fn);\r\n }).error(function (err) {\r\n alert(\"Error\");\r\n $scope.SaveProgress = (idx + 1) / lst.length\r\n $scope.Pocess(idx + 1, lst, fn);\r\n });\r\n }\r\n else {\r\n fn();\r\n }\r\n }\r\n\r\n $scope.deletewithNotification = function (p) {\r\n if (confirm('Are you sure you want to delete this Assignment? You can not undo this.')) {\r\n toastr['info']('', 'Deleting Assignments...', {\r\n positionClass: 'toast-top-full-width',\r\n allowHtml: true,\r\n timeOut: 0,\r\n extendedTimeOut: 0,\r\n //autoDismiss: false,\r\n \r\n onShown: function () {\r\n //console.log($scope.AssignmentProgressPercent)\r\n $http.post('/Execute/GetAssignmentDetailv3', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTimeString, p.EffectiveDateTimeString]).success(function (datas) {\r\n $scope.AssignmenttoDelete = datas.RS_0;\r\n //console.log($scope.AssignmenttoDelete)\r\n var lst = []\r\n $scope.Delete = function (idx, total) {\r\n \r\n if (idx < total) {\r\n var asdel = $scope.AssignmenttoDelete[idx]\r\n //console.log(asdel)\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [asdel.AssignmentId, $scope.User.UserId] });\r\n if ((idx + 1) < total) {\r\n ////console.log('deleting ', asdel)\r\n $scope.Delete(idx + 1, total)\r\n }\r\n else {\r\n $scope.Pocess(0, lst, function () {\r\n toastr.clear()\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n //assignmentModal.close($scope.Assignment)\r\n \r\n $scope.loadassignment();\r\n });\r\n }\r\n }\r\n //angular.forEach($scope.AssignmenttoDelete, function (asdel) {\r\n // //////console.log(asdel)\r\n\r\n // ////console.log('deleted')\r\n //})\r\n\r\n\r\n };\r\n $scope.Delete(0, $scope.AssignmenttoDelete.length)\r\n })\r\n \r\n }\r\n });\r\n }\r\n }\r\n \r\n $scope.Delete = function (p) {\r\n if (confirm('Are you sure you want to delete this Assignment? You can not undo this.')) {\r\n toastr['info']('', 'Deleting Assignments...', {\r\n positionClass: 'toast-top-full-width',\r\n allowHtml: true,\r\n timeOut: 0,\r\n extendedTimeOut: 0,\r\n //autoDismiss: false,\r\n\r\n onShown: function () {\r\n var lst = [];\r\n $scope.AssignmenttoDelete = p\r\n angular.forEach($scope.AssignmenttoDelete, function (asdel) {\r\n ////console.log(asdel)\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [asdel.AssignmentId, $scope.User.UserId] });\r\n ////console.log('deleted')\r\n })\r\n $scope.Pocess(0, lst, function () {\r\n toastr.clear()\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n }\r\n })\r\n }\r\n };\r\n ////////console.log($scope.InstitutionCalendar)\r\n $scope.CollapseAllAssign = function () {\r\n angular.forEach($scope.InstitutionCalendar, function (assign) {\r\n assign.ShowDeets = false;\r\n });\r\n $scope.$broadcast('closedeetsassign');\r\n }\r\n $scope.TotalCompleted = function () {\r\n var TotalComp = 0;\r\n angular.forEach($scope.InstitutionCalendar, function (comp) {\r\n comp.CompletedOnTime = parseInt(comp.CompletedOnTime);\r\n TotalComp = TotalComp + (1 * comp.CompletedOnTime);\r\n });\r\n return TotalComp;\r\n };\r\n $scope.TotalPending = function () {\r\n var TotalPend = 0;\r\n angular.forEach($scope.InstitutionCalendar, function (pend) {\r\n pend.AssignmentCount = parseInt(pend.AssignmentCount);\r\n pend.CompletedOnTime = parseInt(pend.CompletedOnTime);\r\n TotalPend = TotalPend + (1 * (pend.AssignmentCount - pend.CompletedOnTime));\r\n });\r\n return TotalPend;\r\n };\r\n $scope.qqq = '';\r\n\r\n $scope.sortingOrder = 'unixDueDateTime';\r\n $scope.reverse = true;\r\n $scope.filteredItems = [];\r\n $scope.groupedItems = [];\r\n //$scope.ipp = {};\r\n $scope.itemsPerPage = \"25\";\r\n $scope.pagedItems = [];\r\n $scope.currentPage = 0;\r\n $scope.updateStatus = function (val) {\r\n //console.log(val)\r\n $scope.ShowByStatus = val;\r\n }\r\n $scope.updateSearch = function (val) {\r\n $scope.qqq = val;\r\n }\r\n $scope.updatePageSize = function (val) {\r\n $scope.itemsPerPage = val;\r\n }\r\n var searchMatch = function (haystack, needle) {\r\n if (!needle) {\r\n return true;\r\n }\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1;\r\n };\r\n\r\n\r\n\r\n $scope.search = function () {\r\n $scope.StatusedItems = $filter('filter')($scope.InstitutionCalendar, function (item) {\r\n //////////console.log(\"SMST: \"+$scope.ShowByStatus);\r\n for (var attr in item) {\r\n if ($scope.ShowByStatus == '') {\r\n return true;\r\n } else if (item['assignmentStatus'] == $scope.ShowByStatus) {\r\n ////////////console.log('STATUSMATCH: SEL='+$scope.ShowByStatus+', ITM='+item['assignmentStatus']);\r\n return true;\r\n }\r\n }\r\n return false;\r\n\r\n\r\n });\r\n //////////console.log($scope.StatusedItems);\r\n $scope.filteredItems = $filter('filter')($scope.StatusedItems, function (item) {\r\n for (var attr in item) {\r\n if (searchMatch(item['Label'], $scope.qqq)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n if ($scope.sortingOrder !== '') {\r\n $scope.filteredItems = $filter('orderBy')($scope.filteredItems, $scope.sortingOrder, $scope.reverse);\r\n }\r\n $scope.currentPage = 0;\r\n $scope.groupToPages();\r\n };\r\n\r\n $scope.groupToPages = function () {\r\n $scope.pagedItems = [];\r\n for (var i = 0; i < $scope.filteredItems.length; i++) {\r\n if (i % $scope.itemsPerPage === 0) {\r\n $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)] = [$scope.filteredItems[i]];\r\n } else {\r\n $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)].push($scope.filteredItems[i]);\r\n }\r\n }\r\n $scope.numPages = $scope.pagedItems.length;\r\n };\r\n $scope.range = function (start, end) {\r\n var ret = [];\r\n if (!end) {\r\n end = start;\r\n start = 0;\r\n }\r\n for (var i = start; i < end; i++) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n };\r\n $scope.prevPage = function () {\r\n if ($scope.currentPage > 0) {\r\n $scope.currentPage--;\r\n }\r\n };\r\n $scope.nextPage = function () {\r\n if ($scope.currentPage < $scope.pagedItems.length - 1) {\r\n $scope.currentPage++;\r\n }\r\n };\r\n $scope.setPage = function () {\r\n $scope.currentPage = this.n;\r\n }\r\n $scope.search();\r\n $scope.sort_by = function (newSortingOrder) {\r\n if ($scope.sortingOrder == newSortingOrder)\r\n $scope.reverse = !$scope.reverse;\r\n\r\n $scope.sortingOrder = newSortingOrder;\r\n $scope.search();\r\n };\r\n $scope.ibcChartOpts = {\r\n responsive: true,\r\n segmentShowStroke: true,\r\n segmentStrokeColor: '#fff',\r\n segmentStrokeWidth: 1,\r\n percentageInnerCutout: 35,\r\n animationSteps: 50,\r\n animationEasing: 'easeOutBounce',\r\n animateRotate: false,\r\n animateScale: false,\r\n yAxes: [{\r\n display: true,\r\n ticks: {\r\n beginAtZero: true,\r\n stacked: false\r\n }\r\n }]\r\n };\r\n });\r\n });\r\n };\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('instassignmentview', function ($parse, $http, $compile, $location, $rootScope, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/InstAssignmentView.htm',\r\n scope: {\r\n institionid: '='\r\n },\r\n controller: function ($scope, $http, $sce, $rootScope, $filter, $timeout, toastr, toastrConfig) {\r\n angular.extend(toastrConfig,\r\n {\r\n\r\n positionClass: 'toast-top-full-width',\r\n\r\n\r\n });\r\n $scope.ShowGantt = true;\r\n $scope.LoadCalendar = false\r\n $scope.CreateAssignment = function () {\r\n $location.path('/assignment')\r\n }\r\n $scope.StartDate = (new Date).addDays(-90)\r\n $scope.EndDate = (new Date).addDays(90)\r\n var today = new Date();\r\n //////console.log(today)\r\n $scope.Settings = $rootScope.UserSettings;\r\n //////console.log($scope.Settings)\r\n $scope.TodayMinusFiveStart = (new Date).addDays(-5);\r\n $scope.TodayMinusFiveEnd = (new Date).addDays(60);\r\n $scope.BackMonth = function (timestart, timeend) {\r\n timestart.setDate(timestart.getDate() - 60)\r\n timeend.setDate(timeend.getDate() - 60)\r\n //////console.log($scope.TodayMinusFiveStart)\r\n //////console.log($scope.TodayMinusFiveEnd)\r\n };\r\n $scope.ForwardMonth = function (timestart, timeend) {\r\n timestart.setDate(timestart.getDate() + 60);\r\n timeend.setDate(timeend.getDate() + 60)\r\n //////console.log($scope.TodayMinusFiveStart)\r\n //////console.log($scope.TodayMinusFiveEnd)\r\n };\r\n $scope.IsOn = true;\r\n $scope.User = $rootScope.User;\r\n $scope.GanttData = [];\r\n $scope.GanttDataUsers = [];\r\n $scope.registerApi = function (api) {\r\n $scope.api = api;\r\n //////console.log($scope.api)\r\n }\r\n var filterUsers = {};\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n $scope.filterinactive = function (filterusers) {\r\n $scope.IsOn = !$scope.IsOn;\r\n ////console.log(filterusers)\r\n $scope.filterNames(filterusers)\r\n }\r\n $http.post(\"/Execute/GetAssignableUsersForInstitution\", [$scope.institionid]).success(function (cal) {\r\n\r\n $rootScope.InstitutionUserList = cal.RS_0;\r\n $scope.InstitutionUserList = cal.RS_0;\r\n $scope.InstitutionUserList.unshift({\r\n DisplayName: 'All',\r\n UserID: ''\r\n })\r\n })\r\n $scope.UserFilter = \"\";\r\n \r\n $scope.EditAssignment = function (p) {\r\n var assignmentModal = $uibModal.open({\r\n templateUrl: 'app/tpls/EditAssignment.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $sce, $rootScope, $filter, $timeout, $uibModal) {\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n $scope.IdArray = [];\r\n $scope.AssignmentName = p.Label;\r\n $scope.ScoresSumForAvg = 0;\r\n $scope.NumberOfScores = 0;\r\n $scope.ListOfScores = [];\r\n $scope.AddAssignees = function (obj, evt) {\r\n if (!obj.AddAssignees) {\r\n obj.AddAssignees = { visible: false, top: evt.pageY, left: evt.pageX }\r\n }\r\n obj.AddAssignees.visible = !obj.AddAssignees.visible;\r\n $scope.CurrentAssignment = obj;\r\n\r\n }\r\n $scope.Reassign = function (obj, evt) {\r\n if (!obj.Reassign) {\r\n obj.Reassign = { visible: false, top: evt.pageY, left: evt.pageX }\r\n }\r\n obj.Reassign.visible = !obj.Reassign.visible;\r\n $scope.CurrentAssignment = obj;\r\n }\r\n var parameters\r\n if (!(p.DueDateTime instanceof Date)) {\r\n p.DueDateTimeDisplay = new Date(p.DueDateTime + \" UTC\")\r\n parameters = [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.EffectiveDateTime, p.DueDateTime]\r\n } else {\r\n parameters = [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.EffectiveDateTime.toISOString().replace(\".000Z\", \"\"), p.DueDateTime.toISOString().replace(\".000Z\", \"\")]\r\n }\r\n \r\n if (!(p.EffectiveDateTime instanceof Date)) {\r\n\r\n p.EffectiveDateTimeDisplay = new Date(p.EffectiveDateTime + \" UTC\")\r\n }\r\n //console.log(p)\r\n $scope.Today = new Date();\r\n $scope.TodayPlusWeek = (new Date).addDays(14)\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n ////console.log(parameters)\r\n $http.post('/Execute/GetAssignmentDefinitionFull', parameters).success(function (d) {\r\n\r\n $scope.AssignmentDefinition = d.RS_0[0];\r\n //////console.log($scope.AssignmentDefinition)\r\n ///$scope.AssignmentDefinition.EffectiveDateTime = p.EffectiveDateTime;\r\n $scope.AssignmentDefinition.EffectiveDateTime = new Date($scope.AssignmentDefinition.EffectiveDateTime + ' UTC');\r\n //$scope.AssignmentDefinition.DueDateTime = p.DueDateTime;\r\n $scope.AssignmentDefinition.DueDateTime = new Date($scope.AssignmentDefinition.DueDateTime + ' UTC');\r\n if ($scope.AssignmentDefinition.NotifyComplete == \"True\") {\r\n $scope.AssignmentDefinition.NotifyComplete = 1;\r\n }\r\n if ($scope.AssignmentDefinition.NotifyComplete == \"False\" || $scope.AssignmentDefinition.NotifyComplete == '') {\r\n $scope.AssignmentDefinition.NotifyComplete = 0;\r\n }\r\n if ($scope.AssignmentDefinition.DueDateNotify == \"True\") {\r\n $scope.AssignmentDefinition.DueDateNotify = 1;\r\n }\r\n if ($scope.AssignmentDefinition.DueDateNotify == \"False\" || $scope.AssignmentDefinition.DueDateNotify == '') {\r\n $scope.AssignmentDefinition.DueDateNotify = 0;\r\n }\r\n $scope.AssignmentDefinition.PendingHours = $scope.AssignmentDefinition.PendingHours / 24;\r\n $scope.AssignmentDefinition.ReminderHours = $scope.AssignmentDefinition.ReminderHours / 24;\r\n $scope.AssignmentDefinition.Passing_Score = Number($scope.AssignmentDefinition.Passing_Score)\r\n if ($scope.AssignmentDefinition.ReminderHours > 0) {\r\n $scope.ReminderIncomplete = true;\r\n }\r\n else {\r\n $scope.ReminderIncomplete = false;\r\n }\r\n if ($scope.AssignmentDefinition.PendingHours > 0) {\r\n $scope.SendIncompletePending = true;\r\n }\r\n else {\r\n $scope.SendIncompletePending = false;\r\n }\r\n $scope.AssignmentDefinition.NotifyComplete = Number($scope.AssignmentDefinition.NotifyComplete)\r\n $scope.OldAssignDefinition = $scope.AssignmentDefinition;\r\n $scope.AssignmentDefinition.NotifyUpdatedAssignment = \"0\";\r\n //console.log($scope.AssignmentDefinition)\r\n //console.log($scope.AssignmentDefinition.ReminderHours)\r\n //console.log($scope.ReminderIncomplete)\r\n //console.log($scope.SendIncompletePending)\r\n if ($scope.AssignmentDefinition.Note.length > 150) {\r\n $scope.AssignmentDefinition.Note = '';\r\n }\r\n //if ($scope.AssignmentDefinition.PracticeReview == '') {\r\n // $scope.AssignmentDefinition.PracticeReview = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.Viewablity == '') {\r\n // $scope.AssignmentDefinition.Viewablity = '1';\r\n //}\r\n //if ($scope.AssignmentDefinition.ShowLeaderBoard == '') {\r\n // $scope.AssignmentDefinition.ShowLeaderBoard = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.PrescriptiveReport == '') {\r\n // $scope.AssignmentDefinition.PrescriptiveReport = '2';\r\n //}\r\n //if ($scope.AssignmentDefinition.NumberOfTries == '') {\r\n // $scope.AssignmentDefinition.NumberOfTries = '0';\r\n //}\r\n //if ($scope.AssignmentDefinition.MinutesAllocated == NaN || $scope.AssignmentDefinition.MinutesAllocated == '') {\r\n // $scope.AssignmentDefinition.MinutesAllocated = 0;\r\n //}\r\n //console.log($scope.AssignmentDefinition)\r\n //////console.log(p)\r\n //d.RS_0[0] = populated values\r\n angular.forEach(d.RS_1, function (r) {\r\n $scope.IdArray.push(r.Id);\r\n });\r\n ////////console.log($scope.IdArray)\r\n $scope.institution = [];\r\n $scope.AdvancedEdit = function (id, Assignment) {\r\n $rootScope.AssignmentDefinition = Assignment;\r\n $location.path(\"/assignment/\" + id);\r\n }\r\n //p.DueDateTime = $filter('date')(p.DueDateTime, 'short');\r\n //p.EffectiveDateTime = $filter('date')(p.EffectiveDateTime, 'short');\r\n ////console.log([$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, p.DueDateTime.toISOString().replace('.000Z', ''), p.EffectiveDateTime.toISOString().replace('.000Z', '')])\r\n \r\n \r\n //console.log(p)\r\n $http.post('/Execute/GetAssignmentDetailv3', [$rootScope.User.InstitutionId, p.CourseId, p.ChapterId, p.TopicId, p.SubTopicId, p.AssessmentId, $scope.AssignmentDefinition.DueDateTime.toISOString().replace('.000Z', ''), $scope.AssignmentDefinition.EffectiveDateTime.toISOString().replace('.000Z', '')]).success(function (datas) {\r\n\r\n $scope.Assignment = datas.RS_0;\r\n //console.log($scope.Assignment)\r\n $scope.AssignmentName = p.title;\r\n if ($scope.AssignmentName == undefined) {\r\n $scope.AssignmentName = p.Label\r\n }\r\n ////console.log($scope.Assignment)\r\n //$scope.AssignmentUsers = p.Assignees;\r\n ////////console.log($scope.AssignmentUsers)\r\n $scope.Assignment.Classes = [];\r\n var tot = 0;\r\n var totcnt = 0;\r\n angular.forEach($scope.Assignment, function (u) {\r\n u.Highest = 1 * u.Highest;\r\n if (u.Highest > 0) {\r\n tot = (tot + 1 * u.Highest);\r\n totcnt++;\r\n }\r\n $scope.ScoresSumForAvg += u.Highest;\r\n if (u.Highest > 0) {\r\n $scope.NumberOfScores++;\r\n $scope.ListOfScores.push(u.Highest);\r\n }\r\n u.TimesTaken = 1 * u.TimesTaken;\r\n $scope.TotalAttempts += u.TimesTaken;\r\n if (((1 * u.Highest) < (1 * u.Passing_Score)) && ((1 * u.TimesTaken) > 0)) {\r\n $scope.FailFails++;\r\n u.AssStatus = 'Fail';\r\n }\r\n if (u.TimesTaken == 0) {\r\n $scope.NoAttempt++;\r\n u.AssStatus = 'NoAttempt';\r\n }\r\n if ((1 * u.Highest) >= (1 * u.Passing_Score)) {\r\n $scope.Passed++;\r\n u.AssStatus = 'Pass';\r\n }\r\n var AssClass = null;\r\n u.Effective = new Date(u.Effective + \" UTC\");\r\n u.EffectiveOpen = false;\r\n u.DueDateTime = new Date(u.DueDateTime + \" UTC\");\r\n if (u.CompletedDate != null && u.CompletedDate != \"\") {\r\n if (typeof (u.CompletedDate) == 'undefined') {\r\n u.CompletedDate = null;\r\n } else {\r\n try {\r\n u.CompletedDate = new Date(u.CompletedDate + \" UTC\");\r\n } catch (e) {\r\n u.CompletedDate = null;\r\n }\r\n }\r\n }\r\n u.DueDateOpen = false;\r\n u.Unassign = false;\r\n u.isDirty = false;\r\n angular.forEach($scope.Assignment.Classes, function (cls) {\r\n if (cls.Name == u.Class) {\r\n AssClass = cls;\r\n }\r\n });\r\n if (AssClass == null) {\r\n AssClass = { \"Name\": u.Class, Unassign: false, \"Students\": [] }\r\n $scope.Assignment.Classes.push(AssClass);\r\n }\r\n ////////////////console.log(st)\r\n AssClass.Students.push(u);\r\n ////////console.log($scope.Assignment.Classes)\r\n });\r\n if (totcnt > 0) {\r\n $scope.AssAverage = (tot / totcnt).toFixed(0);\r\n } else {\r\n $scope.AssAverage = 0;\r\n }\r\n \r\n $scope.Delete = function (p) {\r\n if (confirm('Are you sure you want to delete this Assignment? You can not undo this.')) {\r\n toastr['info']('', 'Deleting Assignments...', {\r\n positionClass: 'toast-top-full-width',\r\n allowHtml: true,\r\n timeOut: 0,\r\n extendedTimeOut: 0,\r\n //autoDismiss: false,\r\n\r\n onShown: function () {\r\n var lst = [];\r\n $scope.AssignmenttoDelete = p\r\n angular.forEach($scope.AssignmenttoDelete, function (asdel) {\r\n ////console.log(asdel)\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [asdel.AssignmentId, $scope.User.UserId] });\r\n ////console.log('deleted')\r\n })\r\n $scope.Pocess(0, lst, function () {\r\n toastr.clear()\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n }\r\n })\r\n }\r\n };\r\n //console.log($scope.Assignment)\r\n $scope.UpdateDue = function (due) {\r\n $scope.AssignmentDefinition.DueDateTime = due;\r\n //$scope.Assignment.DueDateTime = Date.parse($scope.Assignment.DueDateTime)\r\n\r\n }\r\n $scope.UpdateEffective = function (eff) {\r\n $scope.AssignmentDefinition.EffectiveDateTime = eff;\r\n //$scope.Assignment.EffectiveDateTime = Date.parse($scope.Assignment.EffectiveDateTime)\r\n }\r\n $scope.AvgHighest = ($scope.NumberOfScores > 0 ? ($scope.ScoresSumForAvg / $scope.NumberOfScores) : \"No Scores\");\r\n $scope.HighestBest = $scope.ListOfScores[$scope.ListOfScores.length - 1];\r\n $scope.LowestBest = $scope.ListOfScores[0];\r\n ////////console.log($scope.HighestBest)\r\n var newAssigneesArray = [];\r\n $scope.newAssignees = [];\r\n $scope.InstitutionUsersList = $rootScope.InstitutionUserList\r\n angular.forEach($rootScope.InstitutionUserList, function (iu) {\r\n\r\n angular.forEach($scope.Assignment, function (assign) {\r\n if (assign.Student_id === iu.UserID) {\r\n assign.Email = iu.Email;\r\n }\r\n })\r\n var found = $filter('filter')($scope.Assignment, { Student_id: iu.UserID }, true);\r\n\r\n if (found.length === 0) {\r\n newAssigneesArray.push(iu);\r\n }\r\n\r\n });\r\n $scope.UnassignClicked = function (User, selected) {\r\n User.Unassign = selected;\r\n $scope.UnassignButton = true;\r\n //////console.log(User)\r\n }\r\n $scope.UnassignUsers = function (Assignment) {\r\n var lst = [];\r\n angular.forEach(Assignment, function (st) {\r\n if (st.Unassign == true) {\r\n lst.push({ \"Action\": \"Delete\", \"URL\": \"/Execute/DeleteAssignmentWithNotification\", \"params\": [st.AssignmentId, $scope.User.UserId] });\r\n ////console.log('Assignment Deleted')\r\n }\r\n })\r\n $scope.Pocess(0, lst, function () {\r\n toastr['success']('Assignments Deleted!'), {\r\n allowHtml: true,\r\n autoDismiss: false,\r\n closeButton: true,\r\n\r\n }\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n }\r\n $scope.newAssignees = newAssigneesArray;\r\n $scope.ActiveAssignees = [];\r\n if ($rootScope.InstitutionSettings.InactiveClasses) {\r\n angular.forEach($scope.newAssignees, function (stu) {\r\n if (!$rootScope.InstitutionSettings.InactiveClasses.includes(stu.Class)) {\r\n $scope.ActiveAssignees.push(stu)\r\n //////console.log(stu)\r\n }\r\n\r\n });\r\n $scope.newAssignees = $scope.ActiveAssignees;\r\n //console.log($scope.newAssignees)\r\n }\r\n \r\n $scope.EditLeaderboard = function (lb) {\r\n $scope.AssignmentDefinition.ShowLeaderBoard = lb;\r\n ////console.log($scope.AssignmentDefinition.ShowLeaderBoard)\r\n }\r\n $scope.EditViewability = function (view) {\r\n $scope.AssignmentDefinition.Viewability = view;\r\n }\r\n $scope.EditPracticeReview = function (pr) {\r\n $scope.AssignmentDefinition.PracticeReview = pr;\r\n }\r\n $scope.EditAttempts = function () {\r\n $scope.EditAtmps = !$scope.EditAtmps;\r\n }\r\n $scope.EditTimeLimit = function () {\r\n $scope.EditTime = !$scope.EditTime;\r\n }\r\n\r\n $scope.SetReminderIncomplete = function (val) {\r\n //$scope.ReminderIncomplete = val;\r\n //if (val == true) {\r\n // $scope.ReminderIncomplete = true;\r\n //}\r\n //else {\r\n // $scope.ReminderIncomplete = false;\r\n //}\r\n //console.log($scope.ReminderIncomplete)\r\n //console.log(val)\r\n }\r\n $scope.SetSendPendingHours = function (v) {\r\n $scope.AssignmentDefinition.PendingHours = v;\r\n if ($scope.AssignmentDefinition.PendingHours < 0) {\r\n $scope.AssignmentDefinition.PendingHours = 0;\r\n }\r\n }\r\n $scope.SetSendPendingRecipients = function (v) {\r\n $scope.PendingRecipients = v;\r\n }\r\n $scope.SetSendIncompletePending = function (v) {\r\n $scope.SendIncompletePending = v;\r\n }\r\n $scope.SetDueDateNotify = function (v) {\r\n $scope.AssignmentDefinition.DueDateNotify = v;\r\n }\r\n $scope.SetDueDateRecipients = function (v) {\r\n $scope.AssignmentDefinition.DueDateRecipients = v;\r\n }\r\n $scope.SetNotifyComplete = function (v) {\r\n $scope.AssignmentDefinition.NotifyComplete = v;\r\n }\r\n $scope.SetCompleteRecipients = function (v) {\r\n $scope.AssignmentDefinition.CompleteRecipients = v;\r\n }\r\n $scope.SetPassingScore = function (PassingScore) {\r\n $scope.AssignmentDefinition.Passing_Score = parseInt(PassingScore)\r\n }\r\n $scope.SetMinutesAllocated = function (v) {\r\n if (isNaN(v)) {\r\n $scope.AssignmentDefinition.MinutesAllocated = 0;\r\n $scope.$apply();\r\n } else {\r\n $scope.AssignmentDefinition.MinutesAllocated = v;\r\n }\r\n ////console.log($scope.AssignmentDefinition.MinutesAllocated)\r\n }\r\n $scope.SetNumTries = function (v) {\r\n if (isNaN(v)) {\r\n $scope.AssignmentDefinition.NumberOfTries = 0;\r\n $scope.$apply();\r\n } else {\r\n $scope.AssignmentDefinition.NumberOfTries = v;\r\n }\r\n //console.log($scope.AssignmentDefinition.NumberOfTries)\r\n }\r\n $scope.SetReminderHours = function (v) {\r\n $scope.AssignmentDefinition.ReminderHours = v;\r\n if ($scope.AssignmentDefinition.ReminderHours < 0) {\r\n $scope.AssignmentDefinition.ReminderHours = 0;\r\n }\r\n }\r\n //////console.log($scope.newAssignees)\r\n $scope.selectedAssignees = [];\r\n $scope.SelectAll = {};\r\n $scope.SelectAll.AllSelected = false;\r\n $scope.selectAllAssignees = function () {\r\n $scope.selectedAssignees = [];\r\n angular.forEach($scope.newAssignees, function (na) {\r\n if ($scope.SelectAll.AllSelected == true && na.UserID !== '') {\r\n na.Selected = true;\r\n } else {\r\n na.Selected = false;\r\n }\r\n });\r\n if ($scope.SelectAll.AllSelected == true) {\r\n angular.forEach($scope.newAssignees, function (na) {\r\n na.Selected = true;\r\n if (na.UserID !== '') {\r\n $scope.selectedAssignees.push(na.UserID)\r\n }\r\n });\r\n } else {\r\n angular.forEach($scope.newAssignees, function (na) {\r\n na.Selected = false;\r\n $scope.selectedAssignees.splice($scope.selectedAssignees.indexOf(na.UserID), 1);\r\n });\r\n }\r\n //console.log($scope.selectedAssignees)\r\n }\r\n $scope.selectAssignees = function (student, selected) {\r\n\r\n if (student.Selected === true) {\r\n $scope.selectedAssignees.push(student.UserID)\r\n }\r\n else {\r\n $scope.SelectAll.AllSelected = false;\r\n $scope.selectedAssignees.splice($scope.selectedAssignees.indexOf(student.UserID), 1);\r\n }\r\n //////console.log($scope.selectedAssignees)\r\n }\r\n //////console.log($scope.Assignment);\r\n\r\n\r\n $scope.SaveSingleAssignment = function (user, NewStart, NewEnd) {\r\n ////console.log(user)\r\n var p = [];\r\n ////console.log($scope.AssignmentDefinition)\r\n NewStart = NewStart.setHours(0, 1, 0, 0)\r\n NewEnd = NewEnd.setHours(23, 59, 0, 0);\r\n NewStart = new Date(NewStart)\r\n NewEnd = new Date(NewEnd)\r\n var p = [];\r\n p[0] = user.Student_id;\r\n p[1] = user.CourseId.toString();\r\n p[2] = ((user.ChapterId != null) ? user.ChapterId : 0).toString();\r\n p[3] = ((isNaN(user.TopicId) == false && user.TopicId != '') ? user.TopicId : 0).toString();\r\n p[4] = ((isNaN(user.SubTopicId) == false && user.SubTopicId != '') ? user.SubTopicId : 0).toString();\r\n p[5] = ((user.AssessmentId != null) ? user.AssessmentId : 0).toString();\r\n p[6] = parseInt(user.Passing_Score);\r\n p[7] = new Date(NewStart).toISOString().replace('.000Z', '');\r\n p[8] = new Date(NewEnd).toISOString().replace('.000Z', '');\r\n p[9] = parseInt($scope.AssignmentDefinition.AssignedByUserId);\r\n p[10] = $scope.AssignmentDefinition.Note;\r\n p[11] = ($scope.AssignmentDefinition.Viewablity) ? $scope.AssignmentDefinition.Viewablity : 1;\r\n p[12] = ($scope.AssignmentDefinition.MinutesAllocated) ? $scope.AssignmentDefinition.MinutesAllocated : 0; //Minutes Allocated -- Placeholder [0 represents no time limit]\r\n p[13] = parseInt($scope.AssignmentDefinition.NumberOfTries ? $scope.AssignmentDefinition.NumberOfTries : 0);\r\n p[14] = ($scope.AssignmentDefinition.ShowLeaderBoard) ? $scope.AssignmentDefinition.ShowLeaderBoard : 0;\r\n p[15] = ($scope.AssignmentDefinition.PracticeReview) ? $scope.AssignmentDefinition.PracticeReview : 1;\r\n p[16] = ($scope.AssignmentDefinition.PrescriptiveReport) ? $scope.AssignmentDefinition.PrescriptiveReport : 1;\r\n p[17] = \"\";\r\n p[18] = (($scope.ReminderIncomplete == true) ? $scope.AssignmentDefinition.ReminderHours * 24 : -1); //ReminderHours\r\n p[19] = $scope.AssignmentDefinition.DueDateNotify; //DueDateNotify\r\n p[20] = (($scope.SendIncompletePending == true) ? $scope.AssignmentDefinition.PendingHours * 24 : -1); //PendingHours\r\n p[21] = $scope.AssignmentDefinition.NotifyComplete; //NotifyComplete\r\n p[22] = $scope.AssignmentDefinition.DueDateRecipients; //DueDateRecipients\r\n p[23] = $scope.AssignmentDefinition.PendingRecipients; //PendingRecipients\r\n p[24] = $scope.AssignmentDefinition.CompleteRecipients; //CompleteRecipients\r\n p[25] = $scope.AssignmentDefinition.NotifyUpdatedAssignment; //NotifyCode\r\n //console.log(p)\r\n $http.post(\"/Execute/SaveAssignmentWithNotify\", p).success(function (data) {\r\n $scope.NewAssignment = data.RS_0;\r\n ////console.log(data)\r\n //if ($scope.AssignmentDefinition.NotifyUpdatedAssignment == 1 || $scope.AssignmentDefinition.NotifyUpdatedAssignment == 3) {\r\n // var emailEffective = new Date(NewStart + ' UTC').toISOString().replace('.000Z', '');\r\n // var emailDue = new Date(NewEnd + ' UTC').toISOString().replace('.000Z', '');\r\n\r\n // var msg = {};\r\n // var rooturl = document.domain;\r\n // var ass = $scope.AssignmentDefinition;\r\n // msg.ToName = user.FirstName + ' ' + user.LastName;\r\n // msg.ToAddress = user.Email;\r\n // msg.Subject = 'Attention ' + msg.ToName + ' - You Have Been Reassigned a Challenger Course Assignment';\r\n // //if (Institution.ImpersonateEmail == true) {\r\n // // msg.FromName = $rootScope.User.DisplayName;\r\n // // msg.FromAddress = $rootScope.User.Email;\r\n // //}\r\n // //else {\r\n // if ($scope.AssignmentDefinition.PracticeReview == 1) {\r\n // $scope.PracticeReviewmsg = 'Yes.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PracticeReview == 2) {\r\n // $scope.PracticeReviewmsg = 'After your first attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PracticeReview == 3) {\r\n // $scope.PracticeReviewmsg = 'After your first passing attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PracticeReview == 4) {\r\n // $scope.PracticeReviewmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n // }\r\n // if ($scope.AssignmentDefinition.PracticeReview == 0) {\r\n // $scope.PracticeReviewmsg = 'No.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PrescriptiveReport == 1) {\r\n // $scope.PrescriptiveReportmsg = 'Yes.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PrescriptiveReport == 2) {\r\n // $scope.PrescriptiveReportmsg = 'After your first attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PrescriptiveReport == 3) {\r\n // $scope.PrescriptiveReportmsg = 'After your first passing attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.PrescriptiveReport == 4) {\r\n // $scope.PrescriptiveReportmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n // }\r\n // if ($scope.AssignmentDefinition.PrescriptiveReport == 0) {\r\n // $scope.PrescriptiveReportmsg = 'No.';\r\n // }\r\n // if ($scope.AssignmentDefinition.MinutesAllocated > 0) {\r\n // $scope.MinutesAllocatedmsg = 'Yes. ' + $scope.AssignmentDefinition.MinutesAllocated + ' Minutes.';\r\n // };\r\n // if ($scope.AssignmentDefinition.MinutesAllocated == 0) {\r\n // $scope.MinutesAllocatedmsg = 'No.';\r\n // };\r\n // if ($scope.AssignmentDefinition.NumberOfTries > 0) {\r\n // $scope.NumberOfTriesmsg = 'Yes. ' + $scope.AssignmentDefinition.NumberOfTries + ' Tries.';\r\n // };\r\n // if ($scope.AssignmentDefinition.NumberOfTries == 0) {\r\n // $scope.NumberOfTriesmsg = 'No.';\r\n // };\r\n // if ($scope.AssignmentDefinition.ShowLeaderBoard == 1) {\r\n // $scope.ShowLeaderBoardmsg = 'Yes.';\r\n // }\r\n // if ($scope.AssignmentDefinition.ShowLeaderBoard == 2) {\r\n // $scope.ShowLeaderBoardmsg = 'After your first attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.ShowLeaderBoard == 3) {\r\n // $scope.ShowLeaderBoardmsg = 'After your first passing attempt.';\r\n // }\r\n // if ($scope.AssignmentDefinition.ShowLeaderBoard == 4) {\r\n // $scope.ShowLeaderBoardmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n // }\r\n // if ($scope.AssignmentDefinition.ShowLeaderBoard == 0) {\r\n // $scope.ShowLeaderBoardmsg = 'No.';\r\n // }\r\n // msg.FromName = \"Challenger CME\";\r\n // msg.FromAddress = \"donotreply@challengercorporation.com\";\r\n // //}\r\n // msg.Body = \"The following work has been reassigned to you by \" + $scope.User.DisplayName;\r\n // msg.Body += '

You can access your assignments by clicking \"My Assignments\" in the left side menu in your Challenger account at ' + rooturl + '. Or, if you\\'ve selected \"remember me\" on your Challenger account, simply click on the link below

';\r\n // //msg.Body += '

Assignment Settings:
'\r\n // //msg.Body += '

Can I see the Assignment\\'s Practice and Review sections? ' + $scope.PracticeReviewmsg + '
';\r\n // //msg.Body += '

Can I review my answers after I have taken the Assignment? ' + $scope.PrescriptiveReportmsg + '
';\r\n // //msg.Body += '

Is there a time limit? ' + $scope.MinutesAllocatedmsg + '
';\r\n // //msg.Body += '

Is there a limited number of attempts allowed? ' + NumberOfTriesmsg + '
';\r\n // //msg.Body += '

Is there a leaderboard? ' + $scope.MinutesAllocatedmsg + '

';\r\n // if ($scope.AssignmentDefinition.CourseId == 0 || $scope.AssignmentDefinition.TopicId == 0) {\r\n // msg.Body += \"\" + 'Go to ' + $scope.AssignmentName + \"
Start Date: \" + formatDateforEmail(emailEffective) + \"
Due Date: \" + formatDateforEmail(emailDue) + \"

\";\r\n // }\r\n // else {\r\n // msg.Body += \"\" + 'Go to ' + $scope.AssignmentName + \"
Start Date: \" + formatDateforEmail(emailEffective) + \"
Due Date: \" + formatDateforEmail(emailDue) + \"

\";\r\n // }\r\n\r\n\r\n // //////console.log(msg)\r\n // $http.post(\"/SendNotification\", msg).success(function (data) {\r\n // $scope.Sent = data;\r\n // //////console.log(data)\r\n // //////console.log(msg)\r\n \r\n // user.reassign = false;\r\n\r\n // })\r\n //}\r\n alert('Assignment Saved!')\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n });\r\n \r\n }\r\n $scope.MakeAssignment = function () {\r\n $scope.howManyAssignees = $scope.selectedAssignees.length;\r\n $scope.selectedAssignees = $scope.selectedAssignees.toString();\r\n //////console.log($scope.selectedAssignees)\r\n //CHANGE THE ASS PATH PROC BELOW ass ass ass\r\n var parambalams = [$scope.Assignment[0].AssignmentId, $scope.selectedAssignees, $scope.User.UserId, CurrentUserTZoffsett];\r\n //console.log(parambalams)\r\n $http.post(\"/Execute/CopyAssignmentToUsers\", parambalams).success(function (data) {\r\n //////console.log(parambalams)\r\n angular.forEach($scope.newAssignees, function (as) {\r\n as.Selected = false;\r\n })\r\n assignmentModal.close($scope.Assignment)\r\n alert($scope.howManyAssignees + \" user\" + ($scope.howManyAssignees === 1 ? '' : 's') + \" added.\", \"Success!\");\r\n $scope.loadassignment();\r\n }).error(function () {\r\n alert(\"There was a problem copying the assignment to the selected users. Please try again in a few minutes.

If you continue to receive this message, contact support.\", \"Error\", \"error\");\r\n });\r\n };\r\n\r\n });\r\n });\r\n $scope.SaveProgress = 0;\r\n $scope.Pocess = function (idx, lst, fn) {\r\n if ((idx) < lst.length) {\r\n //////////////console.log(lst[idx])\r\n $http.post(lst[idx].URL, lst[idx].params).success(function (d) {\r\n ////////////////console.log(d)\r\n $scope.SaveProgress = ((idx + 1) / lst.length) * 100\r\n $scope.Pocess(idx + 1, lst, fn);\r\n }).error(function (err) {\r\n alert(\"Error\");\r\n $scope.SaveProgress = (idx + 1) / lst.length\r\n $scope.Pocess(idx + 1, lst, fn);\r\n });\r\n }\r\n else {\r\n fn();\r\n }\r\n }\r\n \r\n\r\n $scope.SaveChanges = function () {\r\n var lst = [];\r\n //console.log($scope.AssignmentDefinition)\r\n ////console.log($scope.Assignment)\r\n if ($scope.Assignment.DueDateTime < $scope.Assignment.EffectiveDateTime) {\r\n swal('Error', 'Due Date cannot be set before Effective Date', 'warning');\r\n }\r\n if ($scope.AssignmentDefinition.Passing_Score > 100 || $scope.AssignmentDefinition.Passing_Score < 0) {\r\n swal('Error', 'Invalid Passing Score', 'warning');\r\n }\r\n if ($scope.AssignmentDefinition.MinutesAllocated < 0) {\r\n swal('Error', 'Invalid Time Limit', 'warning');\r\n }\r\n if ($scope.AssignmentDefinition.NumberOfTries < 0) {\r\n swal('Error', 'Invalid Number of Attempts', 'warning');\r\n }\r\n ////console.log(parseInt($scope.AssignmentDefinition.NumberOfTries) >= 0)\r\n ////console.log(parseInt($scope.AssignmentDefinition.MinutesAllocated) >= 0)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score > 0)\r\n ////console.log($scope.AssignmentDefinition.Passing_Score > 0)\r\n //if (parseInt($scope.AssignmentDefinition.NumberOfTries) >= 0 && parseInt($scope.AssignmentDefinition.MinutesAllocated) >= 0 && 100 >= $scope.AssignmentDefinition.Passing_Score && $scope.AssignmentDefinition.Passing_Score > 0 && $scope.AssignmentDefinition.DueDateTime > $scope.AssignmentDefinition.EffectiveDateTime) {\r\n\r\n $scope.AssignmentDefinition.EffectiveDateTime = $scope.AssignmentDefinition.EffectiveDateTime.setHours(0, 1, 0, 0)\r\n $scope.AssignmentDefinition.DueDateTime = $scope.AssignmentDefinition.DueDateTime.setHours(23, 59, 0, 0);\r\n $scope.AssignmentDefinition.DueDateTime = new Date($scope.AssignmentDefinition.DueDateTime)\r\n $scope.AssignmentDefinition.EffectiveDateTime = new Date($scope.AssignmentDefinition.EffectiveDateTime)\r\n angular.forEach($scope.Assignment.Classes, function (cls) {\r\n angular.forEach(cls.Students, function (st) {\r\n //////console.log(st)\r\n //////console.log($scope.Assignment)\r\n var s = [];\r\n s[0] = st.Student_id;\r\n s[1] = st.CourseId;\r\n s[2] = st.ChapterId;\r\n s[3] = st.TopicId;\r\n s[4] = 0 + \"\";\r\n s[5] = st.AssessmentId;\r\n s[6] = parseInt($scope.AssignmentDefinition.Passing_Score);\r\n s[7] = new Date($scope.AssignmentDefinition.EffectiveDateTime).toISOString().replace('.000Z', '');\r\n s[8] = new Date($scope.AssignmentDefinition.DueDateTime).toISOString().replace('.000Z', '');\r\n s[9] = $scope.AssignmentDefinition.AssignedByUserId;\r\n s[10] = $scope.AssignmentDefinition.Note;\r\n s[11] = ($scope.AssignmentDefinition.Viewablity) ? $scope.AssignmentDefinition.Viewablity : 1;\r\n s[12] = ($scope.AssignmentDefinition.MinutesAllocated) ? $scope.AssignmentDefinition.MinutesAllocated : 0; //Minutes Allocated -- Placeholder [0 represents no time limit]\r\n s[13] = parseInt($scope.AssignmentDefinition.NumberOfTries ? $scope.AssignmentDefinition.NumberOfTries : 0);\r\n s[14] = ($scope.AssignmentDefinition.ShowLeaderBoard) ? $scope.AssignmentDefinition.ShowLeaderBoard : 0;\r\n s[15] = ($scope.AssignmentDefinition.PracticeReview) ? $scope.AssignmentDefinition.PracticeReview : 1;\r\n s[16] = ($scope.AssignmentDefinition.PrescriptiveReport) ? $scope.AssignmentDefinition.PrescriptiveReport : 1;\r\n s[17] = st.AssignmentId;\r\n s[18] = (($scope.ReminderIncomplete == true) ? $scope.AssignmentDefinition.ReminderHours * 24 : -1); //ReminderHours\r\n s[19] = $scope.AssignmentDefinition.DueDateNotify; //DueDateNotify\r\n s[20] = (($scope.SendIncompletePending == true) ? $scope.AssignmentDefinition.PendingHours * 24 : -1); //PendingHours\r\n s[21] = $scope.AssignmentDefinition.NotifyComplete; //NotifyComplete\r\n s[22] = $scope.AssignmentDefinition.DueDateRecipients; //DueDateRecipients\r\n s[23] = $scope.AssignmentDefinition.PendingRecipients; //PendingRecipients\r\n s[24] = $scope.AssignmentDefinition.CompleteRecipients; //CompleteRecipients\r\n s[25] = $scope.AssignmentDefinition.NotifyUpdatedAssignment; //NotifyCode\r\n //console.log(s)\r\n $http.post(\"/Execute/SaveAssignmentWithNotify\", s).success(function (data) {\r\n $scope.NewAssignment = data.RS_0;\r\n if ($scope.AssignmentDefinition.NotifyUpdatedAssignment == 1 || $scope.AssignmentDefinition.NotifyUpdatedAssignment == 3) {\r\n var emailEffective = new Date($scope.AssignmentDefinition.EffectiveDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n var emailDue = new Date($scope.AssignmentDefinition.DueDateTime + ' UTC').toISOString().replace('.000Z', '');\r\n\r\n var msg = {};\r\n var rooturl = document.domain;\r\n var ass = $scope.AssignmentDefinition;\r\n msg.ToName = st.FirstName + ' ' + st.LastName;\r\n msg.ToAddress = st.Email;\r\n msg.Subject = 'Attention ' + msg.ToName + ' - Your Challenger Course Assignment has been modified';\r\n //if (Institution.ImpersonateEmail == true) {\r\n // msg.FromName = $rootScope.User.DisplayName;\r\n // msg.FromAddress = $rootScope.User.Email;\r\n //}\r\n //else {\r\n if ($scope.AssignmentDefinition.PracticeReview == 1) {\r\n $scope.PracticeReviewmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 2) {\r\n $scope.PracticeReviewmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 3) {\r\n $scope.PracticeReviewmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 4) {\r\n $scope.PracticeReviewmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PracticeReview == 0) {\r\n $scope.PracticeReviewmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 1) {\r\n $scope.PrescriptiveReportmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 2) {\r\n $scope.PrescriptiveReportmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 3) {\r\n $scope.PrescriptiveReportmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 4) {\r\n $scope.PrescriptiveReportmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.PrescriptiveReport == 0) {\r\n $scope.PrescriptiveReportmsg = 'No.';\r\n }\r\n if ($scope.AssignmentDefinition.MinutesAllocated > 0) {\r\n $scope.MinutesAllocatedmsg = 'Yes. ' + $scope.AssignmentDefinition.MinutesAllocated + ' Minutes.';\r\n };\r\n if ($scope.AssignmentDefinition.MinutesAllocated == 0) {\r\n $scope.MinutesAllocatedmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries > 0) {\r\n $scope.NumberOfTriesmsg = 'Yes. ' + $scope.AssignmentDefinition.NumberOfTries + ' Tries.';\r\n };\r\n if ($scope.AssignmentDefinition.NumberOfTries == 0) {\r\n $scope.NumberOfTriesmsg = 'No.';\r\n };\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 1) {\r\n $scope.ShowLeaderBoardmsg = 'Yes.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 2) {\r\n $scope.ShowLeaderBoardmsg = 'After your first attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 3) {\r\n $scope.ShowLeaderBoardmsg = 'After your first passing attempt.';\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 4) {\r\n $scope.ShowLeaderBoardmsg = 'Only after ' + formatDateforEmail(emailDue);\r\n }\r\n if ($scope.AssignmentDefinition.ShowLeaderBoard == 0) {\r\n $scope.ShowLeaderBoardmsg = 'No.';\r\n }\r\n msg.FromName = \"Challenger CME\";\r\n msg.FromAddress = \"donotreply@challengercorporation.com\";\r\n //}\r\n msg.Body = \"The following work has been updated by \" + $scope.User.DisplayName;\r\n msg.Body += '

You can access your assignments by clicking \"My Assignments\" in your Challenger account at ' + rooturl + '.

';\r\n //msg.Body += '

Assignment Settings:
'\r\n //msg.Body += '

Can I see the Assignment\\'s Practice and Review sections? ' + $scope.PracticeReviewmsg + '
';\r\n //msg.Body += '

Can I review my answers after I have taken the Assignment? ' + $scope.PrescriptiveReportmsg + '
';\r\n //msg.Body += '

Is there a time limit? ' + $scope.MinutesAllocatedmsg + '
';\r\n //msg.Body += '

Is there a limited number of attempts allowed? ' + $scope.NumberOfTriesmsg + '
';\r\n //msg.Body += '

Is there a leaderboard? ' + $scope.MinutesAllocatedmsg + '

';\r\n if ($scope.AssignmentDefinition.CourseId == 0 || $scope.AssignmentDefinition.TopicId == 0) {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n else {\r\n msg.Body += \"\" + $scope.AssignmentName + \"

\";\r\n }\r\n\r\n\r\n //////console.log(msg)\r\n $http.post(\"/SendNotification\", msg).success(function (data) {\r\n $scope.Sent = data;\r\n //////console.log(data)\r\n //////console.log(msg)\r\n \r\n \r\n\r\n })\r\n }\r\n });\r\n \r\n \r\n //$scope.Assignment.EffectiveDateTime.setHours(0);\r\n //$scope.Assignment.EffectiveDateTime.setMinutes(0);\r\n //$scope.Assignment.EffectiveDateTime.setSeconds(0);\r\n //st.DueDateTime = $scope.Assignment.DueDateTime;\r\n //st.Effective = $scope.Assignment.EffectiveDateTime\r\n //lst.push({ \"Action\": \"Update\", \"URL\": \"/Execute/AssignmentMinorMod\", \"params\": [st.AssignmentId, st.Passing_Score, st.DueDateTime.toISOString(), st.Effective.toISOString(), $rootScope.UserSettings.Scheduler.NotifyUpdatedAssignment] });\r\n //////console.log('Assignment Saved')\r\n\r\n });\r\n \r\n });\r\n //resolve: {\r\n // items: function () {\r\n // return {\r\n // CourseId: $scope.CourseId,\r\n // ChapterId: $scope.ChapterId,\r\n // TopicId: (($scope.topicId == null) ? 0 : $scope.topicId),\r\n // SubTopicId: (($scope.subTopicId == null) ? 0 : $scope.subTopicId),\r\n // AssessmentId: $scope.assessmentId\r\n // }\r\n // }\r\n //}\r\n assignmentModal.close($scope.Assignment)\r\n $scope.loadassignment();\r\n alert('Assignment Updated!')\r\n }\r\n\r\n //}\r\n\r\n },\r\n scope: $scope,\r\n });\r\n }\r\n $scope.loadassignment = function () {\r\n \r\n $scope.$watch('UserFilter', function (v) {\r\n //////console.log(\"USERFILTER: \"+$scope.UserFilter);\r\n $scope.DataLoaded = false;\r\n $scope.CalendarLoaded = false\r\n $http.post(\"/Execute/GetAssignmentCalenderForInstitutionByUsers \", [$scope.institionid, $scope.UserFilter]).success(function (dta) {\r\n var CalData = [];\r\n //////console.log(today)\r\n //////console.log(dta)\r\n \r\n \r\n $('#assigncalendar').fullCalendar('removeEventSource', $rootScope.calendarevents)\r\n $rootScope.calendarevents = []\r\n processArray(dta.RS_0, function (o) {\r\n ////console.log(o)\r\n \r\n o.tasks = [];\r\n o.tasks.name = [];\r\n o.to = o.DueDateTime;\r\n o.from = o.EffectiveDateTime;\r\n o.EffectiveToolTip = new Date(o.EffectiveDateTime + ' UTC');\r\n o.DueToolTip = new Date(o.DueDateTime + ' UTC')\r\n o.assignmentStatus = '';\r\n var clr = \"#9f9f9f\";\r\n if (o.CompletedOnTimePct !== '100' && today > new Date(o.DueDateTime)) {\r\n clr = \"#e85656\";\r\n }\r\n if (o.CompletedOnTimePct !== '100' && today < new Date(o.DueDateTime) && today > new Date(o.EffectiveDateTime)) {\r\n clr = \"#f89406\";\r\n }\r\n if (o.CompletedOnTimePct === '100') {\r\n clr = '#90b900';\r\n }\r\n if (o.EffectiveDateTime > today) {\r\n clr = '#9f9f9f';\r\n }\r\n \r\n o.tasks.push({\r\n to: new Date(o.DueDateTime + ' UTC'),\r\n from: new Date(o.EffectiveDateTime + ' UTC'),\r\n //DueDateTime: new Date(o.DueDateTime + ' UTC'),\r\n //EffectiveDateTime: new Date(o.EffectiveDateTime + ' UTC'),\r\n content: '' + o.Label + '',\r\n name: o.Label,\r\n color: clr\r\n })\r\n\r\n o.assignFailedData = o.OnTime - o.CompletedOnTime;\r\n o.assignData = [o.CompletedOnTime, o.assignFailedData, o.Delinquent]\r\n o.Label = o.Label.replace(/Q & A<\\/b>: |Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A: |Q & A /g, \"\");\r\n o.name = o.Label;\r\n //o.tasks.to = o.DueDateTime;\r\n //o.tasks.from = o.EffectiveDateTime;\r\n //o.tasks.content = o.Label;\r\n //o.tasks.name = o.Label;\r\n o.content = ' ' + o.Label\r\n\r\n CalData.push(o);\r\n \r\n $rootScope.calendarevents.push({\r\n start: new Date(o.EffectiveDateTime + ' UTC'),\r\n end: new Date(o.DueDateTime + ' UTC'),\r\n title: o.Label,\r\n color: clr,\r\n DueDateTime: new Date(o.DueDateTime + ' UTC'),\r\n EffectiveDateTime: new Date(o.EffectiveDateTime + ' UTC'),\r\n CourseId: o.CourseId,\r\n ChapterId: o.ChapterId,\r\n TopicId: o.TopicId,\r\n SubTopicId: o.SubTopicId,\r\n AssessmentId: o.AssessmentId\r\n })\r\n });\r\n var ChapData = [];\r\n ////////console.log(CalData)\r\n $scope.AssignTooltip = function (o) {\r\n //////console.log(o)\r\n $http.post('/Execute/GetAssignmentDetailv3', [$rootScope.User.InstitutionId, o.CourseId, o.ChapterId, o.TopicId, o.SubTopicId, o.AssessmentId, o.DueDateTime, o.EffectiveDateTime]).success(function (data) {\r\n ////////console.log(data.RS_0);\r\n o.Assignees = data.RS_0;\r\n o.AssigneeNames = [];\r\n processArray(o.Assignees, function (user) {\r\n o.AssigneeNames = o.AssigneeNames + ' ' + user.FirstName + ' ' + user.LastName + ' ' + user.Class\r\n user.FirstandLast = user.FirstName + ' ' + user.LastName\r\n if (o.AssigneeNames === undefined) {\r\n o.AssigneeNames = {};\r\n }\r\n })\r\n });\r\n };\r\n $scope.GanttData = CalData;\r\n $scope.filterme = '';\r\n $scope.filterRow = function (stuff) {\r\n $scope.DataLoaded = false;\r\n $scope.GanttData = CalData;\r\n $scope.GanttData = $filter('filter')($scope.GanttData, { Label: stuff });\r\n $scope.DataLoaded = true;\r\n }\r\n $scope.filterdaterange = function (row) {\r\n ////console.log('datafilter', $scope.DataLoaded)\r\n if ($scope.ShowGantt == true) {\r\n var valid = [];\r\n //$scope.DataLoaded = false;\r\n if ((new Date(row.from) >= new Date($scope.TodayMinusFiveStart) && new Date($scope.TodayMinusFiveEnd) >= new Date(row.from)) ||\r\n (new Date(row.to) >= new Date($scope.TodayMinusFiveStart) && new Date($scope.TodayMinusFiveEnd) >= new Date(row.to)) ||\r\n (new Date($scope.TodayMinusFiveStart) >= new Date(row.from) && new Date(row.to) >= new Date($scope.TodayMinusFiveEnd))) {\r\n if ($scope.DataLoaded == false) {\r\n $timeout(function () {\r\n\r\n $scope.DataLoaded = true;\r\n\r\n }, 50, true)\r\n }\r\n // $scope.DataLoaded = true;\r\n return valid;\r\n }\r\n // //console.log(valid)\r\n //$timeout(function () {\r\n\r\n // $scope.DataLoaded = true;\r\n\r\n //}, 0, true)\r\n }\r\n }\r\n $timeout(function () {\r\n $scope.api.side.setWidth()\r\n try {\r\n $scope.api.tree.collapseAll();\r\n } catch (e) { }\r\n $scope.DataLoaded = true;\r\n }, 0, true);\r\n $scope.calendarevents = $rootScope.calendarevents\r\n $scope.filteredcalendar = [];\r\n $scope.filterthecalendar = function (filteredevents) {\r\n $scope.filteredcalendar = $filter('filter')($rootScope.calendarevents, filteredevents);\r\n $('#assigncalendar').fullCalendar('removeEvents')\r\n $('#assigncalendar').fullCalendar('addEventSource', $scope.filteredcalendar)\r\n //////console.log($scope.filteredcalendar)\r\n }\r\n $scope.refreshcalendar = function () {\r\n $('#assigncalendar').fullCalendar('removeEvents')\r\n $('#assigncalendar').fullCalendar('addEventSource', $rootScope.calendarevents)\r\n }\r\n $('#assigncalendar').fullCalendar('addEventSource', $rootScope.calendarevents)\r\n var $element = $('#assigncalendar').fullCalendar({\r\n //height: 335,\r\n header: {\r\n left: 'prev,next today',\r\n center: 'title',\r\n right: 'month,agendaWeek,agendaDay'\r\n },\r\n defaultDate: today,\r\n selectable: true,\r\n selectHelper: true,\r\n editable: false,\r\n eventAfterAllRender: function () {\r\n $timeout(function () {\r\n $scope.CalendarLoaded = true\r\n\r\n })\r\n },\r\n eventLimit: true, // allow \"more\" link when too many events\r\n eventTextColor: 'black',\r\n events: $rootScope.calendarevents,\r\n eventClick: function (event) {\r\n ////console.log(event)\r\n $scope.EditAssignment(event)\r\n $(this).css('cursor', 'pointer');\r\n },\r\n eventMouseover: function (events) {\r\n $(this).css('cursor', 'pointer');\r\n },\r\n });\r\n \r\n $scope.DataLoaded = true;\r\n ////console.log($scope.DataLoaded)\r\n\r\n });\r\n\r\n\r\n }\r\n \r\n )\r\n $scope.filterNames = function (v) {\r\n $scope.UserFilter = v;\r\n ////console.log(v)\r\n }\r\n }\r\n \r\n $scope.ShowGanttToggle = function () {\r\n $scope.ShowGantt = !$scope.ShowGantt;\r\n $scope.loadassignment();\r\n }\r\n $scope.loadassignment()\r\n }\r\n \r\n }\r\n});\r\napp.directive('assignCalendar', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/assignCalendar.htm',\r\n scope: {\r\n id: '=',\r\n data: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter) {\r\n //function assigncalendar(baConfig) {\r\n // var dashboardColors = baConfig.colors.dashboard;\r\n //////console.log(GanttData)\r\n var today = new Date();\r\n var $element = $('#assigncalendar').fullCalendar({\r\n //height: 335,\r\n header: {\r\n left: 'prev,next today',\r\n center: 'title',\r\n right: 'month,agendaWeek,agendaDay'\r\n },\r\n defaultDate: today,\r\n selectable: true,\r\n selectHelper: true,\r\n select: function (start, end) {\r\n var title = prompt('Event Title:');\r\n var eventData;\r\n if (title) {\r\n eventData = {\r\n title: title,\r\n start: start,\r\n end: end\r\n };\r\n $element.fullCalendar('renderEvent', eventData, true); // stick? = true\r\n }\r\n $element.fullCalendar('unselect');\r\n },\r\n editable: true,\r\n eventLimit: true, // allow \"more\" link when too many events\r\n events: []\r\n });\r\n //}\r\n }\r\n }\r\n});\r\napp.directive('editsubscriptions', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/editsubscriptions.htm',\r\n scope: {\r\n \r\n },\r\n controller: function ($scope, $http, $rootScope, $filter) {\r\n //function addSlashes(value) {\r\n // if (value) {\r\n // //////console.log(value);\r\n // value = value.replace(/(\\r\\n|\\n|\\r)/gm, \" \");\r\n // value = value.replace(/\\//g, \"\\/\");\r\n // value = value.replace(/'/g, \"`\");\r\n // //////console.log(value);\r\n // }\r\n // return value;\r\n //}\r\n //function editCourses(id) {\r\n\r\n //}\r\n //function addSubscription() {\r\n // editSubscription(\"\", \"\", \"\");\r\n //}\r\n $scope.newsubscription = function () {\r\n var newsubModal = $uibModal.open({\r\n templateUrl: 'app/tpls/editsubscriptions_modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.newsub = true;\r\n $scope.subname = '';\r\n $scope.subdesc = '';\r\n $scope.CreateNewSub = function (name, desc) {\r\n ////console.log(name)\r\n ////console.log(desc)\r\n $http.post(\"/Execute/NewSubscription\", JSON.stringify([name, desc])).success(function (data) {\r\n $scope.newsub = data;\r\n ////console.log($scope.newsub)\r\n $scope.cancel();\r\n \r\n })\r\n }\r\n $scope.cancel = function () {\r\n newsubModal.close(false);\r\n };\r\n }\r\n })\r\n\r\n }\r\n $scope.editsubscription = function (sub) {\r\n var editsubModal = $uibModal.open({\r\n templateUrl: 'app/tpls/editsubscriptions_modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n ////console.log(sub)\r\n $scope.editsub = true;\r\n $scope.sub = sub;\r\n $scope.UpdateSub = function (sub) {\r\n ////console.log([sub.Id.toString(), sub.Name, sub.Description])\r\n $http.post(\"Execute/UpdateSubscriptionSimple\", [sub.Id.toString(), sub.Name, sub.Description]).success(function (rslt) {\r\n $http.get(\"/api/Subscriptions(\" + sub.Id + \"L)\").success(function (data) {\r\n $scope.editsub = data;\r\n ////console.log($scope.editsub)\r\n $scope.cancel();\r\n })\r\n });\r\n //$http.put(\"/api/Subscriptions(\" + sub.Id + \"L)\", JSON.stringify([sub])).success(function (data) {\r\n // $scope.editsub = data;\r\n // ////console.log($scope.editsub)\r\n // $scope.cancel();\r\n //})\r\n }\r\n $scope.cancel = function () {\r\n editsubModal.close(false);\r\n };\r\n }\r\n })\r\n\r\n }\r\n $scope.editSubscription = function (id, name, desc) {\r\n ////console.log(id, name, desc)\r\n $(\"#dialog\").html('
Name
Description
');\r\n $(\"#dialog\").dialog({\r\n width: \"800px\", modal: true, resizable: false, buttons: [\r\n {\r\n text: \"Save\", click: function () {\r\n if ($(\"#SubId\").val() == \"\") {\r\n var sub = new Object();\r\n sub.Name = $(\"#txtName\").val();\r\n sub.Description = $(\"#txtDesc\").val();\r\n $.ajax({\r\n url: \"/Execute/NewSubscription\",\r\n type: 'POST',\r\n success: function (data) {\r\n $(\"#dialog\").dialog(\"close\");\r\n loadSubscriptions();\r\n },\r\n error: function (data) {\r\n $(\"#InstitutionalContainer\").html(\"
\" + (data) + \"
\");\r\n },\r\n contentType: \"application/json\",\r\n data: JSON.stringify([sub.Name, sub.Description]),\r\n });\r\n }\r\n else {\r\n var sub = new Object();\r\n sub.Id = id.toString();\r\n sub.Name = $(\"#txtName\").val();\r\n sub.Description = $(\"#txtDesc\").val();\r\n ////console.log(\"/LMSData.svc/Subscriptions(\" + id + \"L)\")\r\n $.ajax({\r\n url: \"/LMSData.svc/Subscriptions(\" + id + \"L)\",\r\n type: 'PUT',\r\n success: function (data) {\r\n $(\"#dialog\").dialog(\"close\");\r\n loadSubscriptions();\r\n },\r\n error: function (data) {\r\n alert(JSON.stringify(data));\r\n },\r\n contentType: \"application/json\",\r\n dataType: \"json\",\r\n data: JSON.stringify(sub),\r\n });\r\n }\r\n $(this).dialog(\"close\");\r\n }\r\n },\r\n { text: \"Cancel\", click: function () { $(this).dialog(\"close\"); } }\r\n ]\r\n });\r\n }\r\n //function AddCourses() {\r\n // $(\"#ddlAvailable option:selected\").each(function () {\r\n // $(\"#ddlSubscribed\").append(this);\r\n // });\r\n // $(\"#ddlSubscribed option:selected\").removeAttr(\"selected\");\r\n //}\r\n //function RemoveCourses() {\r\n // $(\"#ddlSubscribed option:selected\").each(function () {\r\n // $(\"#ddlAvailable\").append(this);\r\n // });\r\n // $(\"#ddlAvailable option:selected\").removeAttr(\"selected\");\r\n //}\r\n //var subAssigned;\r\n\r\n\r\n $scope.editcourses = function (id) {\r\n var editCoursesModal = $uibModal.open({\r\n templateUrl: 'app/tpls/editsubscriptions_modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n ////console.log(id)\r\n $scope.Id = id;\r\n $scope.selectedcourses = [];\r\n $scope.currentsubscription = true;\r\n\r\n $http.get(\"/api/Subscriptions(\" + $scope.Id + \"L)/Courses?$orderby=Name\").success( function (data) {\r\n //////console.log(data)\r\n $scope.InSubscription = data.d;\r\n subAssigned = data.d;\r\n ////console.log($scope.InSubscription)\r\n $(\"#dlgCourses\").append(\"\");\r\n $.each($scope.InSubscription, function (idx, cur) {\r\n $(\"#ddlSubscribed\").append(\"\");\r\n });\r\n $http.post(\"/Execute/GetUnsubscribedCurriculaForSubscription\", [$scope.Id]).success(function (data) {\r\n \r\n $scope.available = data.RS_0;\r\n //////console.log($scope.available)\r\n angular.forEach($scope.available, function (ava) {\r\n ava.Selected = false;\r\n })\r\n angular.forEach($scope.InSubscription, function (insub) {\r\n insub.Selected = false;\r\n })\r\n //$.each($scope.available, function (idx, cur) {\r\n // $(\"#ddlAvailable\").append(\"\");\r\n //});\r\n //$(\"#courses\").css(\"visibility\", \"visible\");\r\n //$(\"#dWait\").remove();\r\n\r\n $scope.SubscriptionId = $scope.Id;\r\n $scope.InSubLength = $scope.InSubscription.length;\r\n $scope.Save = function (selectcourses) {\r\n \r\n ////console.log(selectcourses)\r\n //////console.log($scope.SubscriptionId)\r\n angular.forEach(selectcourses, function (sc) {\r\n if (sc.RemoveMe == true) {\r\n ////console.log(sc.Id)\r\n ////console.log($scope.SubscriptionId)\r\n $http.post(\"/Execute/DeleteCourseFromScrip\", [$scope.SubscriptionId, sc.Id]).success(function (data) {\r\n $scope.subscriptdel = data;\r\n ////console.log($scope.subscriptdel);\r\n \r\n })\r\n }\r\n if (sc.AddMe == true) {\r\n ////console.log(sc.Id)\r\n ////console.log($scope.SubscriptionId)\r\n $http.post(\"/Execute/AddCourseToScrip\", [$scope.SubscriptionId, sc.Id]), function (jqXHR, textStatus) {\r\n $scope.subscriptadd = jqXHR;\r\n $scope.text = textStatus\r\n ////console.log($scope.subscriptadd)\r\n ////console.log($scope.text)\r\n }\r\n }\r\n })\r\n \r\n $scope.cancel()\r\n }\r\n $scope.AddToSelected = function (select) {\r\n ////console.log(select)\r\n angular.forEach(select, function (sel) {\r\n sel.Selected = true;\r\n \r\n })\r\n $scope.selectedcourses = select\r\n ////console.log($scope.selectedcourses)\r\n }\r\n $scope.UpdateCourses = function (available, insub) {\r\n $scope.available = [];\r\n $scope.InSubscription = [];\r\n $scope.available = available;\r\n $scope.InSubscription = insub;\r\n }\r\n $scope.AddCourses = function (selected) {\r\n ////console.log(selected)\r\n angular.forEach(selected, function (sel) {\r\n if (sel.Selected == true) {\r\n sel.AddMe = true;\r\n $scope.InSubscription.push(sel)\r\n $scope.available = $filter('filter')($scope.available, '!' + sel.Selected)\r\n }\r\n\r\n })\r\n ////console.log($scope.available)\r\n ////console.log($scope.InSubscription)\r\n $scope.UpdateCourses($scope.available, $scope.InSubscription)\r\n //$(\"#ddlAvailable option:selected\").each(function () {\r\n // $(\"#ddlSubscribed\").append(this);\r\n //});\r\n //$(\"#ddlSubscribed option:selected\").removeAttr(\"selected\");\r\n }\r\n $scope.RemoveCourses = function (selected) {\r\n ////console.log(selected)\r\n angular.forEach(selected, function (sel) {\r\n if (sel.Selected == true) {\r\n sel.RemoveMe = true;\r\n $scope.available.push(sel)\r\n $scope.InSubscription = $filter('filter')($scope.InSubscription, '!' + sel.Selected)\r\n }\r\n\r\n })\r\n ////console.log($scope.available)\r\n ////console.log($scope.InSubscription)\r\n $scope.UpdateCourses($scope.available, $scope.InSubscription)\r\n }\r\n });\r\n });\r\n $scope.cancel = function () {\r\n editCoursesModal.close(false);\r\n };\r\n\r\n },\r\n resolve: {}\r\n });\r\n }\r\n \r\n $scope.loadSubscriptions = function() {\r\n $http.get(\"/api/Subscriptions?$orderby=Name\").success( function (data) {\r\n $scope.subscriptions = data.d;\r\n \r\n });\r\n }\r\n $scope.loadSubscriptions();\r\n }\r\n }\r\n});\r\napp.directive('assignment', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/Assignment.htm',\r\n scope: {\r\n institionId: '=',\r\n courseId: '=',\r\n chapterId: '=',\r\n topicId: '=',\r\n subTopicId: '=',\r\n assessmentId: '=',\r\n dueDateTime: '=',\r\n effectiveDateTime: '=',\r\n assessmentLabel: '=',\r\n hideinactive: '=',\r\n custom: '=',\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter) {\r\n $scope.TodayDate = function () {\r\n var now = new Date();\r\n return $filter('date')(now, \"MMM dd, yyyy\")\r\n };\r\n $scope.IsOn = $scope.hideinactive;\r\n $scope.unixTodayDate = Date.parse($scope.TodayDate() + ' UTC');\r\n $scope.unixDueDateTime = Date.parse($scope.dueDateTime + ' UTC');\r\n $scope.unixEffectiveDateTime = Date.parse($scope.effectiveDateTime + ' UTC');\r\n angular.forEach($scope.Assignment, function (assign) {\r\n assign.showList = false\r\n });\r\n $scope.showTitle = true;\r\n $scope.$on('closedeetsassign', function () {\r\n angular.forEach($scope.Assignment, function (assign) {\r\n assign.showList = false\r\n });\r\n });\r\n \r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.pageSizeChange = function (page) {\r\n $scope.PageSize = page\r\n }\r\n $scope.pageSizzeChange = function (page) {\r\n $scope.PageSizze = page\r\n }\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n ////////////console.log('Bonk: '+$scope.institionId+','+$scope.courseId+','+$scope.chapterId+','+$scope.topicId+','+$scope.subTopicId+','+$scope.assessmentId+','+$scope.dueDateTime+','+$scope.effectiveDateTime);\r\n \r\n //////console.log($scope.dueDateTime)\r\n $scope.WaitA = true;\r\n $http.post(\"/Execute/GetAssignmentDetailv3\", [$scope.institionId, $scope.courseId, $scope.chapterId, $scope.topicId, $scope.subTopicId, $scope.assessmentId, $scope.dueDateTime, $scope.effectiveDateTime]).success(function (data) {\r\n $scope.WaitA = false;\r\n $scope.TotalAttempts = 0;\r\n $scope.FailFails = 0;\r\n $scope.NoAttempt = 0;\r\n $scope.Passed = 0;\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n $scope.ScoresSumForAvg = 0;\r\n $scope.NumberOfScores = 0;\r\n $scope.ListOfScores = [];\r\n $scope.AssStatusFilter = '';\r\n $scope.Assignment = data.RS_0;\r\n ////////console.log($scope.Assignment)\r\n angular.forEach($scope.Assignment, function (u) {\r\n u.Highest = 1 * u.Highest;\r\n $scope.ScoresSumForAvg += u.Highest;\r\n if (u.Highest > 0) {\r\n $scope.NumberOfScores++;\r\n $scope.ListOfScores.push(u.Highest);\r\n }\r\n u.TimesTaken = 1 * u.TimesTaken;\r\n $scope.TotalAttempts += u.TimesTaken;\r\n if (((1 * u.Highest) < (1 * u.Passing_Score)) && ((1 * u.TimesTaken) > 0)) {\r\n $scope.FailFails++;\r\n u.AssStatus = 'Fail';\r\n }\r\n if (u.TimesTaken == 0) {\r\n $scope.NoAttempt++;\r\n u.AssStatus = 'NoAttempt';\r\n }\r\n if ((1 * u.Highest) >= (1 * u.Passing_Score)) {\r\n $scope.Passed++;\r\n u.AssStatus = 'Pass';\r\n }\r\n if (u.CourseId == '0') {\r\n $scope.custom = 1\r\n }\r\n });\r\n\r\n $scope.DoAssOut = function () {\r\n $scope.AssOut = $filter('filter')($scope.Assignment, function (item) {\r\n for (var attr in item) {\r\n if ($scope.AssStatusFilter == '') {\r\n return true;\r\n } else if (item['AssStatus'] == $scope.AssStatusFilter) {\r\n return true;\r\n }\r\n }\r\n \r\n return false;\r\n });\r\n };\r\n \r\n $scope.UpdateAssStat = function (st) {\r\n $scope.AssStatusFilter = st;\r\n $scope.DoAssOut();\r\n }\r\n $scope.DoAssOut();\r\n \r\n \r\n $http.post('/Execute/GetAssessmentAverage', [$scope.assessmentId]).success(function(d){$scope.AssessmentAverage = d.RS_0[0].Average});\r\n ////console.log(\"ASS AVG: \"+$scope.AssessmentAverage);\r\n\r\n ////////console.log($scope.Assignment);\r\n //console.log($scope.AssOut);\r\n\r\n //$scope.AssAverage = 0;\r\n var tot = 0;\r\n var totcnt = 0;\r\n angular.forEach($scope.AssOut, function (ao) {\r\n if (ao.Highest > 0) {\r\n tot = (tot + 1 * ao.Highest);\r\n totcnt++;\r\n }\r\n });\r\n if (totcnt > 0) {\r\n $scope.AssAverage = (tot / totcnt).toFixed(0);\r\n } else {\r\n $scope.AssAverage = 0;\r\n }\r\n\r\n $scope.AvgHighest = ($scope.NumberOfScores > 0 ? ($scope.ScoresSumForAvg / $scope.NumberOfScores) : \"No Scores\");\r\n $scope.ListOfScores.sort(function (a, b) {\r\n return a - b;\r\n });\r\n $scope.HighestBest = $scope.ListOfScores[$scope.ListOfScores.length - 1];\r\n $scope.LowestBest = $scope.ListOfScores[0];\r\n //$http.post(\"/Execute/GetAssignableUsersForInstitution\", [$scope.institionId]).success(function (cal) {\r\n // $rootScope.InstitutionUserList = cal.RS_0;\r\n // $scope.InstitutionUserList = cal.RS_0;\r\n // ////////console.log($rootScope.InstitutionUserList)\r\n //})\r\n\r\n });\r\n \r\n \r\n $scope.predicate = 'Highest';\r\n $scope.reverse = true;\r\n $scope.order = function (predicate) {\r\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\r\n $scope.predicate = predicate;\r\n };\r\n $scope.ShowHotSpots = function (institionId, courseId, chapterId, topicId, subTopicId, assessmentId, dueDateTime, effectiveDateTime, assessmentLabel) {\r\n if ($scope.TotalAttempts > 0) {\r\n var hotSpotModal = $uibModal.open({\r\n templateUrl: 'app/tpls/AssignmentHotSpots-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.institionId = institionId;\r\n $scope.courseId = courseId;\r\n $scope.chapterId = chapterId;\r\n $scope.topicId = topicId;\r\n $scope.subTopicId = subTopicId, $scope.assessmentId = assessmentId;\r\n $scope.dueDateTime = new Date(dueDateTime + ' UTC').formatSQLDateTime();\r\n //$scope.dueDateTime = $filter('date')($scope.dueDateTime, 'mediumDate')\r\n $scope.effectiveDateTime = new Date(effectiveDateTime + ' UTC').formatSQLDateTime();\r\n //$scope.effectiveDateTime = $filter('date')($scope.effectiveDateTime, 'mediumDate')\r\n $scope.assessmentLabel = assessmentLabel;\r\n $scope.cancel = function () {\r\n $uibModal.close(false);\r\n };\r\n\r\n },\r\n resolve: {}\r\n });\r\n }\r\n\r\n };\r\n $scope.ShowReviewMode = function (institionId, courseId, chapterId, topicId, subTopicId, assessmentId, dueDateTime, effectiveDateTime, assessmentLabel) {\r\n if ($scope.unixTodayDate >= $scope.unixDueDateTime) {\r\n var reviewModeModal = $uibModal.open({\r\n templateUrl: '/js/App/templates/AssignmentReviewMode-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'xlg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.institionId = institionId;\r\n $scope.courseId = courseId;\r\n $scope.chapterId = chapterId;\r\n $scope.topicId = topicId;\r\n $scope.subTopicId = subTopicId, $scope.assessmentId = assessmentId;\r\n $scope.dueDateTime = dueDateTime;\r\n $scope.effectiveDateTime = effectiveDateTime;\r\n $scope.assessmentLabel = assessmentLabel;\r\n \r\n\r\n },\r\n resolve: {}\r\n });\r\n }\r\n\r\n }\r\n\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('assignmentHotspots', function ($parse, $http, $compile, App) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/assignmentHotspots.htm',\r\n scope: {\r\n institionId: '=',\r\n courseId: '=',\r\n chapterId: '=',\r\n topicId: '=',\r\n subTopicId: '=',\r\n assessmentId: '=',\r\n dueDateTime: '=',\r\n effectiveDateTime: '=',\r\n assessmentLabel: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $uibModal, $filter, App) {\r\n $scope.WaitSpots = true;\r\n $http.post(\"/Execute/GetAssignmentQuestionStats\", [$scope.institionId, $scope.courseId, $scope.chapterId, $scope.topicId, $scope.subTopicId, $scope.assessmentId, $scope.effectiveDateTime, $scope.dueDateTime]).success(function (data) {\r\n //console.log(data)\r\n $scope.HotSpotSort = 'IsIncorrect';\r\n $scope.SortReverse = true;\r\n $scope.UpdateSort = function (val) {\r\n $scope.HotSpotSort = val;\r\n //////////console.log(\"Sort changed to \"+val);\r\n }\r\n $scope.UpdateReverse = function (val) {\r\n if (val === \"true\") { val = true; }\r\n if (val === \"false\") { val = false; }\r\n $scope.SortReverse = val;\r\n //////////console.log(\"Reverse sort \"+(val?\"enabled\":\"disabled\"));\r\n }\r\n $scope.FullQuestions = data.RS_1;\r\n $scope.HotSpots = [];\r\n //////////console.log($scope.FullQuestions);\r\n angular.forEach(data.RS_0, function (hot) {\r\n var skipped = (1 * hot.CNT) - (1 * hot.HasAnswered);\r\n hot.Skipped = skipped;\r\n var sF = ((((hot.CNT - hot.IsCorrect) / (hot.CNT + hot.IsCorrect)) / 2) * 100);\r\n var sFAdjusted = sF * hot.CNT;\r\n hot.sFAdjusted = sFAdjusted;\r\n hot.variance = sF;\r\n hot.IsIncorrect = (hot.HasAnswered - hot.IsCorrect);\r\n hot.PercentIncorrect = (1 - hot.PercentCorrect);\r\n if (sF >= 1.5) {\r\n this.push(hot);\r\n }\r\n }, $scope.HotSpots);\r\n\r\n angular.forEach($scope.HotSpots, function (hot) {\r\n var blerp = $.grep($scope.FullQuestions, function (e) {\r\n return e.QuestionId === hot.QuestionId;\r\n });\r\n try {\r\n hot.Answers = JSON.parse(blerp[0].AnswersJSON);\r\n } catch (exc) {\r\n //////////console.log(blerp);\r\n }\r\n\r\n hot.CorrectRemediation = blerp[0].CorrectRemediation;\r\n hot.IncorrectRemediation = blerp[0].IncorrectRemediation;\r\n hot.ShowReportLongText = false;\r\n ////////////console.log(hot.AnswersJSON);\r\n });\r\n //////console.log($scope.HotSpots);\r\n $scope.WaitSpots = false;\r\n });\r\n $scope.ReportQuestion = function (q) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: '/js/Eva/templates/QuestionFeedback.htm',\r\n size: 'lg-dark',\r\n controller: function ($scope, $http, $rootScope, $uibModal, items, App) {\r\n $scope.Question = items.question;\r\n $scope.CourseId = items.CourseId;\r\n $scope.ChapterId = items.ChapterId;\r\n $scope.TopicId = items.TopicId;\r\n $scope.SubTopicId = items.SubTopicId;\r\n $scope.AssessmentId = items.AssessmentId;\r\n $scope.Question.UserComments = \"\";\r\n\r\n $scope.UpdateUserComments = function (e) {\r\n //////////////console.log(e)\r\n //$scope.Question.UserComments = e.currentTarget.value;\r\n }\r\n $scope.ok = function () {\r\n var pathIds = [];\r\n pathIds[0] = $scope.Question.QuestionId;\r\n pathIds[1] = $scope.User.Username;\r\n pathIds[2] = $scope.CourseId;\r\n pathIds[3] = $scope.ChapterId;\r\n pathIds[4] = $scope.TopicId;\r\n pathIds[5] = $scope.SubTopicId; // ?\r\n pathIds[6] = $scope.AssessmentId;\r\n pathIds[7] = -1;\r\n pathIds[8] = $scope.Question.UserComments;\r\n $http.post(\"/Execute/SendContentErrorReport\", pathIds).success(function (data) {\r\n alert(\"Thank you for your Question Report submission - We're on it.\\n\\nYour satisfaction is very important to us. We will review your comments and take appropriate editorial steps, as warranted by our editorial board of board-certified physician educators.\\n\\nIf we have any further questions regarding this submission, we will contact you shortly via email. If not, please know your findings are being attended to and any corrective actions are occurring as fast as possible.\\n\\nWe update our courses daily, so once we have a resolution, any corrections will appear automatically in your content assets.\\n\\nThank you,\\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n $uibModal.close();\r\n });\r\n }\r\n },\r\n resolve: {\r\n items: function () {\r\n return {\r\n question: q,\r\n CourseId: $scope.courseId,\r\n ChapterId: $scope.chapterId,\r\n TopicId: (($scope.topicId == null) ? 0 : $scope.topicId),\r\n SubTopicId: (($scope.subTopicId == null) ? 0 : $scope.subTopicId),\r\n AssessmentId: $scope.assessmentId\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n});\r\napp.directive('institutionbyuserPaged', function ($parse, $http, $compile, App) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/InstitutionByUserPaged.htm',\r\n controller: function ($scope, $http, $rootScope, $filter) {\r\n $scope.User = $rootScope.User;\r\n //console.log($scope.User)\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n $scope.WaitUser = true;\r\n $scope.userfilter = '';\r\n $scope.IsOn = true;\r\n $scope.itemsPer = [25, 50, 100, 250]\r\n $scope.itemsPerPageU = $scope.itemsPer[0];\r\n $scope.IsExporting = false;\r\n //console.log(CurrentUserTZoffsett)\r\n $scope.CurrentUserTZoffsett = CurrentUserTZoffsett\r\n $scope.DateRangeStart = new Date()\r\n $scope.DateRangeEnd = new Date()\r\n $scope.DateStart = 'ALL'\r\n $scope.DateEnd = 'ALL'\r\n $scope.SetStartDate = function (val) {\r\n $scope.DateRangeStart = val\r\n if ($scope.HasDateRange) {\r\n $scope.DateStart = $scope.DateRangeStart.formatSQL()\r\n } else {\r\n $scope.DateStart = 'ALL'\r\n }\r\n $scope.CollapseAll();\r\n }\r\n $scope.SetEndDate = function (val) {\r\n $scope.DateRangeEnd = val\r\n if ($scope.HasDateRange) {\r\n $scope.DateEnd = $scope.DateRangeEnd.formatSQL()\r\n } else {\r\n $scope.DateEnd = 'ALL'\r\n }\r\n $scope.CollapseAll();\r\n console.log($scope.DateEnd)\r\n }\r\n $scope.SetAllDates = function (val) {\r\n $scope.HasDateRange = val;\r\n //console.log($scope.HasDateRange);\r\n if ($scope.HasDateRange) {\r\n $scope.DateStart = $scope.DateRangeStart.formatSQL();\r\n $scope.DateEnd = $scope.DateRangeEnd.formatSQLEnd();\r\n } else {\r\n $scope.DateStart = 'ALL'\r\n $scope.DateEnd = 'ALL'\r\n }\r\n $scope.CollapseAll();\r\n }\r\n function getKPI(idx, lst, o, fn) {\r\n $scope.ExportProgress = parseInt((idx/lst.length)*100)\r\n if (idx < lst.length) {\r\n ////console.log(lst[idx])\r\n console.log([$scope.DateStart, $scope.DateEnd, CurrentUserTZoffsett])\r\n\r\n $http.post(\"/Execute/GetKPIbyUserv3\", [lst[idx].Username, $scope.DateStart, $scope.DateEnd, CurrentUserTZoffsett]).success(function (data) {\r\n //console.log(data.RS_0)\r\n angular.forEach(data.RS_0, function (i) {\r\n if (i.TimesTaken != \"\") {\r\n var row = { \"Class\": lst[idx].Class, \"UserName\": lst[idx].Username, UserDisplay: lst[idx].DisplayName, IsCustom: (i.IsCustom != 0), \"Course\": i.CourseName, \"Chapter\": i.ChapterName, \"Topic\": i.TopicName.replace('', '').replace('', '').replace('', '').replace('', ''), \"Assessment\": i.AssessmentName.replace('', '').replace('', '').replace('', '').replace('', ''), \"FirstPassingDate\": i.FirstPassingDate, \"AverageScore\": i.AvgScore, \"HighScore\": i.HighScore, TimesTaken: i.TimesTaken, LastAttempt: i.LastAttempt, QuestionCount: i.QuestionCount, PoolCount: i.PoolCount };\r\n ////console.log(o)\r\n o.push(row);\r\n }\r\n })\r\n getKPI(idx + 1, lst, o, fn)\r\n });\r\n } else {\r\n fn(o)\r\n }\r\n }\r\n $scope.ProcessExport = function () {\r\n $scope.IsExporting = true;\r\n //$scope.$apply();\r\n var out = [];\r\n var f = $scope.institutionsettings\r\n angular.forEach($scope.filteredItemsU, function (u) {\r\n if ($scope.IsOn) {\r\n var IsInactive = false;\r\n if (f.Settings) {\r\n if (f.Settings.InactiveClasses) {\r\n angular.forEach(f.Settings.InactiveClasses, function (cn) {\r\n if (u.ClassName == cn) { IsInactive = true; }\r\n if (u.Class == cn) { IsInactive = true }\r\n });\r\n }\r\n }\r\n if (!IsInactive) {\r\n out.push(u);\r\n }\r\n } else {\r\n out.push(u);\r\n }\r\n })\r\n //console.log(out)\r\n var outputArr = []\r\n getKPI(0, out, outputArr, function (o) {\r\n ////console.log(o)\r\n var form = document.createElement('form');\r\n form.action = '/Export'+ guid() +'.csv';\r\n form.method = 'POST';\r\n form.target = '_blank';\r\n form.style.display = 'none';\r\n\r\n var input = document.createElement('input');\r\n input.type = 'text';\r\n input.name = 'data';\r\n input.value = JSON.stringify(o);\r\n\r\n var submit = document.createElement('input');\r\n submit.type = 'submit';\r\n submit.id = 'submitProject';\r\n\r\n form.appendChild(input);\r\n form.appendChild(submit);\r\n document.body.appendChild(form);\r\n ////console.log(form)\r\n form.submit()\r\n document.body.removeChild(form);\r\n ////console.log(form)\r\n $scope.IsExporting = false;\r\n });\r\n \r\n }\r\n $scope.reload = function () {\r\n $scope.loadusers();\r\n }\r\n \r\n $http.post(\"/Execute/GetAssignableUsersForInstitution\", [$scope.User.InstitutionId]).success(function (cal) {\r\n $scope.WaitUser = false;\r\n $scope.loadusers = function () {\r\n $scope.InstitutionUsers = [];\r\n $scope.InstitutionUsers = cal.RS_0;\r\n }\r\n $scope.loadusers();\r\n $scope.qqqq = '';\r\n $scope.sortingOrderU = 'LastName';\r\n $scope.reverseU = false;\r\n $scope.filteredItemsU = [];\r\n $scope.groupedItemsU = [];\r\n \r\n \r\n $scope.pagedItemsU = [];\r\n $scope.currentPageU = 0;\r\n $scope.updateSearchU = function (val) {\r\n $scope.qqqq = val;\r\n };\r\n $scope.CollapseAll = function () {\r\n angular.forEach($scope.InstitutionUsers, function (user) {\r\n user.ShowDeets = false;\r\n });\r\n $scope.$broadcast('closedeetsuser');\r\n }\r\n $scope.updatePageSizeU = function (val) {\r\n $scope.itemsPerPageU = val;\r\n };\r\n var searchMatchU = function (haystack, needle) {\r\n if (!needle) {\r\n return true;\r\n }\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1;\r\n };\r\n $scope.searchU = function () {\r\n $scope.filteredItemsU = $filter('filter')($scope.InstitutionUsers, function (item) {\r\n for (var attr in item) {\r\n if (searchMatchU(item['FirstName'], $scope.qqqq) || searchMatchU(item['LastName'], $scope.qqqq) || searchMatchU(item['Class'], $scope.qqqq) || searchMatchU(item['Email'], $scope.qqqq)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n /*$scope.filteredItemsU = $filter('filter')($scope.InstitutionUsers, function(item){\r\n for(var attr in item){\r\n if(searchMatch(item[attr],$scope.qqqq))\r\n }\r\n });*/\r\n if ($scope.sortingOrderU !== '') {\r\n $scope.filteredItemsU = $filter('orderBy')($scope.filteredItemsU, $scope.sortingOrderU, $scope.reverseU);\r\n }\r\n $scope.currentPageU = 0;\r\n $scope.groupToPagesU();\r\n };\r\n $scope.groupToPagesU = function () {\r\n //////////console.log(\"STARTGROUP\");\r\n $scope.pagedItemsU = [];\r\n for (var i = 0; i < $scope.filteredItemsU.length; i++) {\r\n if (i % $scope.itemsPerPageU === 0) {\r\n $scope.pagedItemsU[Math.floor(i / $scope.itemsPerPageU)] = [$scope.filteredItemsU[i]];\r\n } else {\r\n $scope.pagedItemsU[Math.floor(i / $scope.itemsPerPageU)].push($scope.filteredItemsU[i]);\r\n }\r\n }\r\n $scope.numPagesU = $scope.pagedItemsU.length;\r\n //////////console.log(\"PAGEDITEMS_IBU\");\r\n //////////console.log($scope.pagedItemsU);\r\n };\r\n $scope.rangeU = function (start, end) {\r\n var ret = [];\r\n if (!end) {\r\n end = start;\r\n start = 0;\r\n }\r\n for (var i = start; i < end; i++) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n };\r\n $scope.prevPageU = function () {\r\n if ($scope.currentPageU > 0) {\r\n $scope.currentPageU--;\r\n }\r\n };\r\n $scope.nextPageU = function () {\r\n if ($scope.currentPageU < $scope.pagedItemsU.length - 1) {\r\n $scope.currentPageU++;\r\n }\r\n };\r\n $scope.setPageU = function () {\r\n $scope.currentPageU = this.n;\r\n };\r\n $scope.searchU();\r\n $scope.sort_byU = function (newSortingOrderU) {\r\n if ($scope.sortingOrderU == newSortingOrderU) {\r\n $scope.reverseU = !$scope.reverseU;\r\n }\r\n $scope.sortingOrderU = newSortingOrderU;\r\n $scope.searchU();\r\n };\r\n \r\n }); /** /getUsers **/\r\n \r\n \r\n }, /** /controller **/\r\n link: function (scope, element, attrs) { }\r\n }; /** /return **/\r\n});\r\napp.directive('assignmentAttemptList', function ($parse, $http, $compile, App) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/AssignmentAttemptList.htm',\r\n scope: {\r\n userId: '=',\r\n courseId: '=',\r\n chapterId: '=',\r\n topicId: '=',\r\n subTopicId: '=',\r\n assessmentId: '=',\r\n beginDate: '=',\r\n endDate: '=',\r\n assessmentLabel: '=',\r\n showTitle: '=',\r\n custom: '=',\r\n },\r\n controller: function ($scope, $http, $uibModal, $rootScope) {\r\n $scope.Wait = true;\r\n //////console.log($rootScope.User)\r\n //////console.log($scope.userId)\r\n $scope.userName = '';\r\n $scope.userEmail = '';\r\n $scope.FirstName = '';\r\n $scope.LastName = ''\r\n if ($scope.custom == undefined) {\r\n $scope.custom = 0;\r\n }\r\n else {\r\n $scope.custom = 1;\r\n }\r\n angular.forEach($rootScope.InstitutionUserList, function (list){\r\n if ($scope.userId == list.UserID) {\r\n $scope.userName = list.Username;\r\n $scope.userEmail = list.Email;\r\n $scope.FirstName = list.FirstName;\r\n $scope.LastName = list.LastName\r\n }\r\n })\r\n //////console.log($scope.custom)\r\n $scope.unixSignStart = Date.parse($scope.beginDate + ' UTC');\r\n $scope.unixSignEnd = Date.parse($scope.endDate + ' UTC');\r\n ////console.log('[' + $scope.userName + ',' + $scope.courseId + ',' + $scope.chapterId + ',' + $scope.topicId + ',' + $scope.subTopicId + ',' + $scope.assessmentId + ',' + parseInt($scope.custom) + ']');\r\n var params = [$scope.userName,$scope.courseId,$scope.chapterId,$scope.topicId,$scope.subTopicId,$scope.assessmentId,parseInt($scope.custom)];\r\n //console.log(params)\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n $scope.Wait = false;\r\n //console.log(data)\r\n $scope.AttemptList = data.RS_0;\r\n //$scope.AttemptList.Label = $scope.assessmentLabel\r\n ////console.log($scope.unixSignStart)\r\n angular.forEach($scope.AttemptList, function (status) {\r\n status.PassingScoreParsed = parseFloat(status.PassingScore);\r\n status.ScoreParsed = parseFloat(status.Score);\r\n status.EndDateTime = new Date(status.EndDateTime + ' UTC')\r\n status.StartDateTime = new Date(status.StartDateTime + ' UTC')\r\n if (status.Status = 'Complete') {\r\n if (status.PassingScoreParsed > status.ScoreParsed) {\r\n status.ScoreStatus = 'Below Passing'\r\n }\r\n if (status.ScoreParsed >= status.PassingScoreParsed) {\r\n status.ScoreStatus = 'Complete'\r\n }\r\n }\r\n });\r\n\r\n ///*angular.forEach($scope.AttemptList, function(a,i){\r\n // a.UnixSessStart = Date.parse(a.StartDateTime);\r\n // a.UnixSessEnd = Date.parse(a.EndDateTime);\r\n // a.Time = a.UnixSessEnd - a.UnixSessStart;\r\n // if((a.UnixSessStart < $scope.unixSignStart) || (a.UnixSessEnd > $scope.unixSignEnd)) {\r\n // $scope.AttemptList.splice(i,1);\r\n // i--;\r\n // }\r\n //});*/\r\n\r\n /** BACKWARDS LOOP, MOFO! **/\r\n for (var i = $scope.AttemptList.length - 1; i >= 0; i--) {\r\n $scope.AttemptList[i].UnixSessStart = Date.parse($scope.AttemptList[i].StartDateTime);\r\n $scope.AttemptList[i].UnixSessEnd = Date.parse($scope.AttemptList[i].EndDateTime);\r\n $scope.AttemptList[i].Time = $scope.AttemptList[i].UnixSessEnd - $scope.AttemptList[i].UnixSessStart;\r\n if (($scope.AttemptList[i].UnixSessStart < $scope.unixSignStart) || ($scope.AttemptList[i].UnixSessEnd > $scope.unixSignEnd)) {\r\n $scope.AttemptList.splice(i, 1);\r\n }\r\n };\r\n //console.log($scope.AttemptList);\r\n });\r\n \r\n $scope.ViewPrescription = function (uaid, label) {\r\n\r\n var mi = $uibModal.open({\r\n templateUrl: 'app/tpls/InstUserByDetailsPrescription.htm',\r\n backdrop: \"static\",\r\n size: 'lg-dark',\r\n controller: function ($scope, $http, $rootScope, items, App, $location, $anchorScroll, $filter) {\r\n //console.log(items)\r\n $scope.showback = false;\r\n $scope.label = label;\r\n $scope.IsCustom = items.Uaid.CourseId == 0\r\n ////console.log(label)\r\n //$scope.RXReportQuestion = function (q, idx, obj) {\r\n // var modalInstance = $uibModal.open({\r\n // templateUrl: '/js/Eva/templates/QuestionFeedback.htm',\r\n // controller: function ($scope, $http, $rootScope, $modalInstance, items, App) {\r\n // $scope.Question = items.question;\r\n // //////console.log($scope.Question);\r\n // $scope.CourseId = items.CourseId;\r\n // $scope.ChapterId = items.ChapterId;\r\n // $scope.TopicId = items.TopicId;\r\n // $scope.SubTopicId = items.SubTopicId;\r\n // $scope.AssessmentId = items.AssessmentId;\r\n // $scope.Question.UserComments = \"\";\r\n\r\n // $scope.UpdateUserComments = function (e) {\r\n // //////////console.log(e)\r\n // //$scope.Question.UserComments = e.currentTarget.value;\r\n // }\r\n // $scope.ok = function () {\r\n // var pathIds = [];\r\n // pathIds[0] = $scope.Question.QuestionId;\r\n // pathIds[1] = App.CurrentUserInfo.Username;\r\n // pathIds[2] = $scope.CourseId;\r\n // pathIds[3] = $scope.ChapterId;\r\n // pathIds[4] = $scope.TopicId;\r\n // pathIds[5] = $scope.SubTopicId; // ?\r\n // pathIds[6] = $scope.AssessmentId;\r\n // pathIds[7] = idx;\r\n // pathIds[8] = $scope.Question.UserComments;\r\n // $http.post(\"/Execute/SendContentErrorReport\", pathIds).success(function (data) {\r\n // alert(\"Thank you for your Question Report submission - We're on it.\\n\\nYour satisfaction is very important to us. We will review your comments and take appropriate editorial steps, as warranted by our editorial board of board-certified physician educators.\\n\\nIf we have any further questions regarding this submission, we will contact you shortly via email. If not, please know your findings are being attended to and any corrective actions are occurring as fast as possible.\\n\\nWe update our courses daily, so once we have a resolution, any corrections will appear automatically in your content assets.\\n\\nThank you,\\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n // $modalInstance.close();\r\n // });\r\n // }\r\n \r\n // },\r\n // resolve: { items: function () { return { question: q, CourseId: obj.CourseId, ChapterId: obj.ChapterId, TopicId: ((obj.TopicId == null) ? 0 : obj.TopicId), SubTopicId: ((obj.SubTopicId == null) ? 0 : obj.SubTopicId), AssessmentId: obj.Assessment_Id } } }\r\n // });\r\n //}\r\n $scope.UserAssessment = items.Uaid;\r\n //////console.log($scope.UserAssessment);\r\n $scope.UserName = items.username;\r\n $scope.UserID = items.Uaid.User_UserID;\r\n //////console.log(items)\r\n //$scope.UserAssessment = items.parent.UserAssessments;\r\n //$scope.UserAssessmentId = items.UserAssessmentId;\r\n $scope.UserAssessment.IsCustom = $scope.UserAssessment.CourseId == 0;\r\n if ($scope.UserAssessment.IsCustom === undefined) {\r\n $scope.UserAssessment.IsCustom = 0;\r\n }\r\n var params = [];\r\n params[0] = $scope.UserAssessment.Id;\r\n params[1] = $scope.UserAssessment.CourseId == 0;\r\n //////console.log($scope.UserAssessment);\r\n $scope.Wait = true;\r\n //////console.log(params)\r\n \r\n $scope.toggleShowQs = function () {\r\n $scope.ShowQs = !$scope.ShowQs;\r\n }\r\n $scope.NavigateTo = function (courseid, chapterid, topicid, subtopicid, assessmentid) {\r\n mi.close(\"AbortReload\");\r\n App.NavigateTo(courseid, chapterid, topicid, subtopicid, assessmentid);\r\n }\r\n $scope.ok = function () {\r\n mi.close();\r\n };\r\n $scope.cancel = function () {\r\n mi.close(false);\r\n $location.hash('anchoruser' + $scope.UserAssessment.Id);\r\n $anchorScroll();\r\n };\r\n\r\n },\r\n resolve: {\r\n items: function () { return { username: $scope.userName, IsCustom: $scope.custom, Uaid: uaid, parent: parent } }\r\n }\r\n\r\n });\r\n }\r\n \r\n\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('instbyuserdetails', function ($parse, $http, $compile, App, $uibModal) {\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/InstUserByDetails.htm',\r\n scope: {\r\n userName: '=',\r\n startDate: '=',\r\n endDate: '=',\r\n tzOffset: '=',\r\n showDeets: '=',\r\n },\r\n controller: function ($scope, $http, $filter) {\r\n $scope.WaitInst = true;\r\n $scope.itemsPer = [25, 50, 100, 250]\r\n $scope.itemsPerPageA = $scope.itemsPer[0];\r\n\r\n ////console.log([$scope.userName, $scope.startDate, $scope.endDate, $scope.tzOffset])\r\n //console.log([$scope.userName, $scope.startDate, $scope.endDate, $scope.tzOffset])\r\n $http.post(\"/Execute/GetKPIbyUserv3\", [$scope.userName, $scope.startDate, $scope.endDate, $scope.tzOffset]).success(function (data) {\r\n console.log(data)\r\n $scope.WaitInst = false;\r\n $scope.UserDetails = [];\r\n \r\n for (var i = data.RS_0.length - 1; i >= 0; i--) {\r\n\r\n if (data.RS_0[i].HighScore != \"\") {\r\n $scope.UserDetails.push(data.RS_0[i]);\r\n }\r\n }\r\n ////console.log($scope.UserDetails)\r\n angular.forEach($scope.UserDetails, function (truncate) {\r\n truncate.AssessmentNameTrunc = truncate.AssessmentName.replace(/Q & A<\\/b>:|Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A:|Q & A/g, \"\");\r\n //truncate.unixFirstPassingDate = truncate.FirstPassingDate.formatShortLocal();\r\n \r\n truncate.FirstPassingDate = treatAsUTC((new Date(truncate.FirstPassingDate)))\r\n if (truncate.FirstPassingDate == \"\" || truncate.FirstPassingDate == null || isNaN(Date.parse(truncate.FirstPassingDate)) == true) {\r\n truncate.FirstPassingDate = \"N/A\"\r\n }\r\n \r\n \r\n \r\n });\r\n ////console.log($scope.UserDetails)\r\n $scope.getData = function () {\r\n return $filter('filter')($scope.UserDetails, $scope.q)\r\n };\r\n $scope.numberOfPagez = function () {\r\n return Math.ceil($scope.getData().length / $scope.pageSizze);\r\n };\r\n $scope.totalPagez = Math.ceil($scope.UserDetails.length / $scope.pageSizze);\r\n angular.forEach($scope.UserDetails, function (usr) {\r\n usr.ShowDeets = false\r\n });\r\n\r\n $scope.$on('closedeetsuser', function () {\r\n angular.forEach($scope.UserDetails, function (usr) {\r\n usr.ShowDeets = false\r\n });\r\n });\r\n\r\n $scope.currentPagge = 0;\r\n $scope.pageSizze = 5;\r\n ////////////console.log($scope.userName)\r\n $scope.q = '';\r\n $scope.updatePage = function (val) {\r\n $scope.currentPagge = val;\r\n }\r\n\r\n $scope.pageSizeChange = function (val) {\r\n $scope.pageSizze = val;\r\n if ($scope.pageSizze && $scope.UserDetails) {\r\n $scope.totalPagez = Math.ceil($scope.UserDetails.length / $scope.pageSizze);\r\n }\r\n };\r\n $scope.aaaa = '';\r\n $scope.sortingOrderA = 'unixFirstPassingDate';\r\n $scope.reverseA = true;\r\n $scope.filteredItemsA = [];\r\n $scope.groupedItemsA = [];\r\n //$scope.itemsPerPageA = 5;\r\n $scope.pagedItemsA = [];\r\n $scope.currentPageA = 0;\r\n $scope.updateSearchA = function (val) {\r\n $scope.aaaa = val;\r\n };\r\n $scope.updatePageSizeA = function (val) {\r\n $scope.itemsPerPageA = val;\r\n };\r\n var searchMatchA = function (haystack, needle) {\r\n if (!needle) {\r\n return true;\r\n }\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1;\r\n };\r\n $scope.groupToPagesA = function () {\r\n ////////////console.log(\"STARTGROUP\");\r\n $scope.pagedItemsA = [];\r\n for (var i = 0; i < $scope.filteredItemsA.length; i++) {\r\n if (i % $scope.itemsPerPageA === 0) {\r\n $scope.pagedItemsA[Math.floor(i / $scope.itemsPerPageA)] = [$scope.filteredItemsA[i]];\r\n } else {\r\n $scope.pagedItemsA[Math.floor(i / $scope.itemsPerPageA)].push($scope.filteredItemsA[i]);\r\n }\r\n }\r\n $scope.numPagesA = $scope.pagedItemsA.length;\r\n ////////////console.log(\"PAGEDITEMS_IBU\");\r\n ////////////console.log($scope.pagedItemsA);\r\n };\r\n $scope.searchA = function () {\r\n ////////////console.log(\"STARTSEARCH\");\r\n ////////////console.log($scope.aaaa);\r\n $scope.filteredItemsA = $filter('filter')($scope.UserDetails, function (item) {\r\n for (var attr in item) {\r\n ////////////console.log(item);\r\n if (searchMatchA(item['AssessmentNameTrunc'], $scope.aaaa) || searchMatchA(item['ChapterName'], $scope.aaaa)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n\r\n if ($scope.sortingOrderA !== '') {\r\n $scope.filteredItemsA = $filter('orderBy')($scope.filteredItemsA, $scope.sortingOrderA, $scope.reverseA);\r\n }\r\n $scope.currentPageA = 0;\r\n $scope.groupToPagesA();\r\n };\r\n $scope.searchA();\r\n $scope.sort_byA = function (newSortingOrderA) {\r\n if ($scope.sortingOrderA == newSortingOrderA) {\r\n $scope.reverseA = !$scope.reverseA;\r\n }\r\n $scope.sortingOrderA = newSortingOrderA;\r\n $scope.searchA();\r\n };\r\n\r\n $scope.rangeA = function (start, end) {\r\n var ret = [];\r\n if (!end) {\r\n end = start;\r\n start = 0;\r\n }\r\n for (var i = start; i < end; i++) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n };\r\n $scope.prevPageA = function () {\r\n if ($scope.currentPageA > 0) {\r\n $scope.currentPageA--;\r\n }\r\n };\r\n $scope.nextPageA = function () {\r\n if ($scope.currentPageA < $scope.pagedItemsA.length - 1) {\r\n $scope.currentPageA++;\r\n }\r\n };\r\n $scope.setPageA = function () {\r\n $scope.currentPageA = this.n;\r\n };\r\n $scope.TogAssHistory = function (parent, loadUserAssessments) {\r\n\r\n\r\n ////////////console.log($scope.userName)\r\n parent.ShowDeets = !parent.ShowDeets;\r\n ////////////console.log(parent.ShowDeets);\r\n\r\n parent.UserName = $scope.userName;\r\n if (loadUserAssessments == true) {\r\n \r\n if (!parent.UserAssessments) {\r\n ////////console.log([$scope.UserName, $scope.Course.CourseId, Topic.ChapterId, Topic.TopicId, CurrentUserTZoffsett]);\r\n if (parent.IsCustom === undefined) {\r\n parent.IsCustom = 0;\r\n }\r\n //////console.log(parent);\r\n var params = [parent.UserName, parent.CourseId, parent.ChapterId, parent.TopicId, parent.SubTopicId, parent.AssessmentId, parseInt(parent.IsCustom)];\r\n //console.log(params);\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n\r\n parent.UserAssessments = [];\r\n angular.forEach(data.RS_0, function (a) {\r\n if (a.Status == \"Complete\" || a.Status == \"score\") {\r\n a.StartDateTime = new Date(a.StartDateTime + \" UTC\")\r\n a.EndDateTime = new Date(a.EndDateTime + \" UTC\")\r\n a.Passed = (parseFloat(a.Score) >= parseFloat(a.PassingScore))\r\n a.Time = FormatTimespan(a.StartDateTime, a.EndDateTime)\r\n a.Time = a.Time.replace(\"minutes\", \"m\")\r\n a.Time = a.Time.replace(\"seconds\", \"s\")\r\n a.Time = a.Time.replace(\"hours\", \"h\")\r\n parent.UserAssessments.push(a);\r\n }\r\n });\r\n //////console.log(parent.UserAssessments)\r\n \r\n $scope.ViewPrescription = function (uaid) {\r\n ////console.log(uaid)\r\n var mi = $uibModal.open({\r\n templateUrl: 'app/tpls/InstUserByDetailsPrescription.htm',\r\n backdrop: \"static\",\r\n size: 'lg-dark',\r\n controller: function ($scope, $http, $rootScope, items, App, $location, $anchorScroll, $filter) {\r\n\r\n $scope.UserAssessment = items.Uaid;\r\n $scope.UserAssessment.IsCustom = ($scope.UserAssessment.CourseId == \"0\");\r\n\r\n\r\n $scope.NavigateTo = function (courseid, chapterid, topicid, subtopicid, assessmentid) {\r\n mi.close(\"AbortReload\");\r\n App.NavigateTo(courseid, chapterid, topicid, subtopicid, assessmentid);\r\n }\r\n $scope.ok = function () {\r\n mi.close();\r\n };\r\n $scope.cancel = function () {\r\n mi.close(false);\r\n $location.hash('anchoruser' + $scope.UserAssessment.Id);\r\n $anchorScroll();\r\n };\r\n\r\n },\r\n resolve: {\r\n items: function () { return { username: $scope.userName, Uaid: uaid, parent: parent } }\r\n }\r\n\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n\r\n };\r\n $scope.predicate = 'unixFirstPassingDate';\r\n $scope.reverse = true;\r\n $scope.order = function (predicate) {\r\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\r\n $scope.predicate = predicate;\r\n };\r\n });\r\n\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('userPurchaseHistory', function($parse,$http,$compile, App, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/UserPurchaseHistory.html',\r\n scope: {\r\n userId: '='\r\n },\r\n controller: function ($scope,$http,$location) {\r\n $scope.Purchases = [];\r\n if(!$scope.userId) {\r\n $scope.userId = $rootScope.User.UserId;\r\n }\r\n $scope.LoadPurchases = function() {\r\n $http.post(\"/Execute/GetUserProductPurchases\", [$scope.userId]).success(function(data){\r\n $scope.Purchases = data.RS_0;\r\n })\r\n }\r\n $scope.LoadPurchases();\r\n $scope.$watch('userId', function(newValue,oldValue, scope) {\r\n $scope.LoadPurchases();\r\n })\r\n }\r\n }\r\n})\r\napp.directive('institutionbycourse', function ($parse, $http, $compile, App, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/InstitutionByCourse.htm',\r\n scope: {\r\n },\r\n controller: function ($scope, $http, $uibModal, $anchorScroll, $location) {\r\n $scope.User = $rootScope.User;\r\n $scope.ibcChartOpts = {\r\n responsive: true,\r\n segmentShowStroke: true,\r\n segmentStrokeColor: '#fff',\r\n segmentStrokeWidth: 2,\r\n percentageInnerCutout: 75,\r\n animationSteps: 25,\r\n animationEasing: 'easeOutBounce',\r\n animateRotate: true,\r\n animateScale: false,\r\n yAxes: [{\r\n display: true,\r\n ticks: {\r\n beginAtZero: true,\r\n stacked: true\r\n }\r\n }]\r\n };\r\n $scope.PageSizzes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.testDataIbc = [9, 1, 2, 5, 4];\r\n $scope.ChartSampleData = [\r\n {\r\n value: 300,\r\n color: '#F7464A',\r\n highlight: '#FF5A5E',\r\n label: 'Red'\r\n },\r\n {\r\n value: 50,\r\n color: '#46BFBD',\r\n highlight: '#5AD3D1',\r\n label: 'Green'\r\n },\r\n {\r\n value: 100,\r\n color: '#FDB45C',\r\n highlight: '#FFC870',\r\n label: 'Yellow'\r\n }\r\n ];\r\n //console.log($scope.User.InstitutionId)\r\n //$http.post(\"/Execute/GetInstitutionCourses\", [$scope.User.InstitutionId]).success(function (data) {\r\n // console.log(data)\r\n //})\r\n $scope.ExpandAll = function () {\r\n angular.forEach($scope.Courses, function (Course) {\r\n Course.ShowChildren = true;\r\n angular.forEach(Course.Classes, function (Class) {\r\n Class.ShowChildren = true;\r\n });\r\n });\r\n }\r\n $scope.CollapseAll = function () {\r\n angular.forEach($scope.Courses, function (Course) {\r\n Course.ShowChildren = false;\r\n angular.forEach(Course.Classes, function (Class) {\r\n Class.ShowChildren = false;\r\n });\r\n });\r\n }\r\n $scope.ViewStudent = function (Student) {\r\n var mi = $uibModal.open({\r\n windowClass: 'course-dash',\r\n templateUrl: 'app/tpls/StudentCourse-modal.htm',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, items, $anchorScroll, $location) {\r\n $scope.ViewAssessment = function (ass, ua) {\r\n ua.ViewAss = !ua.ViewAss;\r\n ////////console.log(items)\r\n ////////console.log(ass)\r\n ////////console.log(ua)\r\n $scope.UA = items.UA;\r\n $scope.Assessment = items.Ass\r\n ////////////console.log(ua);\r\n //var mi = $uibModal.open({\r\n // windowClass: 'course-dash',\r\n // templateUrl: 'app/tpls/UserAssessmentQuestions-modal.htm',\r\n // backdrop: \"static\",\r\n // size: 'xlg',\r\n // controller: function ($scope, $http, $rootScope, items, $anchorScroll, $location) {\r\n // $scope.UA = items.UA;\r\n // ////////////console.log(items.UA);\r\n // $scope.Assessment = items.Ass;\r\n // ////////////console.log(items.Ass)\r\n // $scope.Student = items.Student;\r\n // $scope.cancel = function () {\r\n // $modalInstance.close(false);\r\n // $location.hash('anchorcourseass' + items.Ass.AssessmentId);\r\n // $anchorScroll();\r\n // };\r\n // $http.post(\"/Execute/GetUserAssessmentQuestions\", [$scope.UA.Id]).success(function (data) {\r\n // $scope.Questions = data.RS_0;\r\n // ////////////////console.log($scope.Questions);\r\n // angular.forEach($scope.Questions, function (q) {\r\n // q.Answers = JSON.parse(q.AnswersJSON);\r\n // q.SelectedAnswerIds = q.SelectedAnswerIdArray.split(\",\");\r\n // angular.forEach(q.Answers, function (Answer) {\r\n // Answer.Selected = false;\r\n // if (q.SelectedAnswerIds) {\r\n // angular.forEach(q.SelectedAnswerIds, function (id) {\r\n // if (Answer.Id == id) {\r\n // Answer.Selected = true;\r\n // }\r\n // });\r\n // }\r\n // });\r\n // });\r\n // ////////////////console.log($scope.Questions[0]);\r\n // });\r\n // },\r\n // resolve: { items: function () { return { UA: ua, Ass: ass, Student: Student } } }\r\n //});\r\n }\r\n $scope.ToggleChildren = function (parent, loadUserAssessments) {\r\n parent.ShowChildren = (parent.ShowChildren == false);\r\n parent.ShowPaginate = (parent.ShowPaginate == false)\r\n if (loadUserAssessments == true) {\r\n ////////////////console.log(parent);\r\n if (!parent.UserAssessments) {\r\n var params = [$scope.Student.UserName, $scope.Student.CourseId, parent.ChapterId, parent.TopicId, parent.SubTopicId, parent.AssessmentId, (($scope.custom == true) ? 1 : 0)];\r\n //////console.log(params)\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n parent.UserAssessments = [];\r\n angular.forEach(data.RS_0, function (a) {\r\n if (a.Status == \"Complete\" || a.Status == \"score\") {\r\n a.StartDateTime = new Date(a.StartDateTime + \" UTC\")\r\n a.EndDateTime = new Date(a.EndDateTime + \" UTC\")\r\n a.Passed = (parseFloat(a.Score) >= parseFloat(a.PassingScore))\r\n a.Time = FormatTimespan(a.StartDateTime, a.EndDateTime)\r\n a.ViewAss = false;\r\n parent.UserAssessments.push(a);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n }\r\n $scope.Student = items.student;\r\n ////////////console.log($scope.Student)\r\n $scope.CourseName = items.student.CourseName;\r\n $scope.cancel = function () {\r\n\r\n $location.hash('anchorcourse' + items.student.CourseId);\r\n $anchorScroll();\r\n };\r\n //////////////////console.log([$scope.Student.UserId, $scope.Student.CourseId]);\r\n $http.post(\"/Execute/GetStudentCourseDashboard\", [$scope.Student.UserId, $scope.Student.CourseId]).success(function (data) {\r\n $scope.Chapters = data.RS_0;\r\n $scope.Assessments = data.RS_1;\r\n angular.forEach($scope.Chapters, function (Chapter) {\r\n Chapter.ShowChildren = false;\r\n Chapter.Assessments = [];\r\n angular.forEach($scope.Assessments, function (Assessment) {\r\n Assessment.ShowChildren = false;\r\n if (Assessment.ChapterId == Chapter.ChapterId) {\r\n if (Assessment.PassDate != null) {\r\n if (isNaN(Assessment.PassDate.valueOf()) == true) {\r\n Assessment.PassDate = new Date(Assessment.PassDate + \" UTC\");\r\n } else {\r\n Assessment.PassDate = null;\r\n }\r\n }\r\n Chapter.Assessments.push(Assessment);\r\n }\r\n //if (Assessment.UserAssessments.length !== undefined) {\r\n // angular.forEach(Assessment, function (Ass) {\r\n // Ass.UserAssessments.ViewAss = false;\r\n // });\r\n //}\r\n });\r\n });\r\n });\r\n },\r\n resolve: { items: function () { return { student: Student } } }\r\n });\r\n }\r\n $scope.studentfilter = ''\r\n $scope.ToggleChildren = function (parent) {\r\n parent.ShowChildren = !parent.ShowChildren;\r\n //console.log(parent)\r\n }\r\n $scope.IsOn = true\r\n $scope.reload = function () {\r\n $scope.IsOn = !$scope.IsOn;\r\n $scope.load()\r\n }\r\n $scope.institutionsettings = [];\r\n $scope.institutionsettings.Settings = $rootScope.InstitutionSettings;\r\n console.log($scope.User)\r\n $http.post(\"/Execute/GetInstitutionAssignmentsDashboard\", [$scope.User.UserName]).success(function (data) {\r\n $scope.load = function () {\r\n \r\n $scope.Courses = [];\r\n $scope.Courses = data.RS_0;\r\n }\r\n $scope.load();\r\n //console.log(data)\r\n var Classes = data.RS_1;\r\n var Students = data.RS_2;\r\n\r\n angular.forEach($scope.Courses, function (Course) {\r\n Course.ShowChildren = false;\r\n Course.Classes = [];\r\n angular.forEach(Classes, function (Class) {\r\n if (Class.CourseId == Course.CourseId) {\r\n Class.ShowChildren = false;\r\n Class.Students = [];\r\n angular.forEach(Students, function (Student) {\r\n if (Class.CourseId == Student.CourseId && Class.Class == Student.Class) {\r\n Class.Students.push(Student);\r\n }\r\n });\r\n Course.Classes.push(Class)\r\n }\r\n });\r\n });\r\n var Students = data.RS_2;\r\n\r\n });\r\n\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('searchcontent', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/CustomExamSearch.htm',\r\n scope: {\r\n courseid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $location) {\r\n //$scope.flurb = {};\r\n //$scope.flurb.SearchQuery = $stateParams.Slug;\r\n $scope.SearchString = \"\";\r\n $scope.SearchLabel = $scope.SearchString;\r\n $scope.CourseArray = parseInt($scope.courseid);\r\n $scope.customexamsearch = true;\r\n $scope.SearchWait = true;\r\n $scope.ExecuteSearch = function () {\r\n $http.post('/Execute/SearchAllForStringByCourse', [$scope.SearchString, $scope.CourseArray]).success(function (rslt) {\r\n \r\n $scope.Results = {};\r\n $scope.Results.Questions = rslt.RS_0.concat(rslt.RS_1, rslt.RS_2);\r\n //$scope.Results.Questions.SubTopic = rslt.RS_0;\r\n //$scope.Results.Questions.Topic = rslt.RS_1;\r\n //$scope.Results.Questions.Chapter = rslt.RS_2;\r\n $scope.Results.Pages = rslt.RS_3;\r\n $scope.Results.SubTopics = rslt.RS_4;\r\n $scope.Results.Topics = rslt.RS_5;\r\n $scope.Results.Chapters = rslt.RS_6;\r\n $scope.Results.Courses = rslt.RS_7;\r\n //$scope.Results.QuestionsTotal = ($scope.Results.Questions.SubTopic.length + $scope.Results.Questions.Topic.length + $scope.Results.Questions.Chapter.length);\r\n $scope.Results.QuestionsTotal = $scope.Results.Questions.length;\r\n $scope.Results.PagesTotal = $scope.Results.Pages.length;\r\n $scope.Results.SubTopicsTotal = $scope.Results.SubTopics.length;\r\n $scope.Results.TopicsTotal = $scope.Results.Topics.length;\r\n $scope.Results.ChaptersTotal = $scope.Results.Chapters.length;\r\n $scope.Results.CoursesTotal = $scope.Results.Courses.length;\r\n $scope.Results.AllTotal = ($scope.Results.QuestionsTotal + $scope.Results.PagesTotal + $scope.Results.SubTopicsTotal + $scope.Results.TopicsTotal + $scope.Results.ChaptersTotal + $scope.Results.CoursesTotal);\r\n\r\n $scope.SearchWait = false;\r\n });\r\n }\r\n //$scope.GoSearch = function () {\r\n // $location.path('/search/' + $rootScope.ptflurp.SearchQueryTop);\r\n //}\r\n $scope.ExecuteSearch();\r\n }\r\n }\r\n});\r\napp.directive('mydashboardtabs', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/dashboard/mydashboardtabs.html',\r\n scope: {\r\n selectedtab: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $state, $stateParams, $filter, $location, $window) {\r\n $scope.User = $rootScope.User;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n //////console.log($scope.User)\r\n //////console.log($scope.UserRoles)\r\n $scope.UserSettings = $rootScope.UserSettings\r\n //////console.log($scope.UserSettings)\r\n angular.forEach($scope.UserRoles, function (role) {\r\n if (role.RoleID === '41') {\r\n $scope.UserAssignee = true;\r\n }\r\n if (role.RoleID === '39') {\r\n $scope.UserStudent = true;\r\n }\r\n });\r\n //////console.log($scope.UserAssignee)\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.User.UserName]).success(function (data) {\r\n $scope.assignAll = data.RS_0;\r\n $scope.assignComplete = data.RS_2;\r\n $scope.assignActive = data.RS_1;\r\n ////////console.log($scope.assignActive)\r\n $scope.assignFailed = data.RS_3;\r\n $scope.assignScheduled = data.RS_4;\r\n ////////console.log($scope.assignScheduled)\r\n $scope.TakeActiveAssign = function () {\r\n $location.path(\"/QuestionPool/\" + $scope.assignActive[0].CourseId + '/' + $scope.assignActive[0].ChapterId + '/' + $scope.assignActive[0].TopicId + '/' + $scope.assignActive[0].AssessmentId);\r\n }\r\n ////////console.log(data)\r\n $scope.assignData = [$scope.assignComplete.length, $scope.assignFailed.length, $scope.assignActive.length];\r\n $scope.assignLabels = [\"Complete\", \"Failed\", \"Active\"];\r\n $scope.assignLabs = [];\r\n $scope.assignOptions = {\r\n segmentShowStroke: false,\r\n responsive: true\r\n };\r\n ////////console.log(data)\r\n });\r\n $scope.UpdateUrl = function (idx) {\r\n switch (idx) {\r\n case 1:\r\n $location.url('/MyDashboard/Assets')\r\n break;\r\n case 2:\r\n $location.url('/MyDashboard/Activity')\r\n break;\r\n case 3:\r\n $location.url('/MyDashboard/CMEs')\r\n break;\r\n case 4:\r\n $location.url('/MyDashboard/Assignments')\r\n break;\r\n case 5:\r\n $location.url('/MyDashboard/Quick Quiz')\r\n break;\r\n case 6:\r\n $location.url('/MyDashboard/Profile')\r\n break;\r\n default:\r\n $location.url('/MyDashboard')\r\n break;\r\n }\r\n\r\n };\r\n $scope.LoadTab = function () {\r\n //////console.log($state.params.SelectedTab)\r\n switch ($scope.selectedtab) {\r\n case 'Assets':\r\n $scope.SelectedTabIndex = 1;\r\n break;\r\n case 'Activity':\r\n $scope.SelectedTabIndex = 2;\r\n break;\r\n case 'CMEs':\r\n $scope.SelectedTabIndex = 3;\r\n break;\r\n case 'Assignments':\r\n $scope.SelectedTabIndex = 4;\r\n break;\r\n case 'Quick Quiz':\r\n $scope.SelectedTabIndex = 5;\r\n break;\r\n case 'Home':\r\n $scope.SelectedTabIndex = 0;\r\n break;\r\n case 'Profile':\r\n $scope.SelectedTabIndex = 6;\r\n break;\r\n }\r\n };\r\n $scope.LoadTab();\r\n $scope.SaveSettings = function () {\r\n\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n swal\r\n ({\r\n title: \"Profile Settings Saved\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n });\r\n };\r\n }\r\n }\r\n});\r\napp.directive('mydashboardhome', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/dashboard/dashhome.html',\r\n scope: { },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n //////console.log($scope.UserRoles);\r\n //////console.log($scope.UserSettings.showSettingsAssignSummary);\r\n $scope.newGoalValue = 0;\r\n angular.forEach($scope.UserRoles, function (role) {\r\n if (role.RoleID === \"41\") {\r\n $scope.UserAssignee = true;\r\n }\r\n if (role.RoleID === '39') {\r\n $scope.UserStudent = true;\r\n }\r\n else {\r\n $scope.UserStudent = false;\r\n }\r\n });\r\n //////console.log($scope.UserAssignee)\r\n if ($scope.UserSettings.CountDown !== null) {\r\n angular.forEach($scope.UserSettings.CountDown, function (end) {\r\n end.endDate = new Date(end.endDate);\r\n });\r\n }\r\n $scope.endDatez = new Date();\r\n $scope.changeDate = function (thedate) {\r\n $scope.endDate = new Date(thedate)\r\n $scope.endDate = $filter('date')(thedate, 'yyyy-MM-dd');\r\n //////console.log($scope.endDate);\r\n }\r\n $scope.addCountDown = false;\r\n $scope.TodayDate = function () {\r\n var now = new Date();\r\n return $filter('date')(now, \"MMM dd, yyyy\")\r\n };\r\n $scope.unixTodayDate = Date.parse($scope.TodayDate());\r\n $http.post(\"/Execute/GetLastActivity\", [$scope.User.UserName]).success(function (dta) {\r\n $scope.InProgress = dta.RS_0\r\n $scope.Completed = dta.RS_1\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n ////////console.log($scope.InProgress)\r\n });\r\n $scope.ResumeAssessment = function (InProgress) {\r\n $location.path(\"/QuestionPool/\" + InProgress.Assessment_Id + \"/\" + InProgress.CourseId + \"/\" + InProgress.ChapterId + \"/\" + InProgress.TopicId + \"/Assessment\");\r\n }\r\n $scope.LoadSettings = function () {\r\n $http.post('/Execute/GetUserSettings', [$scope.User.UserId]).success(function (dat) {\r\n $scope.UserSettings = JSON.parse(dat.RS_0[0].Settings)\r\n if ($scope.UserSettings.CountDown !== null) {\r\n angular.forEach($scope.UserSettings.CountDown, function (end) {\r\n end.endDate = new Date(end.endDate);\r\n });\r\n }\r\n });\r\n };\r\n $http.post(\"/Execute/GetGlobalKPIbyUserWithCMEv2\", [$scope.User.UserName, CurrentUserTZoffsett]).success(function (data) {\r\n $scope.DataValues = data.RS_0[0];\r\n $scope.DataValues.ShowChildren = false;\r\n $scope.DataValues.PercentFloor = Math.floor($scope.DataValues.Percent);\r\n $scope.Courses = data.RS_1;\r\n $scope.CourseCount = $scope.Courses.length;\r\n angular.forEach($scope.Courses, function (crs, i) {\r\n crs.PercentFloor = Math.floor(1 * crs.Percent);\r\n });\r\n });\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.User.UserName]).success(function (data) {\r\n $scope.assignAll = data.RS_0;\r\n $scope.assignComplete = data.RS_2;\r\n $scope.assignActive = data.RS_1;\r\n ////////console.log($scope.assignActive)\r\n $scope.assignFailed = data.RS_3;\r\n $scope.assignScheduled = data.RS_4;\r\n ////////console.log($scope.assignScheduled)\r\n $scope.TakeActiveAssign = function () {\r\n $location.path(\"/QuestionPool/\" + $scope.assignActive[0].CourseId + '/' + $scope.assignActive[0].ChapterId + '/' + $scope.assignActive[0].TopicId + '/' + $scope.assignActive[0].AssessmentId);\r\n }\r\n ////////console.log(data)\r\n $scope.assignData = [$scope.assignComplete.length, $scope.assignFailed.length, $scope.assignActive.length];\r\n $scope.assignLabels = [\"Complete\", \"Failed\", \"Active\"];\r\n $scope.assignLabs = [];\r\n $scope.assignOptions = {\r\n segmentShowStroke: false,\r\n responsive: true\r\n };\r\n ////////console.log(data)\r\n });\r\n $http.post(\"/Execute/GetQuickQuizListForUser\", [$scope.User.UserName]).success(function (data) {\r\n $scope.QuickQuiz = data.RS_1;\r\n $scope.RightNow = new Date();\r\n $scope.QuickQuiz = $filter('orderBy')($scope.QuickQuiz, '-AssessmentName', false);\r\n $http.post(\"/Execute/GetCMETypes\").success(function (data) {\r\n $scope.CMETypes = data.RS_0;\r\n angular.forEach($scope.CMETypes, function (cmeAttributes) {\r\n $http.post(\"/Execute/GetCMEDataForClaims\", [$scope.User.UserName, CurrentUserTZoffsett, cmeAttributes.Id]).success(function (data) {\r\n ////////console.log(data)\r\n cmeAttributes.getCMEStats = data.RS_1[0];\r\n cmeAttributes.getCMEStats.totalUnclaimed = cmeAttributes.getCMEStats.EarnedHours - cmeAttributes.getCMEStats.ClaimedHours;\r\n $scope.cmeSelect = $scope.CMETypes[0];\r\n });\r\n });\r\n });\r\n $scope.QuickQuiz.highScore = 0;\r\n var highScoreFound = false;\r\n angular.forEach($scope.QuickQuiz, function (qq) {\r\n if (qq.Points > $scope.QuickQuiz.highScore || highScoreFound === false) {\r\n $scope.QuickQuiz.highScore = Math.round(qq.Points);\r\n highScoreFound = true;\r\n }\r\n qq.partialSeconds = parseFloat(qq.TimeToTake).toFixed(2).split(\".\")[1];\r\n $http.get(\"/api/Assessments(\" + qq.AssessmentId + \"L)\").success(function (data) {\r\n qq.Description = data.d.Description;\r\n });\r\n });\r\n var sum = 0;\r\n for (var i = 0, Available = 0, NotAvailable = 0; 4 >= i; i++) {\r\n if ($scope.QuickQuiz[i].Score === \"\") {\r\n Available++;\r\n }\r\n else {\r\n NotAvailable++\r\n sum += parseInt($scope.QuickQuiz[i].Rank, 10);\r\n }\r\n\r\n }\r\n $scope.QuickQuiz.Available = Available;\r\n $scope.QuickQuiz.RankAverage = Math.round(sum / NotAvailable);\r\n $scope.Goto = function (Exam) {\r\n var params = [$scope.User.UserName, Exam.CourseId, Exam.ChapterId, Exam.TopicId, Exam.SubTopicId, Exam.AssessmentId, CurrentUserTZoffsett]\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data.RS_0[0].UserAssessmentId);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n });\r\n $scope.updateCMEGoal = function (item, index) {\r\n $http.post('/Execute/GetCMEDataForClaims', [$scope.User.Username, CurrentUserTZoffsett, $scope.UserSettings.CMEGoals[index].CMEGoalType.Id]).success(function (data) {\r\n $scope.UserSettings.CMEGoals[index] = item;\r\n item.CMEGoalEarned = parseFloat(data.RS_1[0].EarnedHours);\r\n //////////console.log(item.CMEGoalEarned);\r\n $scope.UserSettings.CMEGoals[index].CMEGoalWidth = parseFloat(($scope.UserSettings.CMEGoals[index].CMEGoalEarned / $scope.UserSettings.CMEGoals[index].CMEGoalValue) * 100);\r\n $scope.SaveUserSettings();\r\n alert(\"\", \"Goal Updated\", \"success\", null, 1750, null);\r\n\r\n });\r\n };\r\n // CountDown \r\n $scope.removeCountdowns = function () {\r\n delete $scope.UserSettings.CountDown;\r\n delete $scope.UserSettings.CountDownView;\r\n $scope.SaveUserSettings();\r\n alert(\"\", \"CME Goals Erased\", \"success\", null, 1750, null);\r\n\r\n }\r\n $scope.DeleteAssessment = function (assessment) {\r\n swal({\r\n title: \"Are You Sure?\",\r\n text: \"You are about to delete an Assessment attempt.
This action CANNOT be undone.
Are you sure you want to delete and lose all progress for this attempt?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete Attempt\",\r\n closeOnConfirm: false,\r\n html: true\r\n },\r\n function () {\r\n $http.post(\"/Execute/DeleteUserAssessment\", [assessment.Id]).success(function (dta) {\r\n swal(\"Deleted!\", \"Assessment attempt successfully deleted.\", \"success\");\r\n $http.post(\"/Execute/GetLastActivity\", [$scope.User.UserName]).success(function (dtaa) {\r\n $scope.InProgress = dtaa.RS_0;\r\n $scope.Completed = dtaa.RS_1;\r\n $scope.Profile = dtaa.RS_2[0];\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n });\r\n });\r\n };\r\n $scope.removeCMEGoals = function () {\r\n delete $scope.Settings.CMEGoals;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserID, JSON.stringify($scope.Settings)]).success(function (data) {\r\n //$scope.EditCMEGoal1 = false;\r\n $scope.LoadSettings();\r\n ////////////console.log($scope.Settings)\r\n alert(\"\", \"CME Goals Erased\", \"success\", null, 1750, null);\r\n });\r\n }\r\n $scope.removeCountDown = function (index) {\r\n swal\r\n ({\r\n title: \"Remove Count Down?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes\",\r\n cancelButtonText: \"No\",\r\n closeOnConfirm: true,\r\n closeonCancel: true,\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.UserSettings.CountDown.splice(index, 1);\r\n $scope.SaveUserSettings();\r\n }\r\n else {\r\n swal(\"Count Down Removed!\", \"error\");\r\n }\r\n });\r\n\r\n $scope.LoadSettings();\r\n };\r\n $scope.addCountDowntoList = function (index) {\r\n if ($scope.UserSettings.CountDown == null) {\r\n $scope.UserSettings.CountDown = [];\r\n };\r\n $scope.goalsname = '';\r\n $scope.saved = false;\r\n }\r\n $scope.saveCountdown = function (index, endDate, goalName) {\r\n //////console.log(endDate)\r\n $scope.saved = true;\r\n //$scope.UserSettings.CountDown[index].goalName = $scope.goalsname;\r\n //endDate = new Date(endDate)\r\n //$scope.UserSettings.CountDown[index].endDate = endDate.toISOString().substring(0, 10);\r\n \r\n $scope.endDate = new Date(endDate)\r\n //$scope.endDate = $filter('date')($scope.endDate, 'yyyy-MM-dd');\r\n $scope.unixendDate = Date.parse(endDate)\r\n $scope.counter = $scope.unixendDate - $scope.unixTodayDate;\r\n $scope.goalName = goalName;\r\n //$scope.goalName = $scope.UserSettings.CountDown[index].goalName;\r\n //////console.log($scope.endDate)\r\n $scope.UserSettings.CountDown.push({\r\n endDate: $scope.endDate,\r\n unixendDate: $scope.unixendDate,\r\n saved: $scope.saved,\r\n counter: $scope.counter,\r\n goalName: $scope.goalName,\r\n CountView: false\r\n });\r\n $scope.SaveUserSettings();\r\n swal(\"\", \"Goal Updated\", \"success\", null, 1750, null);\r\n $scope.addCountDown = false;\r\n };\r\n\r\n $scope.ToggleCalender = function ($event, obj) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n obj.DateOpen = !obj.DateOpen;\r\n //obj.DateOpen = (obj.DateOpen == false);\r\n //////////console.log($scope.opened);\r\n };\r\n\r\n $scope.ToggleSettingsCount = function () {\r\n\r\n $scope.UserSettings.showSettingsCount = !$scope.UserSettings.showSettingsCount;\r\n ////////console.log($scope.UserSettings.showSettingsCount)\r\n $scope.SaveUserSettings();\r\n }\r\n $scope.duration = function (timeSpan) {\r\n timeSpan.countdown = timeSpan.unixendDate - $scope.unixTodayDate;\r\n var days = Math.floor(timeSpan.countdown / 86400000);\r\n var diff = timeSpan.countdown - days * 86400000;\r\n if (0 >= days) {\r\n days = 0;\r\n }\r\n return days;\r\n };\r\n $scope.updateCountdown = function (item, index) {\r\n //item[index].endDate\r\n $scope.UserSettings.CountDown[index].unixendDate = Date.parse($scope.UserSettings.CountDown[index].endDate)\r\n $scope.duration(item);\r\n $scope.SaveUserSettings();\r\n alert(\"\", \"Goal Updated\", \"success\", null, 1750, null);\r\n }\r\n $scope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n $scope.LoadSettings();\r\n });\r\n }\r\n $scope.removeCMEGoals = function () {\r\n delete $scope.UserSettings.CMEGoals;\r\n $scope.SaveUserSettings();\r\n alert(\"\", \"CME Goals Erased\", \"success\", null, 1750, null);\r\n };\r\n $scope.removeGoal = function (index) {\r\n swal\r\n ({\r\n title: \"Remove Goal?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes\",\r\n cancelButtonText: \"No\",\r\n closeOnConfirm: true,\r\n closeonCancel: true,\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.UserSettings.CMEGoals.splice(index, 1);\r\n $scope.SaveUserSettings();\r\n }\r\n else {\r\n swal(\"Goal Removed!\", \"error\");\r\n }\r\n });\r\n\r\n $scope.LoadSettings();\r\n };\r\n $scope.ToggleSettingsGoal = function () {\r\n $scope.UserSettings.showSettingsGoal = !$scope.UserSettings.showSettingsGoal;\r\n $scope.SaveUserSettings();\r\n };\r\n \r\n $scope.updateCMEGoal = function (item, index) {\r\n $http.post('/Execute/GetCMEDataForClaims', [$scope.User.Username, CurrentUserTZoffsett, $scope.UserSettings.CMEGoals[index].CMEGoalType.Id]).success(function (data) {\r\n $scope.UserSettings.CMEGoals[index] = item;\r\n item.CMEGoalEarned = parseFloat(data.RS_1[0].EarnedHours);\r\n $scope.UserSettings.CMEGoals[index].CMEGoalWidth = parseFloat(($scope.UserSettings.CMEGoals[index].CMEGoalEarned / $scope.UserSettings.CMEGoals[index].CMEGoalValue) * 100);\r\n $scope.SaveUserSettings();\r\n swal(\"\", \"Goal Updated\", \"success\", null, 1750, null);\r\n });\r\n };\r\n $scope.removeCMEGoals = function () {\r\n delete $scope.UserSettings.CMEGoals;\r\n $scope.SaveUserSettings();\r\n swal(\"\", \"CME Goals Erased\", \"success\", null, 1750, null);\r\n\r\n }\r\n $scope.removeGoal = function (index) {\r\n swal\r\n ({\r\n title: \"Remove Goal?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Yes\",\r\n cancelButtonText: \"No\",\r\n closeOnConfirm: true,\r\n closeonCancel: true,\r\n },\r\n function (isConfirm) {\r\n if (isConfirm) {\r\n $scope.UserSettings.CMEGoals.splice(index, 1);\r\n $scope.SaveUserSettings();\r\n }\r\n else {\r\n swal(\"Goal Removed!\", \"error\");\r\n }\r\n });\r\n\r\n $scope.LoadSettings();\r\n };\r\n $scope.ToggleSettingsGoal = function () {\r\n $scope.UserSettings.showSettingsGoal = !$scope.UserSettings.showSettingsGoal;\r\n $scope.SaveUserSettings();\r\n };\r\n $scope.addGoaltoList = function (index, newGoalType, newGoalValue) {\r\n //////console.log($scope.User);\r\n //////console.log(newGoalType)\r\n //////console.log(newGoalValue)\r\n $http.post('/Execute/GetCMEDataForClaims', [$scope.User.UserName, CurrentUserTZoffsett, newGoalType.Id]).success(function (data) {\r\n if ($scope.UserSettings.CMEGoals == null) {\r\n $scope.UserSettings.CMEGoals = [];\r\n };\r\n $scope.UserSettings.CMEGoals[index] = [];\r\n $scope.CMEGoalEarned = parseFloat(data.RS_1[0].EarnedHours);\r\n $scope.CMEGoalWidth = parseFloat(($scope.CMEGoalEarned / newGoalValue) * 100);\r\n $scope.UserSettings.CMEGoals.push({\r\n CMEGoalValue: newGoalValue,\r\n CMEGoalEarned: $scope.CMEGoalEarned,\r\n CMEGoalWidth: $scope.CMEGoalWidth,\r\n CMEGoalType: newGoalType,\r\n });\r\n $scope.UserSettings.showSettingsCount = true;\r\n $scope.SaveUserSettings();\r\n alert(\"\", \"Goal Saved\", \"success\", null, 1750, null);\r\n $scope.newGoalValue = '';\r\n $scope.newGoalType = [];\r\n $scope.CMEGoalWidth = '';\r\n $scope.CMEGoalEarned = '';\r\n });\r\n\r\n return false;\r\n }\r\n }\r\n };\r\n});\r\napp.directive('cmetree', function ($parse, $http, $compile, $uibModal, App) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/dashboard/CmeTree.htm',\r\n scope: {\r\n showCourses: '='\r\n },\r\n controller: function ($scope, $http, $uibModal, $rootScope, ngIntroService) {\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

My Assets

\" +\r\n \"

This utility lists all of the Med-Challenger content that you have access to.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#assets-store-link',\r\n intro: \"

Go To Store

\" +\r\n \"

Add more content to your account by purchasing access in the Med-Challenger store.

\"\r\n },\r\n {\r\n element: '#assets-list-controls',\r\n intro: \"

List Controls

\" +\r\n \"

These tools allow you to filter and sort your list of assets.

\"\r\n },\r\n {\r\n element: '#assets-text-filter',\r\n intro: \"

Text Filter

\" +\r\n \"

Show only assets which contain the value entered here.

\"\r\n },\r\n {\r\n element: '#predicate',\r\n intro: \"

Sort Method

\" +\r\n \"

Sort by asset name or CME completion.

\"\r\n },\r\n {\r\n element: '#predicate-direction',\r\n intro: \"

Sort Direction

\" +\r\n \"

Choose whether to sort ascending (A-Z / 0-100%) or descending (Z-A / 100-0%).

\"\r\n },\r\n {\r\n element: '#asset-0',\r\n intro: \"

Asset List

\" +\r\n \"

Each asset is listed with some utility buttons, and completion info.

\"\r\n },\r\n {\r\n element: '#asset-0 .asset-buttons',\r\n intro: \"

Asset Utility Buttons

\" +\r\n \"

Study
Go to Sims&Topics for this asset.

\" +\r\n \"

Earn CME
Go to CME topics for this asset.

\" +\r\n \"

Trial Expired
Your trial of the asset has expired. Click to purchase.

\" +\r\n \"

Requires Premium
Asset is disabled due to expired premium status. Click to renew.

\"\r\n },\r\n {\r\n element: '#asset-0 .asset-completion',\r\n intro: \"

Asset CME Completion

\" +\r\n \"

Shows how many CME assessments you've completed from this asset during the current calendar year.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the My Assets tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n //$scope.LoadSettings();\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n $scope.DismissHelp = function(){\r\n $scope.UserSettings.HelpAssets_Hide = 'True';\r\n $scope.SaveUserSettings();\r\n }\r\n $scope.AssetWait = true;\r\n $scope.ShowCourses = function () {\r\n $scope.DataValues.ShowChildren = ($scope.DataValues.ShowChildren == false);\r\n }\r\n $scope.assetfilter = {};\r\n $scope.assetfilter.textFilter = '';\r\n $scope.assetfilter.Predicate = 'CourseName';\r\n $scope.assetfilter.Reverse = false;\r\n\r\n //////console.log($scope.User)\r\n $scope.DrillDownCourse = function (course) {\r\n $uibModal.open({\r\n animation: true,\r\n templateUrl: 'app/pages/dashboard/chaptercme-modal.htm',\r\n //backdrop: \"static\",\r\n size: 'xlg',\r\n controller: function ($scope, $http, $rootScope, items) {\r\n $scope.User = $rootScope.User;\r\n //////console.log($scope.User)\r\n $scope.Course = items.Course;\r\n \r\n $scope.Goto = function (Assessment) {\r\n window.location.href = \"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\";\r\n }\r\n $scope.ToggleTopics = function (Chapter) {\r\n ////////////////console.log(\"Here.....\")\r\n Chapter.ShowChildren = (Chapter.ShowChildren == false);\r\n if (Chapter.Topics == null) {\r\n $http.post(\"/Execute/GetChapterKPIbyUserWithCMEv2\", [$scope.User.UserName, $scope.Course.CourseId, Chapter.ChapterId, CurrentUserTZoffsett]).success(function (data) {\r\n Chapter.Topics = data.RS_0;\r\n angular.forEach(Chapter.Topics, function (Topic) {\r\n Topic.ShowChildren = false;\r\n Topic.PercentFloor = Math.floor(Topic.Percent);\r\n });\r\n });\r\n }\r\n }\r\n $scope.ToggleAssessments = function (Topic) {\r\n Topic.ShowChildren = (Topic.ShowChildren == false);\r\n if (Topic.Assessments == null) {\r\n ////////////////console.log([$scope.UserName, $scope.Course.CourseId, Topic.ChapterId, Topic.TopicId, CurrentUserTZoffsett]);\r\n $http.post(\"/Execute/GetTopicKPIbyUserWithCMEv2\", [$scope.User.UserName, $scope.Course.CourseId, Topic.ChapterId, Topic.TopicId, CurrentUserTZoffsett]).success(function (data) {\r\n Topic.Assessments = data.RS_0;\r\n angular.forEach(Topic.Assessments, function (Assessment) {\r\n if (Assessment.FirstPassingDate) {\r\n Assessment.FirstPassingDate = new Date(FirstPassingDate + \" UTC\");\r\n }\r\n });\r\n });\r\n }\r\n }\r\n //$http.post(\"/Execute/GetUserProgressByCourseForAstor2\", [$scope.UserName, $scope.Course.CourseId, 2]).success(function (data) {\r\n $http.post(\"/Execute/GetUserBoardSimProgress\", [$scope.User.UserName, $scope.Course.CourseId]).success(function (data) {\r\n $scope.SimValues = data.RS_0;\r\n //////console.log($scope.SimValues);\r\n angular.forEach($scope.SimValues, function (sv, i) {\r\n sv.TopicId = sv.SubTopicId = 0;\r\n sv.CourseId = $scope.Course.CourseId;\r\n sv.ExactPercentage = 1 * sv.PercentComplete;\r\n sv.PercentComplete = Math.floor(sv.PercentComplete);\r\n sv.TotalAssessments = (1 * sv.TotalAssessments);\r\n sv.OriginalOrder = i;\r\n\r\n });\r\n });\r\n $http.post(\"/Execute/GetCourseKPIbyUserWithCMEv2\", [$scope.User.UserName, $scope.Course.CourseId, CurrentUserTZoffsett]).success(function (data) {\r\n $scope.Chapters = data.RS_0;\r\n angular.forEach($scope.Chapters, function (Chapter) {\r\n Chapter.ShowChildren = false;\r\n Chapter.PercentFloor = Math.floor(Chapter.Percent);\r\n });\r\n });\r\n },\r\n resolve: { items: function () { return { Course: course, username: $scope.User.UserName } } }\r\n });\r\n }\r\n\r\n $http.post(\"/Execute/GetGlobalKPIbyUserWithCMEv2\", [$scope.User.UserName, CurrentUserTZoffsett]).success(function (data) {\r\n $scope.DataValues = data.RS_0[0];\r\n $scope.DataValues.ShowChildren = false;\r\n $scope.DataValues.PercentFloor = Math.floor($scope.DataValues.Percent);\r\n $scope.Courses = data.RS_1;\r\n //////console.log(data)\r\n $scope.CourseCount = $scope.Courses.length;\r\n angular.forEach($scope.Courses, function (crs, i) {\r\n crs.PercentFloor = Math.floor(1 * crs.Percent);\r\n if(crs.cmefree=='True'){\r\n crs.FullCourseInfo = jQuery.grep(Globals.FreeCmeCourses, function(fc) {\r\n return fc.CourseId == crs.CourseId;\r\n })[0]\r\n } else {\r\n crs.FullCourseInfo = false;\r\n }\r\n console.log(crs.FullCourseInfo)\r\n });\r\n $scope.AssetWait = false;\r\n });\r\n\r\n $http.post(\"/Execute/GetUserCourses\", [$scope.User.UserName]).success(function (data) {\r\n $scope.UserCourses = data.RS_0;\r\n $scope.ExpiredTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"True\" && e.IsTrial == \"1\");\r\n })\r\n $scope.ActiveTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"False\" && e.IsTrial==\"1\");\r\n })\r\n $scope.IsExpiredTrial = function(id) {\r\n var find = jQuery.grep($scope.ExpiredTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.IsActiveTrial = function(id) {\r\n var find = jQuery.grep($scope.ActiveTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n $scope.TrialExpires = function(id) {\r\n var course = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.Id == id.toString);\r\n });\r\n return course.Expires;\r\n }\r\n ////console.log($scope.ExpiredTrials)\r\n });\r\n\r\n\r\n $scope.NavtoCourse = function (Course) {\r\n // Legacy function -- kill?\r\n window.location.href = \"/Courses.aspx?courseid=\" + Course.CourseId;\r\n }\r\n $scope.ModalExamClicky = function (Course, score) {\r\n if (score == 100) {\r\n alert(\"This will go to asmtdet\")\r\n } else {\r\n $scope.NavtoCourse(Course)\r\n }\r\n }\r\n },\r\n link: function (scope, element, attrs) {\r\n scope.element = element[0]\r\n scope.$watch('DataValues', function () {\r\n //if (element[0]) {\r\n // element[0].html(\"
CME Tree for {{UserName}}
\");\r\n // //$compile(scope.element.contents())(scope);\r\n //}\r\n });\r\n }\r\n }\r\n});\r\napp.directive('activitytab', function ($parse, $http, $compile, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/dashboard/activityTab.html',\r\n scope: {},\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, $location) {\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n $scope.completedPageSize = \"5\";\r\n $scope.completedCurrentPage = 1;\r\n $http.post(\"/Execute/GetAssessmentActivity\", [$scope.User.UserName, $scope.completedCurrentPage, $scope.completedPageSize]).success(function (dta) {\r\n $scope.activityPageInfo = dta.RS_2[0];\r\n $scope.InProgress = dta.RS_0;\r\n $scope.Completed = dta.RS_1;\r\n //////console.log($scope.Completed)\r\n //////console.log($scope.InProgress);\r\n $scope.Profile = dta.RS_3[0];\r\n //////////console.log($scope.Profile)\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.UserRoles, function (getAssTab) {\r\n if (getAssTab == 'Assignee') {\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.UserName]).success(function (data) {\r\n //////////console.log(data)\r\n $scope.AssignActiveStatus = data.RS_1;\r\n });\r\n };\r\n });\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n $scope.updateActivityPage = function (pagesz, page) {\r\n $scope.completedCurrentPage = page;\r\n $scope.updateActivity(pagesz);\r\n }\r\n $scope.ResumeAssessment = function (InProgress) {\r\n $location.path(\"/QuestionPool/\" + InProgress.Assessment_Id + \"/\" + InProgress.CourseId + \"/\" + InProgress.ChapterId + \"/\" + InProgress.TopicId + \"/Assessment\");\r\n }\r\n $scope.ViewPrescription = function (Completed) {\r\n //console.log(Completed)\r\n $location.path(\"/prescription/\" + Completed.Id);\r\n }\r\n $scope.DeleteAssessment = function (assessment) {\r\n swal({\r\n title: \"Are You Sure?\",\r\n text: \"You are about to delete an Assessment attempt.
This action CANNOT be undone.
Are you sure you want to delete and lose all progress for this attempt?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonText: \"Delete Attempt\",\r\n closeOnConfirm: false,\r\n html: true\r\n },\r\n function () {\r\n $http.post(\"/Execute/DeleteUserAssessment\", [assessment.Id]).success(function (dta) {\r\n swal(\"Deleted!\", \"Assessment attempt successfully deleted.\", \"success\");\r\n $http.post(\"/Execute/GetLastActivity\", [$scope.User.UserName]).success(function (dtaa) {\r\n $scope.InProgress = dtaa.RS_0;\r\n $scope.Completed = dtaa.RS_1;\r\n $scope.Profile = dtaa.RS_2[0];\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n });\r\n });\r\n };\r\n $scope.updateActivity = function (pagesz) {\r\n $scope.completedPageSize = pagesz;\r\n ////////console.log('updateActivity()');\r\n $http.post(\"/Execute/GetAssessmentActivity\", [$scope.User.UserName, $scope.completedCurrentPage, $scope.completedPageSize]).success(function (dtaa) {\r\n $scope.activityPageInfo = dtaa.RS_2[0];\r\n if ($scope.completedCurrentPage > 1 * $scope.activityPageInfo.TotalPages) {\r\n $scope.updateActivityPage($scope.completedPageSize, 1 * $scope.activityPageInfo.TotalPages);\r\n }\r\n $scope.InProgress = dtaa.RS_0;\r\n $scope.Completed = dtaa.RS_1;\r\n //////////console.log($scope.Completed);\r\n $scope.Profile = dtaa.RS_3[0];\r\n //////////console.log($scope.Profile)\r\n $scope.Profile.CreatedOnDate = new Date($scope.Profile.CreatedOnDate + \" UTC\");\r\n $scope.Profile.LastActivityDate = new Date($scope.Profile.LastActivityDate + \" UTC\");\r\n $scope.Profile.LastAssessmentDate = new Date($scope.Profile.LastAssessmentDate + \" UTC\");\r\n angular.forEach($scope.UserRoles, function (getAssTab) {\r\n if (getAssTab == 'Assignee') {\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.User.UserName]).success(function (data) {\r\n //////////console.log(data)\r\n $scope.AssignActiveStatus = data.RS_1;\r\n });\r\n };\r\n });\r\n\r\n angular.forEach($scope.InProgress, function (ass) {\r\n ass.StartDateTime = new Date(ass.StartDateTime + \" UTC\");\r\n });\r\n angular.forEach($scope.Completed, function (ass) {\r\n ass.EndDateTime = new Date(ass.EndDateTime + \" UTC\");\r\n });\r\n });\r\n }\r\n }\r\n }\r\n});\r\napp.directive('cmeapproval', function ($parse, $http, $compile, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/ApproveCME.htm',\r\n scope: {},\r\n controller: function ($scope, $http, $filter) {\r\n $http.post(\"/Execute/GetUnapprovedCME\").success(function (data) {\r\n $scope.Pending = data.RS_0;\r\n //angular.forEach($scope.Pending, function (p) {\r\n // p.ClaimDate = new Date(p.ClaimDate)\r\n // p.ClaimDate = p.ClaimDate.getTime() - (p.ClaimDate.getTimezoneOffset() * 60000)\r\n //})\r\n //console.log($scope.Pending)\r\n });\r\n $scope.Approve = function (claimId) {\r\n ////console.log(claimId)\r\n ////console.log(CurrentUserTZoffsett)\r\n $http.post(\"/Execute/ApproveCME\", [claimId, CurrentUserTZoffsett]).success(function (res) {\r\n $http.post(\"/Execute/GetUnapprovedCME\").success(function (data) {\r\n $scope.Pending = data.RS_0;\r\n \r\n });\r\n });\r\n }\r\n $scope.Reject = function (claimId) {\r\n var mi = $uibModal.open({\r\n templateUrl: 'app/tpls/RejectCME.htm',\r\n windowClass: 'confirm',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, items) {\r\n $scope.Reason = \"\";\r\n $scope.ClaimId = items.ClaimId;\r\n $scope.cancel = function () {\r\n mi.close(false);\r\n }\r\n $scope.commit = function () {\r\n if ($scope.Reason.length > 0) {\r\n $http.post(\"/Execute/RejectCMERequest\", [$scope.ClaimId, $scope.Reason]).success(function (data) {\r\n mi.close(true);\r\n });\r\n } else {\r\n alert(\"You Must Give a Reason\")\r\n }\r\n }\r\n },\r\n resolve: { items: function () { return { ClaimId: claimId } } }\r\n });\r\n mi.result.then(function (reload) {\r\n if (reload) {\r\n $http.post(\"/Execute/GetUnapprovedCME\").success(function (data) {\r\n $scope.Pending = data.RS_0;\r\n //angular.forEach($scope.Pending, function (p) {\r\n // p.ClaimDate = new Date(p.ClaimDate)\r\n // p.ClaimDate = p.ClaimDate.getTime() - (p.ClaimDate.getTimezoneOffset() * 60000)\r\n //})\r\n });\r\n }\r\n });\r\n }\r\n $scope.ViewEditForm = function (item) {\r\n ////////console.log(item.FormId);\r\n ////////console.log(\"/AdHocForm/CMESurvey/\" + item.FormId);\r\n var mi = $uibModal.open({\r\n templateUrl: ((item.CMETypeId == \"5\") ? 'app/pages/dashboard/CMESurveyABP.htm' : 'app/pages/dashboard/CMESurvey.htm'),\r\n windowClass: 'assign-modal',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, items) {\r\n function IsValid() { }\r\n $scope.User = items.User;\r\n $scope.ClaimId = items.ClaimId;\r\n $http.get(\"/AdHocForm/CMESurvey/\" + items.FormId).success(function (res) {\r\n ////////console.log(res.FormData)\r\n angular.forEach($scope.FormData.Questions, function (Q, idx) {\r\n if (res.FormData.Questions[idx]) {\r\n if (res.FormData.Questions[idx].Answer) {\r\n if (Q.Type == \"Multi\") {\r\n angular.forEach(Q.Answers, function (A, i) {\r\n if (res.FormData.Questions[idx].Answers[i]) {\r\n A.selected = res.FormData.Questions[idx].Answers[i].selected\r\n }\r\n })\r\n }\r\n else if (Q.Type == \"Number\") {\r\n Q.Answer = parseFloat(res.FormData.Questions[idx].Answer);\r\n }\r\n else if (Q.Type == 'Birthdate') {\r\n ////console.log(Q.Answer);\r\n ////console.log(Q.Answers)\r\n Q.Answer = new Date(res.FormData.Questions[idx].Answer)\r\n }\r\n else {\r\n ////////console.log(res.FormData.Questions[idx].Answer);\r\n Q.Answer = res.FormData.Questions[idx].Answer;\r\n }\r\n }\r\n }\r\n });\r\n });\r\n $scope.cancel = function () {\r\n mi.close();\r\n };\r\n $scope.SubmitSurvey = function () {\r\n $scope.Wait = true;\r\n $http.put(\"/AdHocForm/CMESurvey/\" + item.FormId, { FormData: $scope.FormData }).success(function (res) {\r\n mi.close(res);\r\n });\r\n };\r\n },\r\n resolve: { items: function () { return { User: item, ClaimId: item.ClaimId, FormId: item.FormId } } }\r\n });\r\n //});\r\n }\r\n }\r\n }\r\n});\r\napp.directive('retirecourses', function ($parse, $http, $compile, $uibModal, $window, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/retirecourses.htm',\r\n scope: {},\r\n controller: function ($scope, $http, $filter) {\r\n //function dump(arr, level) {\r\n // var dumped_text = \"\";\r\n // if (!level) level = 0;\r\n // var level_padding = \"\";\r\n // for (var j = 0; j < level + 1; j++) level_padding += \" \";\r\n\r\n // if (typeof (arr) == 'object') {\r\n // for (var item in arr) {\r\n // var value = arr[item];\r\n\r\n // if (typeof (value) == 'object') {\r\n // dumped_text += level_padding + \"'\" + item + \"' ...\\n\";\r\n // dumped_text += dump(value, level + 1);\r\n // } else {\r\n // dumped_text += level_padding + \"'\" + item + \"' => \\\"\" + value + \"\\\"\\n\";\r\n // }\r\n // }\r\n // } else {\r\n // dumped_text = \"===>\" + arr + \"<===(\" + typeof (arr) + \")\";\r\n // }\r\n // return dumped_text;\r\n //}\r\n $scope.SaveRetired = function (cur) {\r\n ////console.log(cur.Id)\r\n ////console.log(cur.Expires)\r\n $http.post(\"/Execute/SetCourseExpiration\", [cur.Id, cur.Expired]).success(function (data) {\r\n $scope.SaveExpire = data;\r\n alert('Saved')\r\n })\r\n\r\n }\r\n $scope.ChangeDate = function (date) {\r\n date = new Date(date);\r\n }\r\n $scope.loadCurricula = function () {\r\n $http.get(\"/api/Courses\").success(function (data) {\r\n ////console.log(data)\r\n $scope.Curricula = data.d;\r\n angular.forEach($scope.Curricula, function (cur) {\r\n if (cur.Expires != null) {\r\n cur.Expires = cur.Expires.replace(/\\/Date\\(|\\)\\//g, '');\r\n cur.Expires = $filter('date')(cur.Expires, 'yyyy-MM-dd')\r\n cur.Expired = new Date(cur.Expires)\r\n }\r\n //cur.Expires = parseInt(cur.Expires)\r\n })\r\n \r\n //$(\"#CurriculaContainer\").html(\"
RetiredCourse Description
\");\r\n //$.each($scope.Curricula, function (idx, cur) {\r\n // if (cur.IsRetired) {\r\n // $(\"#tblCurr\").append(\"\" + cur.Name + \"\");\r\n // }\r\n // else {\r\n // $(\"#tblCurr\").append(\"\" + cur.Name + \"\");\r\n // }\r\n\r\n //});\r\n });\r\n }\r\n $scope.loadCurricula()\r\n \r\n }\r\n }\r\n});\r\napp.directive('cmeclaim', function ($parse, $http, $compile, $uibModal, $window, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/cmes/CmeAutomate.htm',\r\n scope: {},\r\n controller: function ($scope, $http, $filter, ngIntroService) {\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Claim CME

\" +\r\n \"

The Claim CME tool is where you'll come to redeem all of the CME credits you've earned, and view credits you've already claimed. Once you select and claim CME credits, you'll be provided with a convenient PDF certificate to save or print.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#cme-type',\r\n intro: \"

CME Type

\" +\r\n \"

Choose which type of CME credits to display

\"\r\n },\r\n {\r\n element: '#tab-unclaimed',\r\n intro: \"

Unclaimed CME

\" +\r\n \"

CME credits you've earned but not yet claimed

\"\r\n },\r\n {\r\n element: '#tab-claimed',\r\n intro: \"

Claimed CME

\" +\r\n \"

A history of your previously claimed CME credits

\"\r\n },\r\n {\r\n element: '#text-filter',\r\n intro: \"

Text Filter

\" +\r\n \"

Enter a search term to filter the unclaimed CME list (e.g. \\\"Family Medicine\\\" or \\\"Immunizations\\\")

\"\r\n },\r\n {\r\n element: '#year-filter',\r\n intro: \"

Year Filter

\" +\r\n \"

Show only unclaimed CME from the selected year

\"\r\n },\r\n {\r\n element: '#unclaimed-cme-head',\r\n intro: \"

Sorting

\" +\r\n \"

You can sort the list of unclaimed CME credits by clicking or tapping on a column heading. Click it again to toggle the sort direction (ascending/descending)

\"\r\n },\r\n {\r\n element: '#cme-select-0',\r\n intro: \"

Select CME

\" +\r\n \"

Check the box next to each CME credit you'd like to claim, and then press the \\\"Claim Credits\\\" button

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Claim CME tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.CanClaim = function() {\r\n if (($scope.CMEType.Id==10&&$scope.CMEType.SelectedTotal>20) || $scope.CMEType.SelectedTotal==0 || !$scope.User.MayClaimCME || (!$scope.User.Profile.Degree) || (!$scope.User.Profile.Specialty) || (!$scope.User.Profile.Street) || (!$scope.User.Profile.City) || (!$scope.User.Profile.Region) || (!$scope.User.Profile.PostalCode)) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n $scope.RequiredSubscriptions = Globals.RequiredSubscriptions();\r\n //console.log($scope.RequiredSubscriptions)\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n $scope.CMEType = [];\r\n $scope.CMEType.Id = \"1\";\r\n $scope.CMEType.Name = \"AMA Category 1\";\r\n $scope.CMEType.Description = \"American Medical Association\";\r\n $scope.IsMobile = window.innerWidth;\r\n $scope.Loading = false;\r\n $scope.Purchases = [];\r\n $scope.OwnedSubs = [];\r\n // Populate purchases and subscription IDs arrays\r\n $http.post('/Execute/GetUserProductPurchases', [$scope.User.UserId]).success(function(data){\r\n $scope.Purchases = data.RS_0;\r\n angular.forEach($scope.Purchases, function(p){\r\n $scope.OwnedSubs.push(1*p.ProductId);\r\n });\r\n //console.log($scope.Purchases);\r\n //console.log($scope.OwnedSubs);\r\n });\r\n $scope.SelectAllUnclaimedClicked = function (t, lst, val) {\r\n t.SelectedTotal = 0.0;\r\n ////console.log(t.Unclaimed)\r\n ////console.log(lst)\r\n ////console.log(val)\r\n var unclaimed = [];\r\n if (lst != []) {\r\n unclaimed = lst\r\n }\r\n if (lst == '') {\r\n unclaimed = t.Unclaimed\r\n }\r\n ////console.log(unclaimed)\r\n angular.forEach(unclaimed, function (i) {\r\n if(i.cmefree!='True' && !$scope.User.MayClaimCME) {\r\n return false;\r\n }\r\n i.EarnedSelected = 0.0;\r\n //////////console.log(i)\r\n if (i.IsTrial == \"0\") {\r\n i.Selected = (t.SelectAllUnclaimed);\r\n\r\n if (t.SelectAllUnclaimed == true) {\r\n i.EarnedSelected = i.EarnedSelected + parseFloat(i.EarnedHours);\r\n t.SelectedTotal += parseFloat(i.EarnedHours);\r\n }\r\n else {\r\n i.EarnedSelected = 0.0;\r\n i.Selected = t.SelectAllUnclaimed;\r\n }\r\n }\r\n else {\r\n i.Selected = false;\r\n i.EarnedSelected = 0.0;\r\n }\r\n })\r\n };\r\n ////console.log(CurrentUserTZoffsett)\r\n var now = new Date();\r\n $scope.yearsearch = {};\r\n $scope.yearsearch.FirstPassingDate = 'All';\r\n $scope.cmeYears = ['All',now.getFullYear()];\r\n for (i = 1; i <= 10; i++) {\r\n $scope.cmeYears.push(now.getFullYear() - i)\r\n };\r\n $scope.ItemClicked = function (t, itm, val) {\r\n //console.log(\"ItemClicked()\")\r\n if(itm.cmefree!='True' && !$scope.User.MayClaimCME && itm.CourseId!='1106') {\r\n return false;\r\n }\r\n itm.Selected = !val;\r\n t.SelectedTotal = 0.0;\r\n var allSelected = true;\r\n angular.forEach(t.Unclaimed, function (i) {\r\n i.EarnedSelected = 0.0;\r\n if (i.Selected == false) {\r\n i.EarnedSelected = 0.0;\r\n allSelected = false;\r\n } else {\r\n i.EarnedSelected = i.EarnedSelected + parseFloat(i.EarnedHours)\r\n t.SelectedTotal += parseFloat(i.EarnedHours);\r\n }\r\n });\r\n t.SelectAllUnclaimed = allSelected;\r\n console.log(itm)\r\n }\r\n $scope.CertOnlyError = false;\r\n //$scope.$watch('CMEType', function (typ) {\r\n $scope.CMEChange = function (typ) {\r\n \r\n $http.post(\"/Execute/GetCMETypes\").success(function (data) {\r\n $scope.CMETypes = data.RS_0;\r\n $scope.Loading = true;\r\n var tomorrow = new Date();\r\n tomorrow.setDate(tomorrow.getDate() + 1);\r\n var dt = new Date()\r\n //dt.setDate(dt.getDate() + 1);\r\n var m = dt.getMonth() + 1\r\n var d = dt.getDate()\r\n var y = dt.getFullYear()\r\n $http.post('/Execute/GetCMEDataForClaims', [$scope.User.UserName, CurrentUserTZoffsett, $scope.CMEType.Id]).success(function (data) {\r\n typ.SelectAllUnclaimed = false;\r\n typ.SelectedTotal = 0.0;\r\n typ.Claimed = data.RS_3;\r\n angular.forEach(typ.Claimed, function (c) {\r\n c.ClaimDate = new Date(c.ClaimDate + \" UTC\")\r\n })\r\n typ.Available = data.RS_1[0].Available;\r\n typ.ClaimedHours = data.RS_1[0].ClaimedHours;\r\n typ.Earned = data.RS_1[0].EarnedHours;\r\n //////////console.log(typ.Earned);\r\n typ.Unclaimed = data.RS_0;\r\n //////console.log(data.RS_0);\r\n typ.Courses = data.RS_2;\r\n typ.TotalEarnedHours = 0.0;\r\n angular.forEach(typ.Claimed, function (i) {\r\n i.ClaimDate = new Date(i.ClaimDate)\r\n //i.ClaimDate = i.ClaimDate.setHours(CurrentUserTZoffsett)\r\n });\r\n console.log(typ.Unclaimed)\r\n angular.forEach(typ.Unclaimed, function (i) {\r\n //i.EarnedHoursInt = parseFloat(i.EarnedHours)\r\n i.AssessmentName = i.AssessmentName.replace(/Q & A<\\/b>: |Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A: |Q & A /g, \"\");\r\n i.TotalEarned = 0.0;\r\n i.EarnedHoursFloat = parseFloat(i.EarnedHours)\r\n if (i.EarnedHoursFloat >= 1) {\r\n i.TotalEarned = i.TotalEarned + i.EarnedHoursFloat;\r\n typ.TotalEarnedHours += parseFloat(i.TotalEarned)\r\n };\r\n i.Selected = false;\r\n //i.freecme = ();\r\n //i.IsTrial=\"1\";//DO NOT FORGET TO COMMENT THIS OUT OMFG IT WILL BREAK CME CLAIMS COMPLETELY!!!!!!!\r\n i.Products = JSON.parse(i.Products);\r\n //////////console.log(i.Products)\r\n i.CompleteDate = new Date(i.FirstPassingDate)\r\n angular.forEach(typ.Courses, function (c) {\r\n if (!c.Unclaimed) { c.Unclaimed = []; }\r\n if (c.CourseId == i.CourseId) {\r\n c.Unclaimed.push(i);\r\n }\r\n });\r\n //////////console.log(typ.TotalEarnedHours);\r\n });\r\n angular.forEach(typ.Unclaimed, function (i) {\r\n i.EarnedSelected = 0.0;\r\n if (i.Selected == true) {\r\n i.EarnedSelected = i.EarnedSelected + parseFloat(i.EarnedHours);\r\n typ.SelectedTotal += parseFloat(i.EarnedHours);\r\n }\r\n //console.log($scope.RequiredSubscriptions)\r\n var cheqReq = jQuery.grep($scope.RequiredSubscriptions, function(n,j){\r\n return n.cid == i.CourseId;\r\n })\r\n if(cheqReq.length){\r\n /*angular.forEach($scope.OwnedSubs, function(sub){\r\n if(cheqReq[0].pids.includes(sub)) {\r\n ////console.log(\"IF FALSE\")\r\n i.NeedFullProduct = false;\r\n }else{\r\n i.NeedFullProduct = true;\r\n $scope.CertOnlyError = true;\r\n }\r\n })*/\r\n var pidsy = cheqReq[0].pids;\r\n var subsy = $scope.OwnedSubs;\r\n var sect = intersect_safe(pidsy,subsy);\r\n //console.log(sect)\r\n //console.log($scope.OwnedSubs)\r\n\r\n if(sect.length){\r\n i.NeedFullProduct=false;\r\n }else{\r\n i.NeedFullProduct=true;\r\n $scope.CertOnlyError=true;\r\n }\r\n\r\n /*angular.forEach(cheqReq[0].pids, function(pid){\r\n if($scope.OwnedSubs.includes(pid)) {\r\n i.NeedFullProduct = false;\r\n }else{\r\n i.NeedFullProduct = true;\r\n $scope.CertOnlyError = true;\r\n }\r\n })*/\r\n }else{\r\n ////console.log(\"ELSE FALSE\")\r\n ////console.log(cheqReq)\r\n i.NeedFullProduct = false;\r\n }\r\n\r\n });\r\n ////////////console.log(typ.Courses);\r\n $scope.Loading = false;\r\n });\r\n\r\n });\r\n \r\n };\r\n $scope.LoadCME = function (c) {\r\n $scope.CMEType.Id = c.Id;\r\n ////////console.log($scope.CMEType)\r\n };\r\n $scope.ClaimSelected = function (t) {\r\n ////console.log(t)\r\n \r\n $('html,body').scrollTop(0);\r\n angular.forEach(t.Courses, function (c) {\r\n c.SelectedEarned = 0.0;\r\n c.SelectedCME = [];\r\n angular.forEach(t.Unclaimed, function (i) {\r\n if (i.Selected == true && (c.CourseId == i.CourseId)) {\r\n c.SelectedCME.push(i);\r\n c.SelectedEarned = c.SelectedEarned + parseFloat(i.EarnedHours);\r\n }\r\n });\r\n c.SelectedEarned = 1 * c.SelectedEarned.toFixed(2)\r\n ////console.log(c)\r\n });\r\n var cmecert = $uibModal.open({\r\n templateUrl: 'app/tpls/CMECertificates/CMEType_'+t.Id+'.htm',\r\n windowClass: 'assign-modal',\r\n size: 'xlg',\r\n //backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, items) {\r\n $scope.LoadCME = function (c) {\r\n $scope.CMEType.Id = c.Id;\r\n ////////console.log($scope.CMEType)\r\n };\r\n $scope.Batch = guid();\r\n $scope.User = items.User;\r\n $scope.List = items.List;\r\n $scope.CMEType = items.CMEType;\r\n $scope.CMEType.Courses = items.CMEType.Courses;\r\n ////console.log($scope.CMEType.Courses);\r\n //////////console.log($scope.User);\r\n angular.forEach($scope.CMEType.Courses, function (c) {\r\n c.ClaimDate = new Date();\r\n //c.ClaimDate = c.ClaimDate.setHours(CurrentUserTZoffsett)\r\n });\r\n $scope.cancel = function () {\r\n cmecert.close();\r\n }\r\n $scope.Commit = function () {\r\n \r\n $scope.Wait = true;\r\n var mi = $uibModal.open({\r\n templateUrl: (($scope.CMEType.Id == \"5\") ? 'app/pages/dashboard/CMESurveyABP.htm' : ($scope.CMEType.Id == \"8\") ? 'app/pages/dashboard/CMESurveyABIM.htm' : 'app/pages/dashboard/CMESurvey.htm'),\r\n windowClass: 'assign-modal',\r\n size: 'lg',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope, items, $filter, filterFilter) {\r\n function IsValid() { }\r\n $scope.User = items.User;\r\n $scope.ClaimId = items.ClaimId;\r\n //$scope.FormData = ;\r\n $scope.cancel = function () {\r\n mi.close();\r\n };\r\n $scope.SubmitSurvey = function () {\r\n $scope.Wait = true;\r\n ////////////console.log(Form.$valid)\r\n ////////////console.log(JSON.stringify({ FormData: $scope.FormData }))\r\n $http.post(\"/Execute/ExportCME\", [$scope.ClaimId, CurrentUserTZoffsett]).success(function (res) {\r\n ////console.log(res)\r\n $http.post(\"/AdHocForm/CMESurvey\", { FormData: $scope.FormData }).success(function (res) {\r\n //////////console.log($scope.ClaimId);\r\n mi.close(res);\r\n cmecert.close();\r\n });\r\n });\r\n };\r\n },\r\n resolve: { items: function () { return { User: $scope.User, ClaimId: $scope.Batch } } }\r\n });\r\n mi.result.then(function (formid) {\r\n if (formid) {\r\n $scope.FormId = formid\r\n var lst = [];\r\n angular.forEach($scope.CMEType.Courses, function (c) {\r\n angular.forEach(c.SelectedCME, function (i) {\r\n lst.push(i);\r\n });\r\n });\r\n ////console.log($scope.CMEType)\r\n $scope.AddClaimItem(0, lst, function () {\r\n if ($scope.CMEType.Id != \"5\" && $scope.CMEType.Id != \"8\") {\r\n ////console.log(CurrentUserTZoffsett)\r\n $http.post(\"/Execute/ExportCME\", [$scope.Batch, CurrentUserTZoffsett]).success(function (res) {\r\n $http.post(\"/Execute/NotifyCMEClaim\", [$scope.Batch]).success(function (d) {\r\n mi.close(\"Added\");\r\n //alert(\"You've successfully submitted your CME credits. Check the 'Claimed' tab for your certificate(s)\", \"Success!\", \"success\");\r\n swal\r\n ({\r\n title: \"Success!\",\r\n text: \"You've successfully submitted your CME credits. Check the 'Claimed' tab for your certificate(s)\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n },\r\n function (isConfirm) {\r\n $window.location.reload();\r\n //$scope.CMEChange($scope.CMEType);\r\n });\r\n });\r\n });\r\n } else if ($scope.CMEType.Id == \"8\") {\r\n ////console.log(CurrentUserTZoffsett)\r\n \r\n $http.post(\"/Execute/NotifyCMEClaim\", [$scope.Batch]).success(function (d) {\r\n mi.close(\"Submitted\");\r\n //alert(\"You've successfully submitted your CME credits. Check the 'Claimed' tab for your certificate(s)\", \"Success!\", \"success\");\r\n swal\r\n ({\r\n title: \"Success!\",\r\n text: \"You've successfully submitted your ABIM MOC credit for verification. When your submission has been verified, the 'Pending' status will change to 'Open'. This means the ABIM has accepted your submission.\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n },\r\n function (isConfirm) {\r\n $window.location.reload();\r\n });\r\n \r\n });\r\n }\r\n else {\r\n $http.post(\"/Execute/NotifyCMEClaim\", [$scope.Batch]).success(function (d) {\r\n mi.close(\"Submitted\");\r\n //alert(\"You've successfully submitted your ABP CME points for verification. When your submission has been verified, the 'Pending' status will change to 'Open'. This means the ABP has accepted your submission.\", \"Success!\", \"success\");\r\n swal\r\n ({\r\n title: \"Success!\",\r\n text: \"You've successfully submitted your ABP CME points for verification. When your submission has been verified, the 'Pending' status will change to 'Open'. This means the ABP has accepted your submission.\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n },\r\n function (isConfirm) {\r\n $window.location.reload();\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n };\r\n $scope.AddClaimItem = function (idx, lst, fn) {\r\n var i = lst[idx];\r\n //console.log(lst[idx])\r\n var d = new Date()\r\n d.getUTCFullYear()\r\n var params = [$scope.User.UserId, i.CourseId, i.ChapterId, i.TopicId, \"0\", i.AssessmentId, i.FirstPassingDate, i.EarnedHours, $scope.Batch, $scope.Batch, $scope.CMEType.Id, i.CompleteDate.getUTCFullYear(), $scope.FormId]\r\n ////console.log(params);\r\n $http.post(\"/Execute/AddCMEClaimEntry\", params).success(function (d) {\r\n //console.log(d);\r\n if ((idx + 1) < lst.length) {\r\n $scope.AddClaimItem(idx + 1, lst, fn);\r\n }\r\n else {\r\n fn();\r\n }\r\n });\r\n\r\n }\r\n },\r\n resolve: { items: function () { return { User: $scope.User, CMEType: t } } }\r\n });\r\n cmecert.result.then(function (r) {\r\n if (r) {\r\n t.ShowClaimed = true;\r\n $scope.CMEChange(t)\r\n }\r\n });\r\n\r\n };\r\n\r\n $scope.predicate = 'CompleteDate';\r\n $scope.reverse = true;\r\n $scope.order = function (predicate) {\r\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\r\n $scope.predicate = predicate;\r\n };\r\n }\r\n }\r\n\r\n});\r\napp.directive('cmefinder', function ($http, $rootScope) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/pages/cmes/cmefinder.htm',\r\n scope: {},\r\n controller: function ($scope, $http, $filter, $window, $location, $anchorScroll) {\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

CME Finder

\" +\r\n \"

Welcome to the CME Finder. This tool provides a quick and easy way to discover CME credits which are available for you to earn.

\",\r\n position: 'top'\r\n },\r\n {\r\n element: '#list-controls',\r\n intro: \"

List Controls

\" +\r\n \"

Filter and control the list of available CME credits

\"\r\n },\r\n {\r\n element: '#filter-category',\r\n intro: \"

Change the type of available CME to display

\"\r\n },\r\n {\r\n element: '#filter-topic',\r\n intro: \"

List only topics containing a search query (e.g. \\\"cardiac\\\" or \\\"abdominal pain\\\")

\"\r\n },\r\n {\r\n element: '#filter-course',\r\n intro: \"

List only topics from the selected course

\"\r\n },\r\n {\r\n element: '#items-per-page',\r\n intro: \"

Adjust the number of items displayed per page

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the CME Finder tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.cmeSelect = \"1\";\r\n //////////console.log(u)\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n $http.post(\"/Execute/GetCMETypes\").success(function (data) {\r\n $scope.CMETypes = data.RS_0;\r\n //////////console.log($scope.CMETypes);\r\n });\r\n $http.post(\"/Execute/GetUserCourses\", [$scope.User.UserName]).success(function (data) {\r\n $scope.UserCourses = data.RS_0;\r\n $scope.ExpiredTrials = jQuery.grep($scope.UserCourses,function(e){\r\n return (e.HasExpired == \"True\" && e.IsTrial == \"1\");\r\n })\r\n ////console.log($scope.ExpiredTrials)\r\n });\r\n\r\n $scope.IsExpiredTrial = function(id) {\r\n var find = jQuery.grep($scope.ExpiredTrials, function(e){\r\n return e.Id == id.toString();\r\n });\r\n return (find.length?true:false);\r\n }\r\n //$scope.cmeId = 1;\r\n\r\n //$scope.UserName = 'jkprice';\r\n var today = new Date();\r\n $scope.$watch('cmeSelect', function (v) {\r\n //////////console.log($scope.cmeSelect);\r\n $scope.WaitCME = true;\r\n $http.post(\"/Execute/GetCMEDataAvailable\", [$scope.User.UserName, CurrentUserTZoffsett, $scope.cmeSelect]).success(function (data) {\r\n $scope.WaitCME = false;\r\n //////////console.log(data);\r\n\r\n $scope.AvailableCME = data.RS_0;\r\n //console.log($scope.AvailableCME)\r\n angular.forEach($scope.AvailableCME, function (truncate) {\r\n truncate.AssessmentName = truncate.AssessmentName.replace(/Q & A<\\/b>: |Q & A<\\/b>: | Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A : |Q & A: |Q & A /g, \"\");\r\n });\r\n $scope.ccc = '';\r\n $scope.xxx = '';\r\n\r\n $scope.sortingOrder = 'AssessmentName';\r\n $scope.reverse = false;\r\n $scope.filteredItems = [];\r\n $scope.groupedItems = [];\r\n $scope.itemsPerPage = \"25\";\r\n $scope.pagedItems = [];\r\n $scope.currentPage = 0;\r\n $scope.updateStatus = function (val) {\r\n\r\n $scope.ShowByStatus = val;\r\n \r\n }\r\n $scope.updateSearch = function (vals) {\r\n $scope.ccc = vals;\r\n }\r\n $scope.updateCourse = function (val) {\r\n $scope.xxx = val;\r\n $scope.search();\r\n ////console.log($scope.xxx)\r\n }\r\n $scope.updatePageSize = function (val) {\r\n $scope.itemsPerPage = val;\r\n }\r\n var searchMatch = function (haystack, needle) {\r\n //////console.log(haystack)\r\n if (!needle) {\r\n return true;\r\n }\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1;\r\n };\r\n var courseIdMatch = function(resultsID,searchID) {\r\n if(!searchID){\r\n return true;\r\n }\r\n return resultsID == searchID;\r\n }\r\n $scope.groupToPages = function () {\r\n $scope.pagedItems = [];\r\n\r\n for (var i = 0; i < $scope.filteredItems.length; i++) {\r\n if (i % $scope.itemsPerPage === 0) {\r\n $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)] = [$scope.filteredItems[i]];\r\n } else {\r\n $scope.pagedItems[Math.floor(i / $scope.itemsPerPage)].push($scope.filteredItems[i]);\r\n }\r\n }\r\n $scope.numPages = $scope.pagedItems.length;\r\n };\r\n $scope.search = function () {\r\n $scope.filteredItems = $filter('filter')($scope.AvailableCME, function (item) {\r\n for (var attr in item) {\r\n if (searchMatch(item['AssessmentName'], $scope.ccc)) {\r\n if (courseIdMatch(item['CourseId'], $scope.xxx)) {\r\n \r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n });\r\n\r\n if ($scope.sortingOrder !== '') {\r\n $scope.filteredItems = $filter('orderBy')($scope.filteredItems, $scope.sortingOrder, $scope.reverse);\r\n }\r\n $scope.currentPage = 0;\r\n $scope.groupToPages();\r\n };\r\n $scope.range = function (start, end) {\r\n var ret = [];\r\n if (!end) {\r\n end = start;\r\n start = 0;\r\n }\r\n for (var i = start; i < end; i++) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n };\r\n $scope.prevPage = function () {\r\n if ($scope.currentPage > 0) {\r\n $scope.currentPage--;\r\n }\r\n };\r\n $scope.nextPage = function () {\r\n if ($scope.currentPage < $scope.pagedItems.length - 1) {\r\n $scope.currentPage++;\r\n }\r\n };\r\n $scope.setPage = function () {\r\n $scope.currentPage = this.n;\r\n }\r\n $scope.search();\r\n $scope.sort_by = function (newSortingOrder) {\r\n if ($scope.sortingOrder == newSortingOrder)\r\n $scope.reverse = !$scope.reverse;\r\n\r\n $scope.sortingOrder = newSortingOrder;\r\n\r\n // icon setup\r\n /*$('th i').each(function(){\r\n // icon reset\r\n $(this).removeClass().addClass('icon-sort');\r\n });\r\n if ($scope.reverse)\r\n $('th.'+newSortingOrder+' i').removeClass().addClass('icon-chevron-up');\r\n else\r\n $('th.'+newSortingOrder+' i').removeClass().addClass('icon-chevron-down');*/\r\n $scope.search();\r\n\r\n };\r\n\r\n });\r\n });\r\n $scope.SelectType = function (v) {\r\n $scope.cmeSelect = v;\r\n ////////console.log(v)\r\n\r\n }\r\n $scope.Goto = function (Assessment) {\r\n $location.path(\"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\");\r\n //$anchorScroll();\r\n }\r\n \r\n\r\n }\r\n }\r\n});\r\napp.directive('assigntab', function ($parse, $http, $compile, $window, $location, App) {\r\n return {\r\n restrict: 'E',\r\n replace: false,\r\n templateUrl: 'app/pages/dashboard/assigntab.htm',\r\n controller: function ($scope, $http, $filter, $rootScope) {\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

My Assignments

\" +\r\n \"

assignments

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the My Assignments tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.User = $rootScope.User;\r\n //$rootScope.$broadcast('UserLoaded', $scope.User); \r\n $scope.Wait = true;\r\n $http.post(\"/Execute/GetAssignmentCalenderForStudent\", [$scope.User.UserName]).success(function (data) {\r\n $scope.Wait = false;\r\n $scope.AssignList = data.RS_0;\r\n //console.log($scope.AssignList)\r\n $scope.TodayDate = function () {\r\n var now = new Date();\r\n return $filter('date')(now, \"MMM dd, yyyy\")\r\n };\r\n $scope.TodayDateObj = new Date();\r\n $scope.unixTodayDate = Date.parse($scope.TodayDate());\r\n \r\n $scope.showTitle = false;\r\n angular.forEach($scope.AssignList, function (truncate) {\r\n truncate.Label = truncate.Label.replace(/Q & A<\\/b>: |Q & A<\\/b>: |Q & A<\\/B>: |Q & A<\\/B>: |Q & A<\\/b>: |Q & A: |Q & A /g, \"\");\r\n truncate.newEffectiveDateTime = new Date(truncate.EffectiveDateTime);\r\n truncate.EffectiveDateTime = new Date(truncate.EffectiveDateTime + ' UTC')\r\n truncate.newDueDateTime = new Date(truncate.DueDateTime);\r\n truncate.unixEffectiveDateTime = Date.parse(truncate.newEffectiveDateTime);\r\n truncate.unixDueDateTime = Date.parse(truncate.newDueDateTime);\r\n truncate.DueDateTime = new Date(truncate.DueDateTime + ' UTC')\r\n truncate.CompletedDate = new Date(truncate.CompletedDate + ' UTC')\r\n if ((truncate.CompletedOnTime >= 1)) {\r\n truncate.assignmentStatus = 'Passed';\r\n } else if ((truncate.CompletedOnTime == 0) && (truncate.newDueDateTime >= $scope.TodayDateObj) && ($scope.TodayDateObj >= truncate.newEffectiveDateTime)) {\r\n truncate.assignmentStatus = 'Active';\r\n } else if ((truncate.CompletedOnTime == 0) && ($scope.TodayDateObj > truncate.newDueDateTime)) {\r\n truncate.assignmentStatus = 'Failed';\r\n } else if ($scope.TodayDateObj < truncate.newEffectiveDateTime) {\r\n truncate.assignmentStatus = 'Noteffective';\r\n };\r\n if ($scope.TodayDateObj >= truncate.newEffectiveDateTime && truncate.CompletedOnTime==0 && truncate.assignmentStatus!='Failed') {\r\n truncate.ShowGoToButton = true;\r\n } else {\r\n truncate.ShowGoToButton = false;\r\n }\r\n //////////console.log(truncate.ShowGoToButton);\r\n //if ($scope.unixTodayDate < truncate.unixEffectiveDateTime) {\r\n // truncate.assignmentStatus = 0;\r\n //} else if (($scope.unixTodayDate <= truncate.unixDueDateTime) && ($scope.unixTodayDate >= truncate.unixEffectiveDateTime)) {\r\n // truncate.assignmentStatus = 1;\r\n //} else if ($scope.unixTodayDate > truncate.unixDueDateTime) {\r\n // truncate.assignmentStatus = 2;\r\n //} else {\r\n // truncate.assignmentStatus = -1;\r\n //}\r\n truncate.ShowDeets = false;\r\n $scope.unixSignStart = Date.parse(truncate.newEffectiveDateTime + ' UTC');\r\n $scope.unixSignEnd = Date.parse(truncate.newDueDateTime + ' UTC');\r\n });\r\n //console.log($scope.AssignList);\r\n $scope.getData = function () {\r\n return $filter('filter')($scope.AssignList, $scope.q)\r\n };\r\n $scope.numberOfPagez = function () {\r\n return Math.ceil($scope.getData().length / $scope.pageSizze);\r\n };\r\n $scope.totalPagez = Math.ceil($scope.AssignList.length / $scope.pageSizze);\r\n angular.forEach($scope.AssignList, function (usr) {\r\n usr.ShowDeets = false\r\n });\r\n\r\n $scope.$on('closedeetsuser', function () {\r\n angular.forEach($scope.AssignList, function (usr) {\r\n usr.ShowDeets = false\r\n });\r\n });\r\n\r\n $scope.currentPagge = 0;\r\n $scope.pageSizze = \"25\";\r\n ////////////console.log($scope.userName)\r\n $scope.q = '';\r\n $scope.updatePage = function (val) {\r\n $scope.currentPagge = val;\r\n }\r\n\r\n $scope.pageSizeChange = function (val) {\r\n $scope.pageSizze = val;\r\n if ($scope.pageSizze && $scope.UserDetails) {\r\n $scope.totalPagez = Math.ceil($scope.AssignList.length / $scope.pageSizze);\r\n }\r\n };\r\n $scope.aaaa = '';\r\n $scope.bbbb = 'Active';\r\n $scope.sortingOrderA = 'unixDueDateTime';\r\n $scope.reverseA = false;\r\n $scope.filteredItemsA = [];\r\n $scope.groupedItemsA = [];\r\n $scope.itemsPerPageA = \"25\";\r\n $scope.assignmentStatus = '';\r\n $scope.pagedItemsA = [];\r\n $scope.currentPageA = 0;\r\n $scope.updateSearchA = function (val) {\r\n $scope.aaaa = val;\r\n };\r\n $scope.updateSearchStatus = function (val) {\r\n $scope.bbbb = val;\r\n };\r\n $scope.updatePageSizeA = function (val) {\r\n $scope.itemsPerPageA = val;\r\n };\r\n var searchMatchA = function (haystack, needle) {\r\n if (!needle) {\r\n return true;\r\n }\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1;\r\n };\r\n $scope.groupToPagesA = function () {\r\n ////////////console.log(\"STARTGROUP\");\r\n $scope.pagedItemsA = [];\r\n for (var i = 0; i < $scope.filteredItemsA.length; i++) {\r\n if (i % $scope.itemsPerPageA === 0) {\r\n $scope.pagedItemsA[Math.floor(i / $scope.itemsPerPageA)] = [$scope.filteredItemsA[i]];\r\n } else {\r\n $scope.pagedItemsA[Math.floor(i / $scope.itemsPerPageA)].push($scope.filteredItemsA[i]);\r\n }\r\n }\r\n $scope.numPagesA = $scope.pagedItemsA.length;\r\n ////////////console.log(\"PAGEDITEMS_IBU\");\r\n ////////////console.log($scope.pagedItemsA);\r\n };\r\n $scope.searchA = function () {\r\n ////////////console.log(\"STARTSEARCH\");\r\n ////////////console.log($scope.aaaa);\r\n $scope.filteredItemsA = $filter('filter')($scope.AssignList, function (item) {\r\n for (var attr in item) {\r\n ////////////console.log(item);\r\n if (searchMatchA(item['Label'], $scope.aaaa)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n /*$scope.filteredItemsU = $filter('filter')($scope.InstitutionUsers, function(item){\r\n for(var attr in item){\r\n if(searchMatch(item[attr],$scope.qqqq))\r\n }\r\n });*/\r\n if ($scope.sortingOrderA !== '') {\r\n $scope.filteredItemsA = $filter('orderBy')($scope.filteredItemsA, $scope.sortingOrderA, $scope.reverseA);\r\n }\r\n $scope.currentPageA = 0;\r\n $scope.groupToPagesA();\r\n \r\n };\r\n $scope.searchStatus = function () {\r\n ////////////console.log(\"STARTSEARCH\");\r\n ////////////console.log($scope.aaaa);\r\n $scope.filteredItemsA = $filter('filter')($scope.AssignList, function (item) {\r\n for (var attr in item) {\r\n ////////////console.log(item);\r\n if (searchMatchA(item['assignmentStatus'], $scope.bbbb)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n });\r\n /*$scope.filteredItemsU = $filter('filter')($scope.InstitutionUsers, function(item){\r\n for(var attr in item){\r\n if(searchMatch(item[attr],$scope.qqqq))\r\n }\r\n });*/\r\n if ($scope.sortingOrderA !== '') {\r\n $scope.filteredItemsA = $filter('orderBy')($scope.filteredItemsA, $scope.sortingOrderA, $scope.reverseA);\r\n }\r\n $scope.currentPageA = 0;\r\n $scope.groupToPagesA();\r\n \r\n }; \r\n $scope.searchA();\r\n $scope.searchStatus();\r\n \r\n $scope.sort_byA = function (newSortingOrderA) {\r\n if ($scope.sortingOrderA == newSortingOrderA) {\r\n $scope.reverseA = !$scope.reverseA;\r\n }\r\n $scope.sortingOrderA = newSortingOrderA;\r\n $scope.searchStatus();\r\n };\r\n\r\n $scope.rangeA = function (start, end) {\r\n var ret = [];\r\n if (!end) {\r\n end = start;\r\n start = 0;\r\n }\r\n for (var i = start; i < end; i++) {\r\n ret.push(i);\r\n }\r\n return ret;\r\n };\r\n $scope.prevPageA = function () {\r\n if ($scope.currentPageA > 0) {\r\n $scope.currentPageA--;\r\n }\r\n };\r\n $scope.nextPageA = function () {\r\n if ($scope.currentPageA < $scope.pagedItemsA.length - 1) {\r\n $scope.currentPageA++;\r\n }\r\n };\r\n $scope.setPageA = function () {\r\n $scope.currentPageA = this.n;\r\n };\r\n \r\n \r\n $scope.Goto = function (Assessment) {\r\n ////console.log(Assessment)\r\n if (Assessment.CourseId == 0 || Assessment.TopicId == 0) {\r\n $location.path(\"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\");\r\n }\r\n else {\r\n \r\n $location.path(\"/CMETopic/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId);\r\n }\r\n }\r\n \r\n });\r\n \r\n },\r\n \r\n }\r\n});\r\napp.directive('quickquiztab', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: { qid: \"=\", hidestart: \"=\", profiletab: \"=\", programtab: \"=\" },\r\n templateUrl: 'app/pages/dashboard/quickquiztab.htm',\r\n controller: function ($scope, $http, $rootScope) {\r\n //////////console.log($scope.qid);\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $rootScope.$on(\"ReloadQQ\", function () {\r\n ////////console.log(\"reload qq\");\r\n $scope.Load();\r\n });\r\n $scope.scroll = function () {\r\n $anchorScroll();\r\n };\r\n $scope.activeTab = [];\r\n $scope.selectTab1 = function (index) {\r\n $scope.activeTab[index] = true;\r\n };\r\n $scope.clickTab = function (index) {\r\n $scope.activeTab[index] = true;\r\n };\r\n $scope.IsCheater = true;\r\n $scope.loadUserAssessment = function (id) {\r\n //////////console.log(id)\r\n if (id) {\r\n $scope.UserAssessmentId = parseInt(id);\r\n //$scope.$apply();\r\n $http.get('/LMSData.svc/UserAssessments(' + id + 'L)?$expand=Questions,Assessment/AssessmentType').success(function (data) {\r\n $scope.UserAssessment = data.d;\r\n var ans = \"\";\r\n $scope.SelectQuestionIdx = -1;\r\n $.each($scope.UserAssessment.Questions, function (idx, q) {\r\n ans = q.AnswersJSON.replace(/\\n/g, \"\");\r\n try {\r\n q.Answers = $.parseJSON(ans);\r\n $.each(q.Answers, function (aidx, a) {\r\n a.HTML = a.HTML.replace(/>/g, \">\");\r\n a.HTML = a.HTML.replace(/</g, \"<\");\r\n a.HTML = a.HTML.replace(/&#37;/g, \"%\");\r\n a.HTML = a.HTML.replace(/&/g, \"&\");\r\n });\r\n if (q.HasAnswered == false && $scope.SelectQuestionIdx == -1) {\r\n $scope.SelectQuestionIdx = idx;\r\n }\r\n q.HTML = q.HTML.replace(/ 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n\r\n qquiz.Results = data.RS_0;\r\n\r\n qquiz.Performance = data.RS_1;\r\n qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n //////////console.log($scope.Results)\r\n\r\n });\r\n };\r\n qquiz.updateActivity = function (pagesz) {\r\n qquiz.completedPageSize = pagesz;\r\n if (qquiz.activityPageInfo.TotalPages === 1) {\r\n qquiz.activityPageInfo.TotalPages = 1;\r\n }\r\n if (qquiz.showLB == true) {\r\n $http.post(\"/Execute/GetQuickQuiz\", [qquiz.AssessmentId, $scope.User.UserName, qquiz.completedCurrentPage, qquiz.completedPageSize]).success(function (data) {\r\n qquiz.activityPageInfo = data.RS_3[0];\r\n //////console.log($scope.activityPageInfo)\r\n if (qquiz.completedCurrentPage > 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n //////////console.log(data)\r\n qquiz.Results = data.RS_0;\r\n\r\n qquiz.Performance = data.RS_1;\r\n qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n ////////console.log(\"PARTIAL_SECONDS\")\r\n })\r\n });\r\n };\r\n };\r\n }\r\n $scope.QQFeedback = function () {\r\n var modalInstance = $modal.open({\r\n templateUrl: '/js/App/templates/QQFeedback.htm',\r\n controller: function ($scope, $http, $rootScope, $modalInstance, items, App) {\r\n $scope.UpdateUserComments = function (e) {\r\n\r\n }\r\n $scope.ok = function () {\r\n\r\n // Comment this part out when the proc is ready. \r\n //alert(\"Thank you for your Quick Quiz Feedback submission. We will contact you if further information is needed. \\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n //$modalInstance.close();\r\n $scope.feedback = $scope.Question.UserComments + '

' + 'Username: ' + items.user.UserName + '
' + 'Email: ' + items.user.Email + '
' + 'Phone: ' + items.user.Profile.Telephone + '
' + 'Institution: ' + items.user.Profile.Institution + '

';\r\n $http.post(\"/Execute/MessageDistro\", ['Y29udGVudGZlZWRiYWNr', 'UXVpY2sgUXVpeiBGZWVkYmFjaw==', $scope.feedback]).success(function (data) {\r\n alert(\"Thank you for your Quick Quiz Feedback submission. \\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n $modalInstance.close();\r\n });\r\n }\r\n $scope.cancel = function () {\r\n $modalInstance.close();\r\n }\r\n\r\n },\r\n resolve: {\r\n items: function () { return { user: $scope.User } }\r\n }\r\n })\r\n };\r\n $scope.Load = function () {\r\n ////////console.log($scope.qid);\r\n $scope.RightNow = new Date();\r\n $scope.ShowLogin = false;\r\n $scope.ShowRegister = false;\r\n $scope.User = $rootScope.User\r\n if ($scope.User.UserName) {\r\n if (isNumeric(getQueryVariable(\"qid\")) == true) {\r\n $scope.Id = getQueryVariable(\"qid\");\r\n $http.post(\"/Execute/GetQuickQuiz\", [$scope.Id, $scope.User.UserName, 1, 5]).success(function (data) {\r\n ////////console.log(\"qqq\");\r\n ////////console.log(data);\r\n $scope.Results = data.RS_0;\r\n $scope.Performance = data.RS_1;\r\n $scope.Assessment = data.RS_2[0];\r\n angular.forEach($scope.Results, function (r) {\r\n if (r.UserId == $scope.User.UserId) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n });\r\n } else {\r\n if (isNumeric($scope.qid) == true) {\r\n $scope.Id = $scope.qid;\r\n ////////console.log($scope.qid);\r\n $http.post(\"/Execute/GetQuickQuiz\", [$scope.Id, $scope.User.UserName, 1, 5]).success(function (data) {\r\n //////////console.log(data);\r\n $scope.Results = data.RS_0;\r\n $scope.Performance = data.RS_1;\r\n $scope.QuizList = $scope.Performance;\r\n $scope.QuizList[0].AssessmentId = $scope.QuizList[0].Assessment_Id;\r\n //////////console.log($scope.QuizList);\r\n\r\n $scope.Assessment = data.RS_2[0];\r\n angular.forEach($scope.Results, function (r) {\r\n if (r.UserId == $scope.User.UserId) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n $scope.showLeaderBoard($scope.QuizList[0]);\r\n });\r\n } else {\r\n $http.post(\"/Execute/GetQuickQuizListForUser\", [$scope.User.UserName]).success(function (data) {\r\n $scope.QuickQuiz = data.RS_1;\r\n ////////console.log(\"QqQqQ\")\r\n //////console.log($scope.QuickQuiz)\r\n $scope.QuickQuiz = $filter('orderBy')($scope.QuickQuiz, '-AssessmentName', false);\r\n $http.post(\"/Execute/GetCMEDataForClaims\", [$scope.User.UserName, CurrentUserTZoffsett, 1]).success(function (data) {\r\n ////////console.log(data)\r\n angular.forEach(data.RS_2, function (qq) {\r\n if (qq.CourseName === 'Challenger Quick Quiz') {\r\n $scope.QuickQuizCME = qq.EarnedHours - qq.ClaimedHours;\r\n }\r\n });\r\n ////////console.log($scope.QuickQuizCME)\r\n });\r\n $http.post('/Execute/GetUserSettings', [$scope.User.UserId]).success(function (dat) {\r\n $scope.Settings = JSON.parse(dat.RS_0[0].Settings);\r\n ////////console.log($scope.Settings)\r\n });\r\n\r\n // ////////console.log($scope.QuizList )\r\n /*$scope.QuickQuiz.highScore = 0;\r\n var highScoreFound = false;*/\r\n angular.forEach($scope.QuickQuiz, function (qq) {\r\n /*if (qq.Score === \"\") {\r\n qq.Points = 0;\r\n }\r\n else {\r\n qq.Points = 100 * (qq.Score / qq.TimeToTake);\r\n \r\n }*/\r\n /*if (qq.Points > $scope.QuickQuiz.highScore || highScoreFound === false) {\r\n $scope.QuickQuiz.highScore = Math.round(qq.Points);\r\n highScoreFound = true;\r\n }*/\r\n qq.partialSeconds = parseFloat(qq.TimeToTake).toFixed(2).split(\".\")[1];\r\n $http.get(\"/APi/Assessments(\" + qq.AssessmentId + \"L)\").success(function (data) {\r\n qq.Description = data.d.Description;\r\n });\r\n });\r\n var sum = 0;\r\n var points = 0;\r\n var maxpoints = 0;\r\n for (var i = 0, Available = 0, NotAvailable = 0; 4 >= i; i++) {\r\n if ($scope.QuickQuiz[i].Score === \"\") {\r\n Available++;\r\n //$scope.QuickQuiz[i].Points = 0;\r\n }\r\n else {\r\n NotAvailable++\r\n //if ($scope.QuickQuiz[i].Rank === \"\") {\r\n // $scope.QuickQuiz[i].Rank = 0;\r\n //}\r\n\r\n //points = 100 * ($scope.QuickQuiz[i].Score / $scope.QuickQuiz[i].TimeToTake);\r\n //$scope.QuickQuiz[i].Points = points;\r\n //if (!isNumeric($scope.QuickQuiz[i].Points) || !$scope.QuickQuiz[i].Points) {\r\n // $scope.QuickQuiz[i].Points = 0;\r\n //}\r\n sum += parseInt($scope.QuickQuiz[i].Rank, 10);\r\n\r\n ////////console.log(maxpoints)\r\n }\r\n\r\n\r\n }\r\n\r\n ////////console.log(sum);\r\n $scope.QuickQuiz.Available = Available;\r\n // maxpoints = Math.max($scope.QuickQuiz[0].Points, $scope.QuickQuiz[1].Points, $scope.QuickQuiz[2].Points, $scope.QuickQuiz[3].Points, $scope.QuickQuiz[4].Points);\r\n //$scope.QuickQuiz.MaxPoints = maxpoints;\r\n $scope.QuickQuiz.RankAverage = Math.round(sum / NotAvailable);\r\n ////////console.log($scope.QuickQuiz)\r\n $scope.Goto = function (Assessment) {\r\n $window.location.href = \"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\";\r\n }\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n $scope.ShowLogin = true;\r\n\r\n }\r\n \r\n }\r\n $scope.Load();\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive('userprescription', function ($http, $rootScope, $window) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/UserPrescription.htm',\r\n scope: {\r\n id: '=',\r\n custom: '=',\r\n topdeets: '=',\r\n showback: '=',\r\n assessname: '='\r\n },\r\n controller: function ($scope, $http, $filter, $anchorScroll, $location, $timeout) {\r\n //console.log('prescrip custom?', $scope.custom)\r\n $scope.PopLinkies = function() {\r\n $timeout(function(){\r\n jQuery('a')\r\n .filter('[href^=\"http\"], [href^=\"//\"]')\r\n .not('[href*=\"' + window.location.host + '\"]')\r\n .attr('rel', 'noopener noreferrer')\r\n .attr('target', '_blank');\r\n })\r\n\r\n };\r\n\r\n $timeout(function() {\r\n ////console.log('SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS')\r\n $scope.PopLinkies();\r\n\r\n })\r\n $scope.User = $rootScope.User;\r\n $scope.back = function () {\r\n $scope.GoBackMagic();\r\n }\r\n \r\n $scope.PostScore = ($location.search().scored);\r\n //console.log($rootScope.User)\r\n $scope.GoBackMagic = function(){\r\n if($scope.PostScore) {\r\n if($scope.custom) {\r\n ////console.log($scope.UserAssessment)\r\n $location.url('/e/customexams#'+$scope.UserAssessment.Assessment_Id);\r\n }else{\r\n if(\r\n $scope.UserAssessment.Assessment.AssessmentType.Name == \"Survey\" ||\r\n $scope.UserAssessment.Assessment.AssessmentType.Name == \"Board Sim\"\r\n ) {\r\n $location.url('/e/exams/'+$scope.UserAssessment.CourseId+'#'+$scope.UserAssessment.Assessment.Id);\r\n } else {\r\n //$location.url('/cme/'+$scope.UserAssessment.CourseId+'#'+$scope.UserAssessment.ChapterId);\r\n $location.url('/QuestionPool/'+\r\n $scope.UserAssessment.Assessment.Id+\r\n '/'+$scope.UserAssessment.CourseId+\r\n '/'+$scope.UserAssessment.ChapterId+\r\n '/'+$scope.UserAssessment.TopicId+\r\n '/Assessment')\r\n //alert('/cme/'+$scope.UserAssessment.CourseId+'#'+$scope.UserAssessment.Assessment.Id);\r\n }\r\n }\r\n } else {\r\n $window.history.back();\r\n }\r\n\r\n };\r\n $scope.Wait = false\r\n $scope.StartAssessment = function () {\r\n $scope.ShowLoad = true;\r\n $scope.Wait = true;\r\n var params = [$scope.User.UserName, $scope.CourseId, $scope.ChapterId, $scope.TopicId, $scope.SubTopicId || \"0\", $scope.AssessmentId, CurrentUserTZoffsett]\r\n //////console.log(params)\r\n\r\n if ($scope.Assignments.HasViewability && $scope.Viewabilty && $scope.Viewabilty.MinutesAllocated && $scope.Viewabilty.MinutesAllocated > 0 && new Date($scope.Assignments.EffectiveDateTime + ' UTC') > Today && new Date($scope.Assignments.DueDateTime + ' UTC') < Today) {\r\n if (confirm(\"This Assessment will be automatically scored in \" + $scope.Viewabilty.MinutesAllocated +\" Minute. Are you ready to start?\")) {\r\n if ($scope.custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n if ($scope.custom) {\r\n $http.post(\"/Execute/StartNewCustomAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/customassessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n } else {\r\n $http.post(\"/Execute/StartNewAssessment\", params).success(function (data) {\r\n //////console.log(data);\r\n $location.path(\"/assessment/\" + data.RS_0[0].UserAssessmentId);\r\n });\r\n }\r\n }\r\n }\r\n \r\n $scope.$watch(\"CourseId\", function (newval) {\r\n if ($scope.CourseId || $scope.CourseId===0) {\r\n var params = [$scope.User.UserName, $scope.CourseId, $scope.ChapterId, $scope.TopicId || \"0\", $scope.SubTopicId || \"0\", $scope.AssessmentId, (($scope.custom == true) ? 1 : 0)]\r\n //////console.log(params)\r\n $http.post(\"/Execute/GetAssessmentHistory\", params).success(function (data) {\r\n $scope.Complete = data.RS_0;\r\n angular.forEach($scope.Complete, function (com) {\r\n com.EndDateTime = new Date(com.EndDateTime + \" UTC\");\r\n com.StartDateTime = new Date(com.StartDateTime + \" UTC\");\r\n });\r\n $scope.InProgress = data.RS_1;\r\n angular.forEach($scope.InProgress, function (inp) {\r\n inp.StartDateTime = new Date(inp.StartDateTime + \" UTC\");\r\n });\r\n $scope.Viewabilty = data.RS_3[0];\r\n //console.log($scope.Viewability)\r\n if(data.RS_2.length){\r\n $scope.Assignments = data.RS_2[0];\r\n\r\n }else{\r\n $scope.Assignments = {};\r\n }\r\n\r\n\r\n\r\n /*if (data.RS_3) {\r\n ////console.log('ok')\r\n $scope.Viewabilty = data.RS_3[0];\r\n $scope.Assignments = data.RS_2[0];\r\n\r\n //$scope.HasViewability = true;\r\n\r\n $scope.Assignments.EffectiveDateTime = new Date($scope.Assignments.EffectiveDateTime + ' UTC');\r\n $scope.Assignments.DueDateTime = new Date($scope.Assignments.DueDateTime + ' UTC')\r\n if ($scope.Assignments.Viewablity == 3) {\r\n\r\n //console.log($scope.Assignments.EffectiveDateTime, $scope.Assignments.DueDateTime, Today)\r\n if ($scope.Assignments.EffectiveDateTime < Today && $scope.Assignments.DueDateTime > Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false;\r\n ////console.log($scope.Assignments.HasViewability)\r\n }\r\n }\r\n if ($scope.Assignments.Viewablity == 2) {\r\n\r\n if ($scope.Assignments.EffectiveDateTime < Today) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n else {\r\n $scope.Assignments.HasViewability = false\r\n }\r\n //console.log($scope.Assignments)\r\n\r\n }\r\n if ($scope.Assignments.Viewablity == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n\r\n }\r\n }\r\n else {\r\n $scope.Assignments = data.RS_2[0];\r\n if ($scope.Assignments.Viewable && $scope.Assignments.Viewable == 1) {\r\n $scope.Assignments.HasViewability = true;\r\n }\r\n }*/\r\n\r\n\r\n ////console.log(data)\r\n\r\n\r\n ////console.log($scope.Assignments)\r\n if ($scope.Viewabilty) {\r\n if ($scope.Viewabilty.ShowLeaderBoard == '') {\r\n $scope.Viewabilty.ShowLeaderBoard = '0'\r\n }\r\n if ($scope.Viewabilty.PrescriptiveReport == '') {\r\n $scope.Viewabilty.PrescriptiveReport = '1'\r\n }\r\n if ($scope.Viewabilty.MinutesAllocated == '') {\r\n $scope.Viewabilty.MinutesAllocated = '0'\r\n }\r\n }\r\n ////console.log($scope.Viewabilty)\r\n });\r\n\r\n }\r\n });\r\n\r\n $scope.RXReportQuestion = function (q, idx, obj) {\r\n var modalInstance = $modal.open({\r\n templateUrl: '/app/tpls/eva/QuestionFeedback.htm',\r\n controller: function ($scope, $http, $rootScope, $modalInstance, items, App) {\r\n $scope.Question = items.question;\r\n ////////console.log($scope.Question);\r\n $scope.CourseId = items.CourseId;\r\n $scope.ChapterId = items.ChapterId;\r\n $scope.TopicId = items.TopicId;\r\n $scope.SubTopicId = items.SubTopicId;\r\n $scope.AssessmentId = items.AssessmentId;\r\n $scope.Question.UserComments = \"\";\r\n\r\n $scope.UpdateUserComments = function (e) {\r\n //////////console.log(e)\r\n //$scope.Question.UserComments = e.currentTarget.value;\r\n }\r\n $scope.ok = function () {\r\n var pathIds = [];\r\n pathIds[0] = $scope.Question.QuestionId;\r\n pathIds[1] = App.CurrentUserInfo.Username;\r\n pathIds[2] = $scope.CourseId;\r\n pathIds[3] = $scope.ChapterId;\r\n pathIds[4] = $scope.TopicId;\r\n pathIds[5] = $scope.SubTopicId; // ?\r\n pathIds[6] = $scope.AssessmentId;\r\n pathIds[7] = idx;\r\n pathIds[8] = $scope.Question.UserComments;\r\n $http.post(\"/Execute/SendContentErrorReport\", pathIds).success(function (data) {\r\n alert(\"Thank you for your Question Report submission - We're on it.\\n\\nYour satisfaction is very important to us. We will review your comments and take appropriate editorial steps, as warranted by our editorial board of board-certified physician educators.\\n\\nIf we have any further questions regarding this submission, we will contact you shortly via email. If not, please know your findings are being attended to and any corrective actions are occurring as fast as possible.\\n\\nWe update our courses daily, so once we have a resolution, any corrections will appear automatically in your content assets.\\n\\nThank you,\\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n $modalInstance.close();\r\n });\r\n }\r\n $scope.cancel = function () {\r\n $modalInstance.close();\r\n }\r\n },\r\n resolve: { items: function () { return { question: q, CourseId: obj.CourseId, ChapterId: obj.ChapterId, TopicId: ((obj.TopicId == null) ? 0 : obj.TopicId), SubTopicId: ((obj.SubTopicId == null) ? 0 : obj.SubTopicId), AssessmentId: obj.Assessment_Id } } }\r\n });\r\n }\r\n $scope.orderQuestionId = ''\r\n $scope.Wait = true;\r\n $scope.isuser = true\r\n $scope.checkQOrder = function () {\r\n if ($rootScope.User.UserId !== parseInt($scope.Header.User_UserID)) {\r\n $scope.isuser = false\r\n //console.log('User Nope')\r\n }\r\n if ($scope.isuser == false) {\r\n $scope.orderQuestionId = 'QuestionId'\r\n //console.log('ORDERING IS A GO')\r\n }\r\n }\r\n var params = [];\r\n params[0] = $scope.id;\r\n params[1] = (($scope.custom == true) ? 1 : 0);\r\n //console.log($scope.custom)\r\n ////////console.log($scope.custom)\r\n var url = '/api/UserAssessments(' + $scope.id + 'L)?$expand=Questions,Assessment/AssessmentType'\r\n if ($scope.custom == true) {\r\n url = '/CustomUserAssessment/' + $scope.id\r\n }\r\n $http.get(url).success(function (data) {\r\n $scope.UserAssessment = data.d;\r\n\r\n //////console.log($scope.UserAssessment)\r\n $scope.UserAssessment.StartDateTime = new Date($scope.UserAssessment.StartDateTime)\r\n $scope.UserAssessment.EndDateTime = new Date($scope.UserAssessment.EndDateTime);\r\n \r\n $scope.UserAssessment.Passed = (parseFloat($scope.UserAssessment.Score) >= parseFloat($scope.UserAssessment.PassingScore))\r\n $scope.BacktoQuestionPool = function (UA) {\r\n $location.path(\"/QuestionPool/\" + UA.CourseId + '/' + UA.ChapterId + '/' + UA.TopicId + '/' + UA.AssessmentId);\r\n }\r\n $rootScope.Assessment = $scope.UserAssessment;\r\n\r\n });\r\n $http.post(\"/Execute/GetPrescription\", params).success(function (data) {\r\n $scope.Wait = false;\r\n ////console.log($scope.assessname)\r\n //console.log(data)\r\n $scope.Header = data.RS_0[0];\r\n //console.log($scope.Header)\r\n $scope.Header.DueDateTime = $scope.Header.EndDateTime;\r\n $scope.Header.EffectiveDateTime = $scope.Header.StartDateTime;\r\n $scope.Header.EndDateTime = new Date($scope.Header.EndDateTime + \" UTC\")\r\n $scope.Header.StartDateTime = new Date($scope.Header.StartDateTime + \" UTC\")\r\n $scope.CourseId = $scope.Header.CourseId;\r\n $scope.ChapterId = $scope.Header.ChapterId;\r\n $scope.TopicId = $scope.Header.TopicId;\r\n $scope.SubTopicId = $scope.Header.SubTopicId;\r\n $scope.AssessmentId = $scope.Header.Assessment_Id;\r\n $http.post('/Execute/GetAssessmentViewability', [$scope.AssessmentId, $scope.CourseId, $scope.ChapterId, $scope.TopicId, $rootScope.User.UserId]).success(function (data) {\r\n $scope.PrescriptionViewability = data.RS_0[0];\r\n if ($scope.PrescriptionViewability.ViewPrescription == 0 && $rootScope.User.UserId == $scope.Header.User_UserID)\r\n {\r\n $scope.ViewPrescription = false;\r\n }\r\n else {\r\n $scope.ViewPrescription = true;\r\n }\r\n //console.log($scope.PrescriptionViewability)\r\n });\r\n $http.post('/Execute/GetAssessmentAverage', [$scope.Header.Assessment_Id]).success(function(d){$scope.Header.AssessmentAverage = d.RS_0[0].Average});\r\n if ($scope.assessname !== undefined) {\r\n $scope.Header.AssessmentName = $scope.assessname;\r\n } \r\n $scope.Header.Time = new Date($scope.Header.EndDateTime) - new Date($scope.Header.StartDateTime)\r\n ////console.log($scope.Header)\r\n $scope.Sections = data.RS_1;\r\n ////////console.log($scope.Sections.length);\r\n var x2js = new X2JS();\r\n angular.forEach($scope.Sections, function (section) {\r\n section.showSection = false;\r\n section.PracticeArray = x2js.xml_str2json(section.PracticeArr);\r\n if (section.PracticeArray) {\r\n if (!angular.isArray(section.PracticeArray.AssessmentArray.Name)) {\r\n section.PracticeArray.AssessmentArray.NameSingle = section.PracticeArray.AssessmentArray.Name;\r\n }\r\n }\r\n //////console.log(section.PracticeArray)\r\n });\r\n ////console.log($scope.Sections)\r\n if ($scope.Sections.length === 1) {\r\n $scope.SectionShow = false;\r\n $scope.ShowQs = true;\r\n $scope.ListButton = false;\r\n $scope.ShowAlls = true;\r\n $scope.ShowEveryQuestion($scope.id)\r\n }\r\n if ($scope.Sections.length > 1) {\r\n $scope.SectionShow = true;\r\n $scope.ShowQs = false;\r\n $scope.ShowAlls = false;\r\n $scope.ListButton = true;\r\n }\r\n //////console.log($scope.ShowQs);\r\n //////console.log($scope.Alls)\r\n angular.forEach($scope.Sections, function (sec) {\r\n if (1 * sec.Pct == 100) {\r\n sec.BgColor = \"initial\";\r\n } else if (1 * sec.Pct >= 80) {\r\n sec.BgColor = \"#f0ad4e!important\";\r\n } else {\r\n sec.BgColor = \"#ff0000!important\";\r\n }\r\n sec.ShowSecQuestions = false;\r\n sec.ShowSecMissedQuestions = false;\r\n sec.ShowRemediation = true;\r\n });\r\n $.each(data.RS_2, function (idx, q) {\r\n q.CourseId = $scope.CourseId;\r\n q.ChapterId = $scope.ChapterId;\r\n q.TopicId = $scope.TopicId;\r\n q.SubTopicId = $scope.SubTopicId;\r\n if (!$scope.Sections[q.SectionIndex - 1].Questions) {\r\n $scope.Sections[q.SectionIndex - 1].Questions = [];\r\n }\r\n if (q.IsCorrect == \"True\") {\r\n q.QuestionClass = \"CorrectQuestion\";\r\n q.Remediation = q.CorrectRemediation;\r\n } else {\r\n q.QuestionClass = \"IncorrectQuestion\";\r\n q.Remediation = q.IncorrectRemediation;\r\n }\r\n q.SelectedAnswers = q.SelectedAnswerIdArray.split(\",\");\r\n if (q.AnswersJSON != null && q.AnswersJSON != '') {\r\n try {\r\n q.Answers = JSON.parse(q.AnswersJSON);\r\n angular.forEach(q.Answers, function(ans){\r\n ans.HTML = ans.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&');\r\n\r\n })\r\n }\r\n catch (err) {\r\n ////////console.log(q.QuestionId)\r\n ////////console.log(err.message);\r\n ////////console.log(\"Value\" + q.AnswersJSON);\r\n }\r\n //////console.log(q.Answers)\r\n } else {\r\n $http.get(\"/LMSData.svc/Questions(\" + q.QuestionId + \"L)/Answers\").success(function (data) {\r\n //////////console.log(q.QuestionId + \" No Answer\")\r\n //////////console.log(data.d)\r\n q.Answers = data.d;\r\n $.each(q.Answers, function (ai, a) {\r\n a.UserSelected = false;\r\n a.UserSelectedClass = \"ScripuserSelectedFalse\";\r\n for (i = 0; i < q.SelectedAnswers.length; i++) {\r\n if (a.Id == q.SelectedAnswers[i]) {\r\n a.UserSelected = true;\r\n a.UserSelectedClass = \"ScripuserSelectedTrue\";\r\n }\r\n }\r\n a.HTML = a.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&');\r\n\r\n });\r\n });\r\n //////////console.log(q.QuestionId + \" No Answer\")\r\n }\r\n //if (!q.Answers) {\r\n // alert(q.AnswersJSON);\r\n //}\r\n\r\n if (q.Answers) {\r\n angular.forEach(q.Answers, function (a) {\r\n a.UserSelected = false;\r\n a.UserSelectedClass = \"ScripuserSelectedFalse\";\r\n for (i = 0; i < q.SelectedAnswers.length; i++) {\r\n if (a.Id == q.SelectedAnswers[i]) {\r\n a.UserSelected = true;\r\n a.UserSelectedClass = \"ScripuserSelectedTrue\";\r\n }\r\n }\r\n //////console.log(a.HTML)\r\n });\r\n }\r\n $scope.Sections[q.SectionIndex - 1].Questions.push(q);\r\n $scope.ShowMissedSectionQs = function (section) {\r\n section.showSection = !section.showSection;\r\n for (var i = section.Questions.length - 1; i >= 0; i--) {\r\n if (section.Questions[i].IsCorrect === \"True\") {\r\n section.Questions.splice(i, 1)\r\n }\r\n };\r\n }\r\n });\r\n\r\n\r\n });\r\n $scope.ShowAllSectionQs = function (section) {\r\n section.showSection = !section.showSection;\r\n\r\n };\r\n\r\n $scope.ShowAll = function (section) {\r\n var modalInstance = $modal.open({\r\n templateUrl: '/js/Eva/templates/ScripShowAll.htm',\r\n controller: function ($scope, $http, $rootScope, $modalInstance, items, App) {\r\n $scope.Section = items.Section;\r\n ////console.log($scope.Section)\r\n $.each($scope.Section.Questions, function (qidx, q) {\r\n if (q.Answers) {\r\n $.each(q.Answers, function (aidx, a) {\r\n if (a.HTML) {\r\n a.HTML = a.HTML.replace(/>/g, \">\");\r\n a.HTML = a.HTML.replace(/</g, \"<\");\r\n a.HTML = a.HTML.replace(/&#37;/g, \"%\");\r\n a.HTML = a.HTML.replace(/&/g, \"&\");\r\n } else {\r\n //////////console.log(a);\r\n a.HTML = a.AnswerText\r\n a.HTML = a.HTML.replace(/>/g, \">\");\r\n a.HTML = a.HTML.replace(/</g, \"<\");\r\n a.HTML = a.HTML.replace(/&#37;/g, \"%\");\r\n a.HTML = a.HTML.replace(/&/g, \"&\");\r\n }\r\n });\r\n }\r\n });\r\n $scope.checkQOrder()\r\n $scope.ok = function () {\r\n $modalInstance.close();\r\n };\r\n }\r\n ,\r\n resolve: { items: function () { return { Section: section, username: App.UserId } } }\r\n });\r\n modalInstance.result.then(function (selectedItem) {\r\n\r\n\r\n });\r\n }\r\n $scope.ShowAllSections = function () {\r\n $scope.ShowQs = !$scope.ShowQs;\r\n //////console.log($scope.ShowQs)\r\n }\r\n $scope.ShowEveryQuestion = function (assid) {\r\n $scope.ShowQs = true;\r\n $scope.ShowAlls = true\r\n //$scope.ListButton = false;\r\n $scope.Wait = true;\r\n //////console.log([assid, (($scope.custom == true) ? 1 : 0)])\r\n $http.post(\"/Execute/GetUserAssessmentQuestions\", [assid,(($scope.custom == true) ? 1 : 0)]).success(function (data) {\r\n $scope.Wait = false;\r\n $scope.Questions = data.RS_0;\r\n \r\n angular.forEach($scope.Questions, function (q) {\r\n q.CourseId = $scope.CourseId;\r\n q.ChapterId = $scope.ChapterId;\r\n q.TopicId = $scope.TopicId;\r\n q.SubTopicId = $scope.SubTopicId;\r\n q.Answers = JSON.parse(q.AnswersJSON);\r\n q.SelectedAnswerIds = q.SelectedAnswerIdArray.split(\",\");\r\n if (q.src == '0') {\r\n q.IsCustom = true\r\n }\r\n else {\r\n q.IsCustom = false\r\n }\r\n angular.forEach(q.Answers, function (Answer) {\r\n Answer.Selected = false;\r\n Answer.HTML = Answer.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&');\r\n if (q.SelectedAnswerIds) {\r\n angular.forEach(q.SelectedAnswerIds, function (id) {\r\n if (Answer.Id == id) {\r\n Answer.Selected = true;\r\n }\r\n });\r\n }\r\n });\r\n });\r\n $scope.checkQOrder()\r\n //console.log('UAQ Every', $scope.Questions);\r\n $scope.FlagQuestion = function (ques) {\r\n //if (idx < 0) {\r\n // idx = $scope.UserAssessment.Questions.length - 1\r\n //}\r\n //$scope.SelectQuestionIdx = idx;\r\n //$scope.SelectedQuestion = $scope.UserAssessment.Questions[idx];\r\n //console.log(assid, ques.Id, (($scope.custom == true) ? 1 : 0))\r\n $http.post(\"/Execute/FlagQuestion\", $scope.id, ques.Id, (($scope.custom == true) ? 1 : 0)).success(function (dta) {\r\n //console.log('Question Flagged')\r\n })\r\n }\r\n });\r\n }\r\n $scope.ShowMissedQuestions = function (assid) {\r\n $scope.ShowQs = true;\r\n $scope.ShowAlls = false\r\n //$scope.ListButton = false;\r\n $scope.Wait = true;\r\n $http.post(\"/Execute/GetUserAssessmentQuestions\", [assid, (($scope.custom == true) ? 1 : 0)]).success(function (data) {\r\n $scope.Wait = false;\r\n $scope.Questions = data.RS_0;\r\n for (var i = $scope.Questions.length - 1; i >= 0; i--) {\r\n if ($scope.Questions[i].IsCorrect === \"True\") {\r\n $scope.Questions.splice(i, 1)\r\n }\r\n }\r\n // //////////console.log($scope.Questions);\r\n angular.forEach($scope.Questions, function (q, index) {\r\n q.CourseId = $scope.CourseId;\r\n q.ChapterId = $scope.ChapterId;\r\n q.TopicId = $scope.TopicId;\r\n q.SubTopicId = $scope.SubTopicId;\r\n q.Answers = JSON.parse(q.AnswersJSON);\r\n q.SelectedAnswerIds = q.SelectedAnswerIdArray.split(\",\");\r\n if (q.src == '0') {\r\n q.IsCustom = true\r\n }\r\n else {\r\n q.IsCustom = false\r\n }\r\n angular.forEach(q.Answers, function (Answer) {\r\n Answer.Selected = false;\r\n if (q.SelectedAnswerIds) {\r\n angular.forEach(q.SelectedAnswerIds, function (id) {\r\n if (Answer.Id == id) {\r\n Answer.Selected = true;\r\n }\r\n });\r\n }\r\n });\r\n });\r\n //console.log('UAQ Missed', $scope.Questions);\r\n $scope.checkQOrder()\r\n });\r\n\r\n }\r\n $scope.toggleShowQs = function () {\r\n $scope.ShowQs = !$scope.ShowQs;\r\n }\r\n $scope.NavigateTo = function (courseid, chapterid, topicid, subtopicid, assessmentid) {\r\n //$modalInstance.close(\"AbortReload\");\r\n $window.location.href = \"/QuestionPool/\" + assessmentid + \"/\" + courseid + \"/\" + chapterid + \"/\" + topicid + \"/Practice\";\r\n }\r\n $scope.ok = function () {\r\n $modalInstance.close();\r\n };\r\n $scope.cancel = function () {\r\n $modalInstance.close(false);\r\n $location.hash('anchoruser' + $scope.UserAssessment.Id);\r\n $anchorScroll();\r\n };\r\n },\r\n link: function($scope,element,attrs) {\r\n var watch = $scope.$watch('Questions', function() {\r\n $scope.$evalAsync(function() {\r\n\r\n $scope.PopLinkies();\r\n\r\n })\r\n })\r\n\r\n }\r\n }\r\n});\r\napp.directive('minicart', function ($parse, $rootScope, $http, $cookies, $cookieStore, $window, dataService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/minicart.htm',\r\n controller: function ($scope, $rootScope, $sce, $filter, $http, $cookies, dataService) {\r\n $scope.User = $rootScope.User;\r\n $scope.Cart = $cookies.getObject('Cart');\r\n $scope.EmptyCart = function () {\r\n $scope.Cart = Globals.CartTemplate();\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n\r\n $scope.RemoveFromCart = function (itm) {\r\n var index = -1\r\n angular.forEach($scope.Cart.Items, function (prd, idx) {\r\n if (prd.Id == itm.Id) {\r\n index = idx;\r\n }\r\n });\r\n\r\n if (index > -1) {\r\n $scope.Cart.Items.splice(index, 1);\r\n }\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n $scope.$on('CartChanged', function (event, data) {\r\n $scope.Cart = data;\r\n });\r\n }\r\n }\r\n});\r\napp.directive('cart', function ($parse, $http, $cookies, $cookieStore, $window, $location, $rootScope, dataService) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/cart.htm',\r\n scope: {\r\n cartObject: '=?',\r\n forcheckout: '='\r\n }, controller: function ($scope, $rootScope, $window, $location, $sce, $http, $cookies, dataService) {\r\n if(!$rootScope.User.UserName){\r\n $window.location.href='/auth.html?returnurl=/cart';\r\n }\r\n $scope.searchObj = $location.search();\r\n $scope.Cart = $cookies.getObject('Cart');\r\n $scope.$watch('Cart', function (cart) {\r\n $cookies.putObject('Cart', cart, {'domain':'challengercme.com'});\r\n dataService.Cart = cart;\r\n $scope.$emit('CartChanged', cart);\r\n });\r\n $scope.$on('CheckOut', function (event, data) {\r\n $scope.CheckOut = data;\r\n });\r\n $scope.$on('BuyNow', function (event, data) {\r\n $scope.RemoveFromCart(data)\r\n $scope.GoCheckOut();\r\n });\r\n $scope.$on('CartChanged', function (event, data) {\r\n $scope.Cart = data;\r\n });\r\n if (!$scope.Cart || typeof ($scope.Cart) === \"undefined\") {\r\n $scope.Cart = { \"Items\": [], \"TotalCount\": 0, \"TotalPrice\": 0 };\r\n }\r\n $scope.GoCheckOut = function () {\r\n $scope.CheckOut = true;\r\n $scope.$emit('CheckOut', $scope.CheckOut);\r\n $location.url('/checkout')\r\n }\r\n $scope.RemoveFromCart = function (itm) {\r\n var index = -1\r\n angular.forEach($scope.Cart.Items, function (prd, idx) {\r\n if (prd.Id == itm.Id) {\r\n index = idx;\r\n }\r\n });\r\n\r\n if (index > -1) {\r\n $scope.Cart.Items.splice(index, 1);\r\n }\r\n //////console.log($scope.Cart);\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n $scope.EmptyCart = function () {\r\n $scope.Cart.Items = [];\r\n $cookies.putObject('Cart', $scope.Cart, {'domain':'challengercme.com'});\r\n $scope.$emit('CartChanged', $scope.Cart);\r\n $rootScope.$broadcast('CartChanged', $scope.Cart);\r\n }\r\n },\r\n link: function (scope, http, element, attrs) {\r\n var chkout = getQueryVariable(\"chkout\")\r\n if (chkout == 1) { scope.CheckOut = true; }\r\n\r\n }\r\n }\r\n});\r\napp.directive('premiumPromo', function ($parse, $http, $compile, $window, $location) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/premium-promo.html',\r\n controller: function($scope,$rootScope,$http) {\r\n\r\n }\r\n }\r\n});\r\napp.directive('addassessment', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/AddAssessment.htm',\r\n scope: {\r\n courseid: '=',\r\n chapterid: '=',\r\n topicid: '=',\r\n subtopic: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.Label = '';\r\n $scope.addAssessment = false\r\n if ($scope.subtopicid == '' || $scope.subtopicid == null) {\r\n $scope.Label = 'SubTopic'\r\n if ($scope.topicid == '' || $scope.topicid == null) {\r\n $scope.Label = 'Topic'\r\n if ($scope.chapterid == '' || $scope.chapterid == null) {\r\n $scope.Label = 'Chapter'\r\n if ($scope.courseid == '' || $scope.courseid == null) {\r\n $scope.Label = 'Course'\r\n }\r\n }\r\n }\r\n }\r\n $scope.toggleAdd = function (obj) {\r\n $scope.addAssessment = true;\r\n \r\n }\r\n $scope.cancel = function () {\r\n $scope.addAssessment = false;\r\n }\r\n $scope.NewAssessment = []\r\n params = []\r\n params[0] = 1\r\n $http.post(\"/Execute/GetExtendedQPInfo\", params).success(function (data) {\r\n $scope.NewAssessment.AssessmentTypeId = data.RS_0[0].AssessmentTypeId;\r\n $scope.NewAssessment.Extended = {}\r\n $scope.AssessmentTypes = data.RS_1;\r\n $.each($scope.AssessmentTypes, function (idx, at) {\r\n if ($scope.NewAssessment.AssessmentTypeId == at.Id) {\r\n $scope.NewAssessment.AssessmentType = at;\r\n }\r\n });\r\n\r\n $scope.NewAssessment.CMEValues = data.RS_2;\r\n \r\n });\r\n\r\n }\r\n }\r\n})\r\napp.directive('addobject', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/AddObject.htm',\r\n scope: {\r\n courseid: '=',\r\n chapterid: '=',\r\n topicid: '=',\r\n subtopic: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.Label = '';\r\n $scope.addObject = false\r\n if ($scope.subtopicid == '' || $scope.subtopicid == null) {\r\n $scope.Label = 'SubTopic'\r\n if ($scope.topicid == '' || $scope.topicid == null) {\r\n $scope.Label = 'Topic'\r\n if ($scope.chapterid == '' || $scope.chapterid == null) {\r\n $scope.Label = 'Chapter'\r\n if ($scope.courseid == '' || $scope.courseid == null) {\r\n $scope.Label = 'Course'\r\n }\r\n }\r\n }\r\n }\r\n $scope.toggleAdd = function (obj) {\r\n $scope.addObject = true;\r\n \r\n }\r\n $scope.cancel = function () {\r\n $scope.addObject = false;\r\n }\r\n $scope.AddObject = function (newObject) {\r\n //$scope.Debug = \"working on it...\"\r\n var cc = {};\r\n Object.DisplayClass = \"chapter_closed\";\r\n Object.DisplayChildren = false;\r\n Object.CourseId = $scope.courseid ? $scope.courseid : 0;\r\n Object.ChapterId = $scope.chapterid ? $scope.chapterid : 0;\r\n Object.TopicId = $scope.topicid ? $scope.topicid : 0;\r\n Object.SubTopicId = $scope.topicid ? $scope.topicid : 0;\r\n Object.Name = newObject.Name;\r\n Object.Chapter.Description = newObject.Description;\r\n Object.Chapter.HTML = \"Click the \\\"Edit Chapter\\\" Button Above\";\r\n Object.Chapter.__metadata = {};\r\n $http.post('https://editor/challengercme.com/LMSData.svc/' + $scope.Label + 's', Object.Name, Object.Description, Object.HTML).success(function (data) {\r\n //console.log(data)\r\n cc.Chapters_Id = data.d.Id;\r\n $scope.Course.CourseChapters.push(cc);\r\n var srt = $scope.Course.CourseChapters.indexOf(cc) + 1;\r\n var dta = {};\r\n dta.Course_Id = $scope.Course.Id.toString();\r\n dta.Chapters_Id = cc.Chapters_Id.toString();\r\n dta.SortOrder = srt.toString();\r\n $scope.Debug = JSON.stringify(dta);\r\n $http.post(\"https://editor.challengercme.com/LMSData.svc/CourseChapters\", dta).success(function (data) {\r\n //console.log(data)\r\n app.content = '

Chapter has been Added

Select the Chapter in the navigation Tree to Edit';\r\n });\r\n });\r\n }\r\n\r\n }\r\n }\r\n})\r\napp.directive('sendforreview', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/sendforreview.htm',\r\n scope: {\r\n assessid: '=',\r\n buttontext: '=',\r\n buttonclass: '=',\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n \r\n $scope.buttontexticon = ' ' + $scope.buttontext\r\n //if ($scope.buttontext == null) {\r\n // $scope.buttontext = ''\r\n // $scope.buttonclass = false\r\n //}\r\n //else {\r\n // $scope.buttontext = ' ' + $scope.buttontext\r\n // $scope.buttonclass = true\r\n //}\r\n //console.log($scope.buttontext)\r\n $scope.contentreview = function (assessid) {\r\n var newsubModal = $uibModal.open({\r\n templateUrl: 'app/tpls/contentreviewmodal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n //console.log(assessid)\r\n $scope.authorfilter = ''\r\n $scope.label = function (name, role) {\r\n return name + ' - ' + role\r\n }\r\n $scope.Authors = [\r\n \r\n {\r\n Name: 'A. Eberly',\r\n Role: ['Author', 'Peer Reviewer']\r\n },\r\n {\r\n Name: 'J. Smith',\r\n Role: ['Author']\r\n },\r\n {\r\n Name: 'C. California',\r\n Role: ['Peer Reviewer']\r\n },\r\n {\r\n Name: 'A. Alaska',\r\n Role: ['Proofer']\r\n },\r\n {\r\n Name: 'F. Blanton',\r\n Role: ['Content Dev']\r\n }\r\n\r\n ]\r\n $scope.SetOverride = false\r\n $scope.task = []\r\n $scope.settask = function (role) {\r\n $scope.task = role[0]\r\n //console.log(role)\r\n }\r\n //console.log($scope.Authors)\r\n $http.get(\"/api/Assessments(\" + assessid + \"L)/Sections\").success(function (data) {\r\n\r\n $scope.Sections = data.d\r\n //console.log($scope.Sections)\r\n });\r\n $scope.cancel = function () {\r\n newsubModal.close(false);\r\n };\r\n $scope.submit = function () {\r\n newsubModal.close(false);\r\n };\r\n }\r\n })\r\n\r\n }\r\n\r\n \r\n }\r\n }\r\n})\r\napp.directive('contentreviewlist', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/contentreviewlist.htm',\r\n scope: { \r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n \r\n $scope.PageSizes = [\"5\", \"10\", \"30\", \"50\"]\r\n $scope.PageSize = $scope.PageSizes[1];\r\n $scope.specialtyFilterList = [\r\n {\r\n \"Name\": \"All\",\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"Emergency Medicine\",\r\n \"Value\": \"Emergency Medicine\"\r\n },\r\n {\r\n \"Name\": \"Family Medicine\",\r\n \"Value\": \"Family Medicine\"\r\n },\r\n {\r\n \"Name\": \"Internal Medicine\",\r\n \"Value\": \"Internal Medicine\"\r\n }\r\n ]\r\n $scope.contentFilterList = [\r\n {\r\n \"Name\": \"All\",\r\n \"Value\": \"$\"\r\n },\r\n \r\n {\r\n \"Name\": \"Content\",\r\n \"Value\": \"Content\"\r\n },\r\n {\r\n \"Name\": \"Category\",\r\n \"Value\": \"Category\"\r\n },\r\n {\r\n \"Name\": \"Courses\",\r\n \"Value\": \"Courses\"\r\n },\r\n {\r\n \"Name\": \"Author\",\r\n \"Value\": \"Author\"\r\n },\r\n {\r\n \"Name\": \"Peer Reviewer\",\r\n \"Value\": \"Peer Reviewer\"\r\n },\r\n {\r\n \"Name\": \"Proofer\",\r\n \"Value\": \"Proofer\"\r\n },\r\n {\r\n \"Name\": \"Sent\",\r\n \"Value\": \"Sent\"\r\n },\r\n {\r\n \"Name\": \"Due\",\r\n \"Value\": \"Due\"\r\n },\r\n {\r\n \"Name\": \"Received\",\r\n \"Value\": \"Received\"\r\n },\r\n {\r\n \"Name\": \"Peer Reviewed\",\r\n \"Value\": \"Peer Reviewed\"\r\n },\r\n {\r\n \"Name\": \"Proofed\",\r\n \"Value\": \"Proofed\"\r\n },\r\n {\r\n \"Name\": \"Tagged\",\r\n \"Value\": \"Tagged\"\r\n },\r\n {\r\n \"Name\": \"Published\",\r\n \"Value\": \"Published\"\r\n },\r\n {\r\n \"Name\": \"Guideline\",\r\n \"Value\": \"Guideline\"\r\n },\r\n {\r\n \"Name\": \"Message Sent\",\r\n \"Value\": \"Message Sent\"\r\n },\r\n {\r\n \"Name\": \"Notes\",\r\n \"Value\": \"Notes\"\r\n }\r\n ]\r\n $scope.contentfilter = ''\r\n $scope.sortProperty = 'Category'\r\n $scope.reverse = false\r\n $scope.SortBy = function (property) {\r\n $scope.reverse = !$scope.reverse\r\n $scope.sortProperty = property\r\n $scope.ContentTrackerFiltered = $filter('orderBy')($scope.ContentTrackerFiltered, $scope.sortProperty, $scope.reverse)\r\n \r\n //console.log($scope.sortProperty)\r\n }\r\n \r\n $scope.ContentTracker = [\r\n {\r\n \"Id\": \"44832\",\r\n \"Content\": \"Abdominal Pain\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Savage\",\r\n \"PeerReviewer\": \"Smith\",\r\n \"Proofer\": \"Jones\",\r\n \"Sent\": \"12/1/2014\",\r\n \"Due\": \"12/22/2014\",\r\n \"Received\": \"12/27/2014\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/9/2015\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"2/9/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"11/22 Qs have outdated refs/no refs/no remediation\"\r\n },\r\n {\r\n \"Content\": \"Acute Pelvic Pain in Women\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"\",\r\n \"Received\": \"\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Acute Vaginal Bleeding\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"\",\r\n \"Received\": \"\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Back Pain\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"\",\r\n \"Received\": \"\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Chest Pain\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Eberly\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"5/30/2017\",\r\n \"Received\": \"5/31/2017\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"6/15/2017\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"7/17/2017\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Confusion\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Darracq\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"1/26/2015\",\r\n \"Received\": \"1/21/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"3/3/2015\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"3/4/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Constipation\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Sud\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"7/24/2015\",\r\n \"Received\": \"7/20/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"7/30/2015\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"8/12/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Cyanosis\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Collins\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"1/1/2015\",\r\n \"Received\": \"1/9/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/9/2015\",\r\n \"Tagged\": \"4/17/2017\",\r\n \"Published\": \"2/9/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date. Only 1 Q is missing a dated ref\"\r\n },\r\n {\r\n \"Content\": \"Depressed Consciousness and Coma\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Darracq\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"11/7/2014\",\r\n \"Received\": \"11/6/2014\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"12/9/2014\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"12/10/2014\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Diarrhea\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Darracq\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"8/6/2015\",\r\n \"Received\": \"9/2/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"10/8/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"10/8/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Dizziness and Vertigo\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Darracq\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"2/4/2015\",\r\n \"Received\": \"2/2/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"3/3/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"3/4/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Dyspnea\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Collins\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"2/1/2015\",\r\n \"Received\": \"2/2/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"3/4/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"3/4/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Fever in the Adult Patient\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Stewart\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"2/9/2015\",\r\n \"Received\": \"2/9/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"3/3/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"3/4/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Gastrointestinal Bleeding\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Savage\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"11/7/2014\",\r\n \"Received\": \"11/3/2014\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"12/8/2014\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"12/10/2014\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Headache: Initial Approach\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Collins\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"7/30/2015\",\r\n \"Received\": \"7/30/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"8/14/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"8/19/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Hemoptysis\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Collins\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"10/20/2015\",\r\n \"Received\": \"10/22/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"1/2/2016\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"3/28/2016\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Jaundice\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Darracq\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"10/1/2014\",\r\n \"Received\": \"10/13/2014\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"12/8/2014\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"12/11/2014\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date. Only 1 Q has an outdated ref\"\r\n },\r\n {\r\n \"Content\": \"Nausea and Vomiting\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Sud\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"7/7/2015\",\r\n \"Received\": \"7/8/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"7/29/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"7/30/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Seizures: Initial Approach\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"\",\r\n \"Received\": \"\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Syncope\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Savage\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"8/21/2015\",\r\n \"Received\": \"8/19/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"11/9/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Weakness\",\r\n \"Specialty\": \"Emergency Medicine\",\r\n \"Category\": \"Signs, Symptoms, & Presentations\",\r\n \"CoursesContained\": \"PA, Urgent Care, ENP, USMLE, PA CAQ EM, Med School Clerkships\",\r\n \"Author\": \"Collins\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"9/2/2015\",\r\n \"Received\": \"9/2/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"9/15/2015\",\r\n \"Tagged\": \"4/18/2017\",\r\n \"Published\": \"9/15/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"\"\r\n },\r\n {\r\n \"Content\": \"Congenital Heart Disease in the Adult\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"\",\r\n \"Author\": \"Lazar\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"1/4/2016\",\r\n \"Received\": \"12/30/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/9/2016\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"3/22/2016\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Congestive Heart Failure\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX\",\r\n \"Author\": \"Akin\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"12/11/2017\",\r\n \"Received\": \"12/11/2017\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/24/2018\",\r\n \"Tagged\": \"4/20/2018\",\r\n \"Published\": \"4/19/2018\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Dysrhythmias/Conduction Defects\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"\",\r\n \"Author\": \"Sen\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"12/4/2015\",\r\n \"Received\": \"11/25/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"1/5/2016\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"1/6/2016\",\r\n \"Guideline\": \"2016 ACC/AHA Clinical Performance and Quality Measures for Adults With Atrial Fibrillation or Atrial Flutter\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Updated in 2015, but note 2016 ACC/AHA guideline \"\r\n },\r\n {\r\n \"Content\": \"Endocarditis\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX\",\r\n \"Author\": \"Stueben\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"2/5/2017\",\r\n \"Received\": \"2/5/2017\",\r\n \"PeerReviewed\": \"2/6/2018\",\r\n \"Proofed\": \"3/19/2018\",\r\n \"Tagged\": \"5/9/2018\",\r\n \"Published\": \"5/9/2018\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Hypertension\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX, NP:FPC\",\r\n \"Author\": \"Williams\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"5/17/2017\",\r\n \"Received\": \"5/29/2017\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"6/15/2017\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"9/6/2017\",\r\n \"Guideline\": \"ACP/AAFP Pharmacologic Treatment of Hypertension in Older Adults\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Ischemic Heart Disease\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"\",\r\n \"Author\": \"Sen\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"12/29/2015\",\r\n \"Received\": \"12/29/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/12/2016\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"4/1/2016\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Myocardial Disease\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX\",\r\n \"Author\": \"Williams\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"1/29/2018\",\r\n \"Received\": \"2/1/2018\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"2/25/2018\",\r\n \"Tagged\": \"4/20/2018\",\r\n \"Published\": \"4/20/2018\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Pediatric Cardiovascular Disorders\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX, NP:FPC\",\r\n \"Author\": \"Kiernan\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"3/6/2018\",\r\n \"Received\": \"3/4/2018\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"4/11/2018\",\r\n \"Tagged\": \"4/20/2018\",\r\n \"Published\": \"4/20/2018\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Pericardial Disease\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"\",\r\n \"Author\": \"Cama\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"4/23/2015\",\r\n \"Received\": \"4/27/2015\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"5/12/2015\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"5/21/2015\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Valvular Heart Disease\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"\",\r\n \"Author\": \"Williams\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"5/16/2017\",\r\n \"Received\": \"5/3/2017\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"\",\r\n \"Tagged\": \"\",\r\n \"Published\": \"5/8/2017\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n },\r\n {\r\n \"Content\": \"Vascular Disease\",\r\n \"Specialty\": \"Family Medicine\",\r\n \"Category\": \"Cardiovascular Disorders\",\r\n \"CoursesContained\": \"PA, SPEX\",\r\n \"Author\": \"Yoffe\",\r\n \"PeerReviewer\": \"\",\r\n \"Proofer\": \"\",\r\n \"Sent\": \"\",\r\n \"Due\": \"2/2/2018\",\r\n \"Received\": \"2/1/2018\",\r\n \"PeerReviewed\": \"\",\r\n \"Proofed\": \"4/12/2018\",\r\n \"Tagged\": \"4/24/2018\",\r\n \"Published\": \"4/23/2018\",\r\n \"Guideline\": \"\",\r\n \"MessageSent\": \"\",\r\n \"Notes\": \"Up to date\"\r\n }\r\n ]\r\n $scope.ContentTrackerFiltered = $scope.ContentTracker\r\n $scope.TotalCount = $scope.ContentTracker.length\r\n $scope.filterlist = $scope.contentFilterList[0].Value\r\n $scope.specialtyfilter = $scope.specialtyFilterList[0].Value\r\n $scope.filterselect = function (field, val) {\r\n\r\n $scope.ContentTrackerFiltered = $filter('filter')($scope.ContentTracker, { field: val })\r\n }\r\n }\r\n }\r\n})\r\napp.directive('editqpcme', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/EditQPCME.htm',\r\n scope: {\r\n assessmentid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n \r\n\r\n\r\n \r\n $http.get(\"/api/Assessments(\" + $scope.assessmentid + \"L)/CMETypeValues\").success(function (data) {\r\n $scope.CMETypeValues = data.d\r\n\r\n angular.forEach($scope.CMETypeValues, function (cme) {\r\n $http.get(\"/api/CMETypeValues(\" + cme.Id + \")/CMEType\").success(function (data) {\r\n cme.Name = data.d.Name\r\n })\r\n })\r\n //console.log($scope.CMETypeValues)\r\n });\r\n \r\n\r\n\r\n\r\n }\r\n }\r\n})\r\napp.directive('editassessment', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/EditAssessment.htm',\r\n scope: {\r\n assessmentid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n $http.get(\"/api/Assessments(\" + $scope.assessmentid + \"L)/Sections\").success(function (data) {\r\n\r\n $scope.Sections = data.d\r\n ////console.log($scope.Sections)\r\n })\r\n params = []\r\n params[0] = $scope.assessmentid\r\n $http.post(\"/Execute/GetExtendedQPInfo\", params).success(function (data) {\r\n \r\n \r\n $scope.Type = data.RS_0[0]\r\n $scope.TypeAssess = $scope.Type.AssessmentTypeId\r\n\r\n $scope.AssessmentTypes = data.RS_1\r\n //console.log($scope.TypeAssess)\r\n //console.log($scope.AssessmentTypes)\r\n //$scope.NewAssessment.AssessmentTypeId = data.RS_0[0].AssessmentTypeId;\r\n //$scope.NewAssessment.Extended = {}\r\n //$scope.AssessmentTypes = data.RS_1;\r\n //$.each($scope.AssessmentTypes, function (idx, at) {\r\n // if ($scope.NewAssessment.AssessmentTypeId == at.Id) {\r\n // $scope.NewAssessment.AssessmentType = at;\r\n // }\r\n //});\r\n $http.get(\"/api/Assessments(\" + $scope.assessmentid + \"L)/CMETypeValues\").success(function (data) {\r\n $scope.CMETypeValues = data.d\r\n \r\n angular.forEach($scope.CMETypeValues, function (cme) {\r\n $http.get(\"/api/CMETypeValues(\" + cme.Id + \")/CMEType\").success(function (data) {\r\n cme.Name = data.d.Name\r\n })\r\n })\r\n //console.log($scope.CMETypeValues)\r\n });\r\n //$scope.NewAssessment.CMEValues = data.RS_2;\r\n $scope.AssessLevel = \"\"\r\n if ($scope.TypeAssess == '4') {\r\n $scope.AssessLevel = 'TopicAssessments'\r\n }\r\n else {\r\n $scope.AssessLevel = 'ChapterAssessments'\r\n }\r\n\r\n $http.get(\"/api/Assessments(\" + $scope.assessmentid + \"L)/\" + $scope.AssessLevel + \"\").success(function (data) {\r\n $scope.Show = data.d[0]\r\n //console.log($scope.Show)\r\n\r\n });\r\n });\r\n \r\n \r\n \r\n }\r\n }\r\n})\r\napp.directive('editsection', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/EditSection.htm',\r\n scope: {\r\n sectionid: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n $http.get(\"/api/Sections(\" + $scope.sectionid + \"L)\").success(function (data) {\r\n $scope.Section = data.d\r\n //console.log($scope.Section)\r\n $scope.Section.newQ = false\r\n $http.get(\"/api/Sections(\" + $scope.sectionid + \"L)/SectionQuestions?$expand=Question\").success(function (data) {\r\n\r\n $scope.SectionQs = data.d\r\n angular.forEach($scope.SectionQs, function (sq) {\r\n sq.Selected = false\r\n if (sq.Question.LastReview) {\r\n sq.Question.LastReview = new Date(parseInt(sq.Question.LastReview.substr(6)))\r\n }\r\n })\r\n // //console.log($scope.SectionQs)\r\n $scope.RemoveSelectedQs = function () {\r\n $scope.SectionQs = $filter('filter')($scope.SectionQs, {Selected: false})\r\n }\r\n $scope.ToggleReview = function (ques) {\r\n if (ques.LastReview !== null) {\r\n ques.LastReview = null\r\n }\r\n else {\r\n ques.LastReview = new Date()\r\n }\r\n //console.log(ques.LastReview)\r\n\r\n }\r\n });\r\n \r\n $scope.editSect = function () {\r\n $scope.Section.editSec = !$scope.Section.editSec\r\n \r\n }\r\n $scope.editSectQCount = function () {\r\n $scope.Section.editSecQCount = !$scope.Section.editSecQCount\r\n\r\n }\r\n $scope.AddQuestion\r\n\r\n })\r\n\r\n\r\n }\r\n }\r\n})\r\napp.directive('editquestion', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/EditQuestion.htm',\r\n scope: {\r\n questionid: '=',\r\n editq: '='\r\n },\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.User = $rootScope.User;\r\n $scope.SelectMe = function (me) {\r\n me.Selected = !me.Selected\r\n }\r\n $http.get(\"/api/Questions(\" + $scope.questionid + \"L)\").success(function (data) {\r\n //console.log(data.d)\r\n $scope.Question = data.d\r\n $scope.Question.editq = $scope.editq;\r\n $scope.Question.OneRemediation = true\r\n $http.get(\"/api/Questions(\" + $scope.questionid + \"L)/Answers\").success(function (data) {\r\n $scope.Question.Answers = data.d\r\n });\r\n $http.get(\"/api/Questions(\" + $scope.questionid + \"L)/Tags\").success(function (data) {\r\n $scope.Question.Tags = data.d\r\n });\r\n $scope.qProps($scope.Question)\r\n });\r\n if ($scope.questionid == '' || $scope.questionid == 0) {\r\n \r\n $scope.Question = {};\r\n $scope.Question.Answers = [];\r\n $scope.Question.CorrectRemediation = \"\";\r\n $scope.Question.IncorrectRemediation = \"\";\r\n $scope.Question.Keywords = \"\";\r\n $scope.Question.CaseBased = false;\r\n $scope.Question.Tags = [];\r\n $scope.Question.Flagged = false;\r\n $scope.Question.LastReview = null;\r\n $scope.Question.LastReviewBy = null;\r\n $scope.Question.PhysicianTask = $scope.PhysicianTasks[0];\r\n $scope.Question.DifficultyLevel = $scope.DifficultyLevels[0];\r\n $scope.Question.SpecialPopulation = $scope.SpecialPopulations[0];\r\n $scope.Question.Id = 0\r\n $scope.qProps($scope.Question)\r\n }\r\n $scope.qProps = function (q) {\r\n var params = []\r\n params[0] = q.Id\r\n $http.post(\"/Execute/GetQuestionProperties\", params).success(function (dta) {\r\n //alert(dump(dta));\r\n $scope.PhysicianTasks = dta.RS_0;\r\n $scope.SpecialPopulations = dta.RS_1;\r\n $scope.DifficultyLevels = dta.RS_2;\r\n $http.get(\"/api/QuestionTagGroups?$expand=QuestionTags\").success(function (data) {\r\n $scope.QuestionTagCategories = data.d;\r\n $scope.CurrentQuestionTagCategory = $scope.QuestionTagCategories[0];\r\n });\r\n });\r\n }\r\n }\r\n \r\n }\r\n})\r\napp.directive('searchmedia', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/SearchMedia.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.searchFor = 'none';\r\n $scope.searchAudio = function () {\r\n $scope.searchFor = 'audio'\r\n //console.log($rootScope.searchFor);\r\n }\r\n $scope.searchVideo = function () {\r\n $scope.searchFor = 'video'\r\n //console.log($rootScope.searchFor);\r\n }\r\n $scope.searchImage = function () {\r\n $scope.searchFor = 'image'\r\n //console.log($rootScope.searchFor);\r\n }\r\n $scope.searchFile = function () {\r\n $scope.searchFor = 'file'\r\n //console.log($rootScope.searchFor);\r\n }\r\n $scope.BackToMain = function () {\r\n $scope.searchFor = 'none'\r\n //console.log($scope.searchFor)\r\n }\r\n }\r\n }\r\n})\r\napp.directive('searchfiles', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/SearchFiles.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.smallList = false;\r\n $scope.perPage = 5;\r\n $scope.searchFor = 'files';\r\n $scope.BackToMain = function () {\r\n $rootScope.searchFor = 'none'\r\n //console.log($rootScope.searchFor)\r\n }\r\n $scope.init = function () {\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n $scope.Criteria = {};\r\n $scope.Criteria.Name = '';\r\n $scope.Criteria.Description = '';\r\n $scope.Criteria.Keywords = '';\r\n $scope.Criteria.Label = '';\r\n $scope.Criteria.Caption = '';\r\n $scope.Criteria.Source = '';\r\n $scope.Criteria.OriginalFileName = '';\r\n $scope.Criteria.Resolution = '';\r\n $scope.Criteria.Username = \"\";\r\n $scope.SortFields = [{ \"Name\": \"Created Date\", \"Value\": \"AddedOn\" }, { \"Name\": \"Name\", \"Value\": \"Name\" }, { \"Name\": \"Size\", \"Value\": \"Size\" }];\r\n $scope.OrderBy = $scope.SortFields[0];\r\n $scope.SortDirections = [{ \"Name\": \"Ascending\", \"Value\": \"\" }, { \"Name\": \"Descending\", \"Value\": \"D\" }];\r\n $scope.OrderByDirection = $scope.SortDirections[1];\r\n var params = [];\r\n $http.post(\"/Execute/GetAvailableMediaTagsAndCategories\", params).success(function (data) {\r\n $scope.Categories = data.RS_2;\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n cat.Selected = false;\r\n });\r\n $scope.TagGroups = [];\r\n angular.forEach(data.RS_0, function (tg, tgidx) {\r\n var tagGroup = {}\r\n tagGroup.Tags = [];\r\n tagGroup.Id = tg.Id;\r\n tagGroup.Name = tg.Name;\r\n angular.forEach(data.RS_1, function (tag, tagidx) {\r\n if (tag.MediaTagGroupId == tg.Id) {\r\n var Tag = {}\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag)\r\n }\r\n });\r\n $scope.TagGroups.push(tagGroup);\r\n });\r\n //console.log($scope.TagGroups)\r\n $scope.SelectedCategory = $scope.Categories[0]\r\n $scope.SelectedTagGroup = $scope.TagGroups[0];\r\n ////console.log(data)\r\n //$scope.setPage(1);\r\n $scope.CurrentPage = 1;\r\n $scope.$watch('CurrentPage', function (o, n) {\r\n $scope.setPage($scope.CurrentPage);\r\n });\r\n });\r\n }\r\n $scope.init();\r\n $scope.maxSize = 10;\r\n $scope.files = [];\r\n $scope.ShowAddNew = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = true;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.HideAddNew = function () {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.SetCriteria = function () {\r\n $scope.SearchCriteriaVisible = true;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.ShowList = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.ExecuteSearch = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n var TagIds = [];\r\n angular.forEach($scope.TagGroups, function (tgidx, tg) {\r\n angular.forEach(tg.Tags, function (idx, t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n var params = [];\r\n params[0] = '2,3,5,7,8,9';\r\n params[1] = $scope.Criteria.Name;\r\n params[2] = $scope.Criteria.Description;\r\n params[3] = $scope.Criteria.Keywords;\r\n params[4] = $scope.Criteria.Label;\r\n params[5] = $scope.Criteria.Caption;\r\n params[6] = $scope.Criteria.Source;\r\n params[7] = $scope.Criteria.OriginalFileName;\r\n params[8] = $scope.Criteria.Resolution;\r\n params[9] = TagIds.join(\",\");\r\n params[10] = CatIds.join(\",\");\r\n params[11] = $scope.Criteria.Username;\r\n params[12] = $scope.OrderBy.Value;\r\n params[13] = $scope.OrderByDirection.Value;\r\n params[14] = $scope.CurrentPage;\r\n params[15] = $scope.perPage;\r\n ////console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SearchMediaPage\", params).success(function (data) {\r\n\r\n $scope.MediaList = data.RS_0;\r\n $scope.numPages = data.RS_1[0].TotalPages;\r\n $scope.TotalItems = data.RS_1[0].TotalCount;\r\n ////console.log($scope.MediaList)\r\n angular.forEach($scope.MediaList, function (itm, idx) {\r\n //itm.thumb = ''\r\n itm.Categories = angular.copy($scope.Categories)\r\n ////console.log(itm)\r\n //var SelectedCats = ((itm.CatArray == '') ? [] : itm.CatArray.split(','));\r\n angular.forEach(itm.Categories, function (idx, cat) {\r\n cat.Selected = false\r\n for (i = 0; i < SelectedCats.length; i++) {\r\n if (SelectedCats[i] == cat.Id) {\r\n cat.Selected = true;\r\n }\r\n }\r\n });\r\n itm.TagGroups = []\r\n var SelectedTags = ((itm.TagArray == '') ? [] : itm.TagArray.split(','));\r\n ////console.log($scope.TagGroups)\r\n angular.forEach($scope.TagGroups, function (tg, tgidx) {\r\n var TagGroup = {}\r\n TagGroup.Id = tg.Id;\r\n TagGroup.Name = tg.Name;\r\n TagGroup.Tags = [];\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n var Tag = {};\r\n Tag.Id = t.Id;\r\n Tag.Name = t.Name;\r\n Tag.Selected = false;\r\n for (i = 0; i < SelectedTags.length; i++) {\r\n if (SelectedTags[i] == Tag.Id) {\r\n Tag.Selected = true;\r\n }\r\n }\r\n TagGroup.Tags.push(Tag);\r\n });\r\n itm.TagGroups.push(TagGroup);\r\n });\r\n itm.SelectedTagGroup = itm.TagGroups[0];\r\n });\r\n //console.log($scope.MediaList)\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n });\r\n }\r\n $scope.SetDirty = function (media) {\r\n media.IsDirty = true;\r\n media.RowClass = \"dirty\";\r\n //alert(\"dirty\")\r\n }\r\n $scope.setFiles = function (element) {\r\n $scope.$apply(function () {\r\n $scope.ShowUploadButton = false;\r\n $scope.files = []\r\n for (var i = 0; i < element.files.length; i++) {\r\n if (element.files[i].type.match('image.*')) {\r\n ////console.log('files:', JSON.stringify(element.files[i]));\r\n var reader = new FileReader();\r\n reader.onload = (function (theFile) {\r\n return function (e) {\r\n var f = {};\r\n f.preview = [''].join('');\r\n f.name = theFile.name.split('.')[0];\r\n f.description = \"\";\r\n f.keywords = \"\";\r\n f.label = \"\";\r\n f.caption = \"\";\r\n f.source = \"\";\r\n f.filename = theFile.name;\r\n f.size = theFile.size;\r\n f.height = 0;\r\n f.width = 0;\r\n f.runtime = 0;\r\n f.resolution = \"\";\r\n f.file = theFile;\r\n f.TagGroups = [];\r\n $.each($scope.TagGroups, function (grpidx, grp) {\r\n var tagGroup = {}\r\n tagGroup.Id = grp.Id;\r\n tagGroup.Name = grp.Name;\r\n tagGroup.Tags = [];\r\n $.each(grp.Tags, function (idx, tag) {\r\n var Tag = {};\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag);\r\n });\r\n f.TagGroups.push(tagGroup);\r\n });\r\n f.SelectedTagGroup = f.TagGroups[0];\r\n f.Categories = [];\r\n $.each($scope.Categories, function (catidx, cat) {\r\n var category = {}\r\n category.Id = cat.Id;\r\n category.Name = cat.Name;\r\n category.Selected = false;\r\n f.Categories.push(category);\r\n });\r\n $scope.files.push(f);\r\n $scope.ShowUploadButton = true;\r\n $scope.$apply();\r\n };\r\n })(element.files[i]);\r\n reader.readAsDataURL(element.files[i]);\r\n }\r\n }\r\n $scope.progressVisible = false\r\n });\r\n }\r\n $scope.StartUpload = function () {\r\n var fd = new FormData();\r\n angular.forEach($scope.files, function (f, idx) {\r\n var TagIds = [];\r\n angular.forEach(f.TagGroups, function (tg) {\r\n angular.forEach(tg.Tags, function (t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(f.Categories, function (cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n fd.append(idx, f.file);\r\n fd.append(\"Name\" + idx, f.name);\r\n fd.append(\"Description\" + idx, f.description);\r\n fd.append(\"Username\" + idx, $rootScope.User.UserId);\r\n fd.append(\"Keywords\" + idx, f.keywords);\r\n fd.append(\"Label\" + idx, f.label);\r\n fd.append(\"Caption\" + idx, f.caption);\r\n fd.append(\"Source\" + idx, f.source);\r\n fd.append(\"Filename\" + idx, f.filename);\r\n fd.append(\"Size\" + idx, f.size);\r\n fd.append(\"Height\" + idx, f.height);\r\n fd.append(\"Width\" + idx, f.width);\r\n fd.append(\"Runtime\" + idx, f.runtime);\r\n fd.append(\"Resolution\" + idx, f.resolution);\r\n fd.append(\"Tags\" + idx, TagIds.join(\",\"));\r\n fd.append(\"Categories\" + idx, CatIds.join(\",\"));\r\n });\r\n $http.post(\"/MediaUpload\", fd).success(function (data) {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n $scope.$apply();\r\n $scope.setPage(0);\r\n $scope.setPage(1);\r\n $scope.$apply();\r\n })\r\n //$.ajax({\r\n // url: '/MediaUpload',\r\n // type: 'POST',\r\n // xhr: function () {\r\n // myXhr = $.ajaxSettings.xhr();\r\n // if (myXhr.upload) {\r\n // myXhr.upload.addEventListener('progress', function (evt) {\r\n // if (evt.lengthComputable) {\r\n // var percentComplete = evt.loaded / evt.total;\r\n // $scope.saveprogress = percentComplete;\r\n // $scope.Debug = percentComplete * 100;\r\n // $scope.isSaving = true;\r\n // $scope.$apply();\r\n // }\r\n\r\n // }, false);\r\n // }\r\n // return myXhr;\r\n // },\r\n // complete: function (data, xhr) {\r\n // //alert(data.responseText);\r\n // $scope.files = [];\r\n // $scope.SearchCriteriaVisible = false;\r\n // $scope.AddVisible = false;\r\n // $scope.ResultsVisible = true;\r\n // $scope.$apply();\r\n // $scope.setPage(0);\r\n // $scope.setPage(1);\r\n // $scope.$apply();\r\n // },\r\n // data: fd,\r\n // cache: false,\r\n // contentType: false,\r\n // processData: false\r\n //});\r\n\r\n }\r\n $scope.SaveMediaObject = function (media) {\r\n var params = [];\r\n var TagIds = [];\r\n angular.forEach(media.TagGroups, function (tg, tgidx) {\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(media.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n //console.log(media)\r\n params[0] = media.Name;\r\n params[1] = media.Description;\r\n params[2] = media.Path;\r\n params[3] = media.Keywords;\r\n params[4] = $rootScope.User.UserId;\r\n params[5] = media.Label;\r\n params[6] = media.Caption;\r\n params[7] = media.Source;\r\n params[8] = media.OriginalFileName;\r\n params[9] = media.Size;\r\n params[10] = media.Height;\r\n params[11] = media.Width;\r\n params[12] = media.Runtime;\r\n params[13] = media.Resolution;\r\n params[14] = TagIds.join(\",\");\r\n params[15] = CatIds.join(\",\");\r\n //console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SaveMedia\", params).success(function (data) {\r\n media.IsDirty = false;\r\n media.RowClass = null;\r\n }).error(function (err) {\r\n alert(err);\r\n });\r\n }\r\n $scope.setPage = function (pageNo) {\r\n $scope.CurrentPage = pageNo;\r\n $scope.ExecuteSearch();\r\n };\r\n }\r\n\r\n }\r\n});\r\napp.directive('searchvideos', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/SearchVideos.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.smallList = false;\r\n $scope.perPage = 5;\r\n $scope.searchFor = 'video';\r\n $scope.BackToMain = function () {\r\n $scope.searchFor = 'none'\r\n ////console.log($scope.searchFor)\r\n }\r\n $scope.init = function () {\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n $scope.Criteria = {};\r\n $scope.Criteria.Name = '';\r\n $scope.Criteria.Description = '';\r\n $scope.Criteria.Keywords = '';\r\n $scope.Criteria.Label = '';\r\n $scope.Criteria.Caption = '';\r\n $scope.Criteria.Source = '';\r\n $scope.Criteria.OriginalFileName = '';\r\n $scope.Criteria.Resolution = '';\r\n $scope.Criteria.Username = \"\";\r\n $scope.SortFields = [{ \"Name\": \"Created Date\", \"Value\": \"AddedOn\" }, { \"Name\": \"Name\", \"Value\": \"Name\" }, { \"Name\": \"Size\", \"Value\": \"Size\" }];\r\n $scope.OrderBy = $scope.SortFields[0];\r\n $scope.SortDirections = [{ \"Name\": \"Ascending\", \"Value\": \"\" }, { \"Name\": \"Descending\", \"Value\": \"D\" }];\r\n $scope.OrderByDirection = $scope.SortDirections[1];\r\n var params = [];\r\n $http.post(\"/Execute/GetAvailableMediaTagsAndCategories\", params).success(function (data) {\r\n $scope.Categories = data.RS_2;\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n cat.Selected = false;\r\n });\r\n $scope.TagGroups = [];\r\n angular.forEach(data.RS_0, function (tg, tgidx) {\r\n var tagGroup = {}\r\n tagGroup.Tags = [];\r\n tagGroup.Id = tg.Id;\r\n tagGroup.Name = tg.Name;\r\n angular.forEach(data.RS_1, function (tag, tagidx) {\r\n if (tag.MediaTagGroupId == tg.Id) {\r\n var Tag = {}\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag)\r\n }\r\n });\r\n $scope.TagGroups.push(tagGroup);\r\n });\r\n //console.log($scope.TagGroups)\r\n $scope.SelectedCategory = $scope.Categories[0]\r\n $scope.SelectedTagGroup = $scope.TagGroups[0];\r\n ////console.log(data)\r\n //$scope.setPage(1);\r\n $scope.CurrentPage = 1;\r\n $scope.$watch('CurrentPage', function (o, n) {\r\n $scope.setPage($scope.CurrentPage);\r\n });\r\n });\r\n }\r\n $scope.init();\r\n $scope.maxSize = 10;\r\n $scope.files = [];\r\n $scope.ShowAddNew = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = true;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.HideAddNew = function () {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.SetCriteria = function () {\r\n $scope.SearchCriteriaVisible = true;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.ShowList = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.ExecuteSearch = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n var TagIds = [];\r\n angular.forEach($scope.TagGroups, function (tgidx, tg) {\r\n angular.forEach(tg.Tags, function (idx, t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n var params = [];\r\n params[0] = '4';\r\n params[1] = $scope.Criteria.Name;\r\n params[2] = $scope.Criteria.Description;\r\n params[3] = $scope.Criteria.Keywords;\r\n params[4] = $scope.Criteria.Label;\r\n params[5] = $scope.Criteria.Caption;\r\n params[6] = $scope.Criteria.Source;\r\n params[7] = $scope.Criteria.OriginalFileName;\r\n params[8] = $scope.Criteria.Resolution;\r\n params[9] = TagIds.join(\",\");\r\n params[10] = CatIds.join(\",\");\r\n params[11] = $scope.Criteria.Username;\r\n params[12] = $scope.OrderBy.Value;\r\n params[13] = $scope.OrderByDirection.Value;\r\n params[14] = $scope.CurrentPage;\r\n params[15] = $scope.perPage;\r\n ////console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SearchMediaPage\", params).success(function (data) {\r\n\r\n $scope.MediaList = data.RS_0;\r\n $scope.numPages = data.RS_1[0].TotalPages;\r\n $scope.TotalItems = data.RS_1[0].TotalCount;\r\n ////console.log($scope.MediaList)\r\n angular.forEach($scope.MediaList, function (itm, idx) {\r\n itm.thumb = ''\r\n itm.Categories = angular.copy($scope.Categories)\r\n ////console.log(itm)\r\n //var SelectedCats = ((itm.CatArray == '') ? [] : itm.CatArray.split(','));\r\n angular.forEach(itm.Categories, function (idx, cat) {\r\n cat.Selected = false\r\n for (i = 0; i < SelectedCats.length; i++) {\r\n if (SelectedCats[i] == cat.Id) {\r\n cat.Selected = true;\r\n }\r\n }\r\n });\r\n itm.TagGroups = []\r\n var SelectedTags = ((itm.TagArray == '') ? [] : itm.TagArray.split(','));\r\n ////console.log($scope.TagGroups)\r\n angular.forEach($scope.TagGroups, function (tg, tgidx) {\r\n var TagGroup = {}\r\n TagGroup.Id = tg.Id;\r\n TagGroup.Name = tg.Name;\r\n TagGroup.Tags = [];\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n var Tag = {};\r\n Tag.Id = t.Id;\r\n Tag.Name = t.Name;\r\n Tag.Selected = false;\r\n for (i = 0; i < SelectedTags.length; i++) {\r\n if (SelectedTags[i] == Tag.Id) {\r\n Tag.Selected = true;\r\n }\r\n }\r\n TagGroup.Tags.push(Tag);\r\n });\r\n itm.TagGroups.push(TagGroup);\r\n });\r\n itm.SelectedTagGroup = itm.TagGroups[0];\r\n });\r\n //console.log($scope.MediaList)\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n });\r\n }\r\n $scope.SetDirty = function (media) {\r\n media.IsDirty = true;\r\n media.RowClass = \"dirty\";\r\n //alert(\"dirty\")\r\n }\r\n $scope.setFiles = function (element) {\r\n $scope.$apply(function () {\r\n $scope.ShowUploadButton = false;\r\n $scope.files = []\r\n for (var i = 0; i < element.files.length; i++) {\r\n if (element.files[i].type.match('image.*')) {\r\n ////console.log('files:', JSON.stringify(element.files[i]));\r\n var reader = new FileReader();\r\n reader.onload = (function (theFile) {\r\n return function (e) {\r\n var f = {};\r\n f.preview = [''].join('');\r\n f.name = theFile.name.split('.')[0];\r\n f.description = \"\";\r\n f.keywords = \"\";\r\n f.label = \"\";\r\n f.caption = \"\";\r\n f.source = \"\";\r\n f.filename = theFile.name;\r\n f.size = theFile.size;\r\n f.height = 0;\r\n f.width = 0;\r\n f.runtime = 0;\r\n f.resolution = \"\";\r\n f.file = theFile;\r\n f.TagGroups = [];\r\n $.each($scope.TagGroups, function (grpidx, grp) {\r\n var tagGroup = {}\r\n tagGroup.Id = grp.Id;\r\n tagGroup.Name = grp.Name;\r\n tagGroup.Tags = [];\r\n $.each(grp.Tags, function (idx, tag) {\r\n var Tag = {};\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag);\r\n });\r\n f.TagGroups.push(tagGroup);\r\n });\r\n f.SelectedTagGroup = f.TagGroups[0];\r\n f.Categories = [];\r\n $.each($scope.Categories, function (catidx, cat) {\r\n var category = {}\r\n category.Id = cat.Id;\r\n category.Name = cat.Name;\r\n category.Selected = false;\r\n f.Categories.push(category);\r\n });\r\n $scope.files.push(f);\r\n $scope.ShowUploadButton = true;\r\n $scope.$apply();\r\n };\r\n })(element.files[i]);\r\n reader.readAsDataURL(element.files[i]);\r\n }\r\n }\r\n $scope.progressVisible = false\r\n });\r\n }\r\n $scope.StartUpload = function () {\r\n var fd = new FormData();\r\n angular.forEach($scope.files, function (f, idx) {\r\n var TagIds = [];\r\n angular.forEach(f.TagGroups, function (tg) {\r\n angular.forEach(tg.Tags, function (t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(f.Categories, function (cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n fd.append(idx, f.file);\r\n fd.append(\"Name\" + idx, f.name);\r\n fd.append(\"Description\" + idx, f.description);\r\n fd.append(\"Username\" + idx, $rootScope.User.UserId);\r\n fd.append(\"Keywords\" + idx, f.keywords);\r\n fd.append(\"Label\" + idx, f.label);\r\n fd.append(\"Caption\" + idx, f.caption);\r\n fd.append(\"Source\" + idx, f.source);\r\n fd.append(\"Filename\" + idx, f.filename);\r\n fd.append(\"Size\" + idx, f.size);\r\n fd.append(\"Height\" + idx, f.height);\r\n fd.append(\"Width\" + idx, f.width);\r\n fd.append(\"Runtime\" + idx, f.runtime);\r\n fd.append(\"Resolution\" + idx, f.resolution);\r\n fd.append(\"Tags\" + idx, TagIds.join(\",\"));\r\n fd.append(\"Categories\" + idx, CatIds.join(\",\"));\r\n });\r\n $http.post(\"/MediaUpload\", fd).success(function (data) {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n $scope.$apply();\r\n $scope.setPage(0);\r\n $scope.setPage(1);\r\n $scope.$apply();\r\n })\r\n //$.ajax({\r\n // url: '/MediaUpload',\r\n // type: 'POST',\r\n // xhr: function () {\r\n // myXhr = $.ajaxSettings.xhr();\r\n // if (myXhr.upload) {\r\n // myXhr.upload.addEventListener('progress', function (evt) {\r\n // if (evt.lengthComputable) {\r\n // var percentComplete = evt.loaded / evt.total;\r\n // $scope.saveprogress = percentComplete;\r\n // $scope.Debug = percentComplete * 100;\r\n // $scope.isSaving = true;\r\n // $scope.$apply();\r\n // }\r\n\r\n // }, false);\r\n // }\r\n // return myXhr;\r\n // },\r\n // complete: function (data, xhr) {\r\n // //alert(data.responseText);\r\n // $scope.files = [];\r\n // $scope.SearchCriteriaVisible = false;\r\n // $scope.AddVisible = false;\r\n // $scope.ResultsVisible = true;\r\n // $scope.$apply();\r\n // $scope.setPage(0);\r\n // $scope.setPage(1);\r\n // $scope.$apply();\r\n // },\r\n // data: fd,\r\n // cache: false,\r\n // contentType: false,\r\n // processData: false\r\n //});\r\n\r\n }\r\n $scope.SaveMediaObject = function (media) {\r\n var params = [];\r\n var TagIds = [];\r\n angular.forEach(media.TagGroups, function (tg, tgidx) {\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(media.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n //console.log(media)\r\n params[0] = media.Name;\r\n params[1] = media.Description;\r\n params[2] = media.Path;\r\n params[3] = media.Keywords;\r\n params[4] = $rootScope.User.UserId;\r\n params[5] = media.Label;\r\n params[6] = media.Caption;\r\n params[7] = media.Source;\r\n params[8] = media.OriginalFileName;\r\n params[9] = media.Size;\r\n params[10] = media.Height;\r\n params[11] = media.Width;\r\n params[12] = media.Runtime;\r\n params[13] = media.Resolution;\r\n params[14] = TagIds.join(\",\");\r\n params[15] = CatIds.join(\",\");\r\n //console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SaveMedia\", params).success(function (data) {\r\n media.IsDirty = false;\r\n media.RowClass = null;\r\n }).error(function (err) {\r\n alert(err);\r\n });\r\n }\r\n $scope.setPage = function (pageNo) {\r\n $scope.CurrentPage = pageNo;\r\n $scope.ExecuteSearch();\r\n };\r\n }\r\n\r\n }\r\n});\r\napp.directive('searchaudio', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/SearchAudio.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.smallList = false;\r\n $scope.perPage = 5;\r\n \r\n \r\n $scope.init = function () {\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n $scope.Criteria = {};\r\n $scope.Criteria.Name = '';\r\n $scope.Criteria.Description = '';\r\n $scope.Criteria.Keywords = '';\r\n $scope.Criteria.Label = '';\r\n $scope.Criteria.Caption = '';\r\n $scope.Criteria.Source = '';\r\n $scope.Criteria.OriginalFileName = '';\r\n $scope.Criteria.Resolution = '';\r\n $scope.Criteria.Username = \"\";\r\n $scope.SortFields = [{ \"Name\": \"Created Date\", \"Value\": \"AddedOn\" }, { \"Name\": \"Name\", \"Value\": \"Name\" }, { \"Name\": \"Size\", \"Value\": \"Size\" }];\r\n $scope.OrderBy = $scope.SortFields[0];\r\n $scope.SortDirections = [{ \"Name\": \"Ascending\", \"Value\": \"\" }, { \"Name\": \"Descending\", \"Value\": \"D\" }];\r\n $scope.OrderByDirection = $scope.SortDirections[1];\r\n var params = [];\r\n $http.post(\"/Execute/GetAvailableMediaTagsAndCategories\", params).success(function (data) {\r\n $scope.Categories = data.RS_2;\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n cat.Selected = false;\r\n });\r\n $scope.TagGroups = [];\r\n angular.forEach(data.RS_0, function (tg, tgidx) {\r\n var tagGroup = {}\r\n tagGroup.Tags = [];\r\n tagGroup.Id = tg.Id;\r\n tagGroup.Name = tg.Name;\r\n angular.forEach(data.RS_1, function (tag, tagidx) {\r\n if (tag.MediaTagGroupId == tg.Id) {\r\n var Tag = {}\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag)\r\n }\r\n });\r\n $scope.TagGroups.push(tagGroup);\r\n });\r\n //console.log($scope.TagGroups)\r\n $scope.SelectedCategory = $scope.Categories[0]\r\n $scope.SelectedTagGroup = $scope.TagGroups[0];\r\n ////console.log(data)\r\n //$scope.setPage(1);\r\n $scope.CurrentPage = 1;\r\n $scope.$watch('CurrentPage', function (o, n) {\r\n $scope.setPage($scope.CurrentPage);\r\n });\r\n });\r\n }\r\n $scope.init();\r\n $scope.maxSize = 10;\r\n $scope.files = [];\r\n $scope.ShowAddNew = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = true;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.HideAddNew = function () {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.SetCriteria = function () {\r\n $scope.SearchCriteriaVisible = true;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.ShowList = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.ExecuteSearch = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n var TagIds = [];\r\n angular.forEach($scope.TagGroups, function (tgidx, tg) {\r\n angular.forEach(tg.Tags, function (idx, t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n var params = [];\r\n params[0] = '6';\r\n params[1] = $scope.Criteria.Name;\r\n params[2] = $scope.Criteria.Description;\r\n params[3] = $scope.Criteria.Keywords;\r\n params[4] = $scope.Criteria.Label;\r\n params[5] = $scope.Criteria.Caption;\r\n params[6] = $scope.Criteria.Source;\r\n params[7] = $scope.Criteria.OriginalFileName;\r\n params[8] = $scope.Criteria.Resolution;\r\n params[9] = TagIds.join(\",\");\r\n params[10] = CatIds.join(\",\");\r\n params[11] = $scope.Criteria.Username;\r\n params[12] = $scope.OrderBy.Value;\r\n params[13] = $scope.OrderByDirection.Value;\r\n params[14] = $scope.CurrentPage;\r\n params[15] = $scope.perPage;\r\n ////console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SearchMediaPage\", params).success(function (data) {\r\n\r\n $scope.MediaList = data.RS_0;\r\n $scope.numPages = data.RS_1[0].TotalPages;\r\n $scope.TotalItems = data.RS_1[0].TotalCount;\r\n ////console.log($scope.MediaList)\r\n angular.forEach($scope.MediaList, function (itm, idx) {\r\n itm.thumb = ''\r\n itm.Categories = angular.copy($scope.Categories)\r\n ////console.log(itm)\r\n //var SelectedCats = ((itm.CatArray == '') ? [] : itm.CatArray.split(','));\r\n angular.forEach(itm.Categories, function (idx, cat) {\r\n cat.Selected = false\r\n for (i = 0; i < SelectedCats.length; i++) {\r\n if (SelectedCats[i] == cat.Id) {\r\n cat.Selected = true;\r\n }\r\n }\r\n });\r\n itm.TagGroups = []\r\n var SelectedTags = ((itm.TagArray == '') ? [] : itm.TagArray.split(','));\r\n ////console.log($scope.TagGroups)\r\n angular.forEach($scope.TagGroups, function (tg, tgidx) {\r\n var TagGroup = {}\r\n TagGroup.Id = tg.Id;\r\n TagGroup.Name = tg.Name;\r\n TagGroup.Tags = [];\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n var Tag = {};\r\n Tag.Id = t.Id;\r\n Tag.Name = t.Name;\r\n Tag.Selected = false;\r\n for (i = 0; i < SelectedTags.length; i++) {\r\n if (SelectedTags[i] == Tag.Id) {\r\n Tag.Selected = true;\r\n }\r\n }\r\n TagGroup.Tags.push(Tag);\r\n });\r\n itm.TagGroups.push(TagGroup);\r\n });\r\n itm.SelectedTagGroup = itm.TagGroups[0];\r\n });\r\n //console.log($scope.MediaList)\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n });\r\n }\r\n $scope.SetDirty = function (media) {\r\n media.IsDirty = true;\r\n media.RowClass = \"dirty\";\r\n //alert(\"dirty\")\r\n }\r\n $scope.setFiles = function (element) {\r\n $scope.$apply(function () {\r\n $scope.ShowUploadButton = false;\r\n $scope.files = []\r\n for (var i = 0; i < element.files.length; i++) {\r\n if (element.files[i].type.match('image.*')) {\r\n ////console.log('files:', JSON.stringify(element.files[i]));\r\n var reader = new FileReader();\r\n reader.onload = (function (theFile) {\r\n return function (e) {\r\n var f = {};\r\n f.preview = [''].join('');\r\n f.name = theFile.name.split('.')[0];\r\n f.description = \"\";\r\n f.keywords = \"\";\r\n f.label = \"\";\r\n f.caption = \"\";\r\n f.source = \"\";\r\n f.filename = theFile.name;\r\n f.size = theFile.size;\r\n f.height = 0;\r\n f.width = 0;\r\n f.runtime = 0;\r\n f.resolution = \"\";\r\n f.file = theFile;\r\n f.TagGroups = [];\r\n $.each($scope.TagGroups, function (grpidx, grp) {\r\n var tagGroup = {}\r\n tagGroup.Id = grp.Id;\r\n tagGroup.Name = grp.Name;\r\n tagGroup.Tags = [];\r\n $.each(grp.Tags, function (idx, tag) {\r\n var Tag = {};\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag);\r\n });\r\n f.TagGroups.push(tagGroup);\r\n });\r\n f.SelectedTagGroup = f.TagGroups[0];\r\n f.Categories = [];\r\n $.each($scope.Categories, function (catidx, cat) {\r\n var category = {}\r\n category.Id = cat.Id;\r\n category.Name = cat.Name;\r\n category.Selected = false;\r\n f.Categories.push(category);\r\n });\r\n $scope.files.push(f);\r\n $scope.ShowUploadButton = true;\r\n $scope.$apply();\r\n };\r\n })(element.files[i]);\r\n reader.readAsDataURL(element.files[i]);\r\n }\r\n }\r\n $scope.progressVisible = false\r\n });\r\n }\r\n $scope.StartUpload = function () {\r\n var fd = new FormData();\r\n angular.forEach($scope.files, function (f, idx) {\r\n var TagIds = [];\r\n angular.forEach(f.TagGroups, function (tg) {\r\n angular.forEach(tg.Tags, function (t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(f.Categories, function (cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n fd.append(idx, f.file);\r\n fd.append(\"Name\" + idx, f.name);\r\n fd.append(\"Description\" + idx, f.description);\r\n fd.append(\"Username\" + idx, $rootScope.User.UserId);\r\n fd.append(\"Keywords\" + idx, f.keywords);\r\n fd.append(\"Label\" + idx, f.label);\r\n fd.append(\"Caption\" + idx, f.caption);\r\n fd.append(\"Source\" + idx, f.source);\r\n fd.append(\"Filename\" + idx, f.filename);\r\n fd.append(\"Size\" + idx, f.size);\r\n fd.append(\"Height\" + idx, f.height);\r\n fd.append(\"Width\" + idx, f.width);\r\n fd.append(\"Runtime\" + idx, f.runtime);\r\n fd.append(\"Resolution\" + idx, f.resolution);\r\n fd.append(\"Tags\" + idx, TagIds.join(\",\"));\r\n fd.append(\"Categories\" + idx, CatIds.join(\",\"));\r\n });\r\n $http.post(\"/MediaUpload\", fd).success(function (data) {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n $scope.$apply();\r\n $scope.setPage(0);\r\n $scope.setPage(1);\r\n $scope.$apply();\r\n })\r\n //$.ajax({\r\n // url: '/MediaUpload',\r\n // type: 'POST',\r\n // xhr: function () {\r\n // myXhr = $.ajaxSettings.xhr();\r\n // if (myXhr.upload) {\r\n // myXhr.upload.addEventListener('progress', function (evt) {\r\n // if (evt.lengthComputable) {\r\n // var percentComplete = evt.loaded / evt.total;\r\n // $scope.saveprogress = percentComplete;\r\n // $scope.Debug = percentComplete * 100;\r\n // $scope.isSaving = true;\r\n // $scope.$apply();\r\n // }\r\n\r\n // }, false);\r\n // }\r\n // return myXhr;\r\n // },\r\n // complete: function (data, xhr) {\r\n // //alert(data.responseText);\r\n // $scope.files = [];\r\n // $scope.SearchCriteriaVisible = false;\r\n // $scope.AddVisible = false;\r\n // $scope.ResultsVisible = true;\r\n // $scope.$apply();\r\n // $scope.setPage(0);\r\n // $scope.setPage(1);\r\n // $scope.$apply();\r\n // },\r\n // data: fd,\r\n // cache: false,\r\n // contentType: false,\r\n // processData: false\r\n //});\r\n\r\n }\r\n $scope.SaveMediaObject = function (media) {\r\n var params = [];\r\n var TagIds = [];\r\n angular.forEach(media.TagGroups, function (tg, tgidx) {\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(media.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n //console.log(media)\r\n params[0] = media.Name;\r\n params[1] = media.Description;\r\n params[2] = media.Path;\r\n params[3] = media.Keywords;\r\n params[4] = $rootScope.User.UserId;\r\n params[5] = media.Label;\r\n params[6] = media.Caption;\r\n params[7] = media.Source;\r\n params[8] = media.OriginalFileName;\r\n params[9] = media.Size;\r\n params[10] = media.Height;\r\n params[11] = media.Width;\r\n params[12] = media.Runtime;\r\n params[13] = media.Resolution;\r\n params[14] = TagIds.join(\",\");\r\n params[15] = CatIds.join(\",\");\r\n //console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SaveMedia\", params).success(function (data) {\r\n media.IsDirty = false;\r\n media.RowClass = null;\r\n }).error(function (err) {\r\n alert(err);\r\n });\r\n }\r\n $scope.setPage = function (pageNo) {\r\n $scope.CurrentPage = pageNo;\r\n $scope.ExecuteSearch();\r\n };\r\n }\r\n\r\n }\r\n});\r\napp.directive('searchimages', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/tpls/SearchImages.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter) {\r\n $scope.smallList = false;\r\n $scope.perPage = 5;\r\n $scope.searchFor = 'video'\r\n $scope.BackToMain = function () {\r\n $scope.searchFor = 'none'\r\n \r\n }\r\n $scope.init = function () {\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n $scope.Criteria = {};\r\n $scope.Criteria.Name = '';\r\n $scope.Criteria.Description = '';\r\n $scope.Criteria.Keywords = '';\r\n $scope.Criteria.Label = '';\r\n $scope.Criteria.Caption = '';\r\n $scope.Criteria.Source = '';\r\n $scope.Criteria.OriginalFileName = '';\r\n $scope.Criteria.Resolution = '';\r\n $scope.Criteria.Username = \"\";\r\n $scope.SortFields = [{ \"Name\": \"Created Date\", \"Value\": \"AddedOn\" }, { \"Name\": \"Name\", \"Value\": \"Name\" }, { \"Name\": \"Size\", \"Value\": \"Size\" }];\r\n $scope.OrderBy = $scope.SortFields[0];\r\n $scope.SortDirections = [{ \"Name\": \"Ascending\", \"Value\": \"\" }, { \"Name\": \"Descending\", \"Value\": \"D\" }];\r\n $scope.OrderByDirection = $scope.SortDirections[1];\r\n var params = [];\r\n $http.post(\"/Execute/GetAvailableMediaTagsAndCategories\", params).success(function (data) {\r\n $scope.Categories = data.RS_2;\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n cat.Selected = false;\r\n });\r\n $scope.TagGroups = [];\r\n angular.forEach(data.RS_0, function (tg, tgidx) {\r\n var tagGroup = {}\r\n tagGroup.Tags = [];\r\n tagGroup.Id = tg.Id;\r\n tagGroup.Name = tg.Name;\r\n angular.forEach(data.RS_1, function (tag, tagidx) {\r\n if (tag.MediaTagGroupId == tg.Id) {\r\n var Tag = {}\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag)\r\n }\r\n });\r\n $scope.TagGroups.push(tagGroup);\r\n });\r\n //console.log($scope.TagGroups)\r\n $scope.SelectedCategory = $scope.Categories[0]\r\n $scope.SelectedTagGroup = $scope.TagGroups[0];\r\n ////console.log(data)\r\n //$scope.setPage(1);\r\n $scope.CurrentPage = 1;\r\n $scope.$watch('CurrentPage', function (o, n) {\r\n $scope.setPage($scope.CurrentPage);\r\n });\r\n });\r\n }\r\n $scope.init();\r\n $scope.maxSize = 10;\r\n $scope.files = [];\r\n $scope.ShowAddNew = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = true;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.HideAddNew = function () {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.SetCriteria = function () {\r\n $scope.SearchCriteriaVisible = true;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n }\r\n $scope.ShowList = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n }\r\n $scope.ExecuteSearch = function () {\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = false;\r\n var TagIds = [];\r\n angular.forEach($scope.TagGroups, function (tgidx, tg) {\r\n angular.forEach(tg.Tags, function (idx, t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach($scope.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n var params = [];\r\n params[0] = '1';\r\n params[1] = $scope.Criteria.Name;\r\n params[2] = $scope.Criteria.Description;\r\n params[3] = $scope.Criteria.Keywords;\r\n params[4] = $scope.Criteria.Label;\r\n params[5] = $scope.Criteria.Caption;\r\n params[6] = $scope.Criteria.Source;\r\n params[7] = $scope.Criteria.OriginalFileName;\r\n params[8] = $scope.Criteria.Resolution;\r\n params[9] = TagIds.join(\",\");\r\n params[10] = CatIds.join(\",\");\r\n params[11] = $scope.Criteria.Username;\r\n params[12] = $scope.OrderBy.Value;\r\n params[13] = $scope.OrderByDirection.Value;\r\n params[14] = $scope.CurrentPage;\r\n params[15] = $scope.perPage;\r\n ////console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SearchMediaPage\", params).success(function (data) {\r\n \r\n $scope.MediaList = data.RS_0;\r\n $scope.numPages = data.RS_1[0].TotalPages;\r\n $scope.TotalItems = data.RS_1[0].TotalCount;\r\n angular.forEach($scope.MediaList, function (itm, idx) {\r\n itm.thumb = '//s3.amazonaws.com/challmedia/' + itm.Path + '';\r\n itm.Categories = angular.copy($scope.Categories)\r\n ////console.log(itm)\r\n //var SelectedCats = ((itm.CatArray == '') ? [] : itm.CatArray.split(','));\r\n angular.forEach(itm.Categories, function (idx, cat) {\r\n cat.Selected = false\r\n for (i = 0; i < SelectedCats.length; i++) {\r\n if (SelectedCats[i] == cat.Id) {\r\n cat.Selected = true;\r\n }\r\n }\r\n });\r\n itm.TagGroups = []\r\n var SelectedTags = ((itm.TagArray == '') ? [] : itm.TagArray.split(','));\r\n ////console.log($scope.TagGroups)\r\n angular.forEach($scope.TagGroups, function (tg, tgidx) {\r\n var TagGroup = {}\r\n TagGroup.Id = tg.Id;\r\n TagGroup.Name = tg.Name;\r\n TagGroup.Tags = [];\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n var Tag = {};\r\n Tag.Id = t.Id;\r\n Tag.Name = t.Name;\r\n Tag.Selected = false;\r\n for (i = 0; i < SelectedTags.length; i++) {\r\n if (SelectedTags[i] == Tag.Id) {\r\n Tag.Selected = true;\r\n }\r\n }\r\n TagGroup.Tags.push(Tag);\r\n });\r\n itm.TagGroups.push(TagGroup);\r\n });\r\n itm.SelectedTagGroup = itm.TagGroups[0];\r\n });\r\n ////console.log($scope.MediaList)\r\n $scope.CriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n });\r\n }\r\n $scope.SetDirty = function (media) {\r\n media.IsDirty = true;\r\n media.RowClass = \"dirty\";\r\n //alert(\"dirty\")\r\n }\r\n $scope.setFiles = function (element) {\r\n $scope.$apply(function () {\r\n $scope.ShowUploadButton = false;\r\n $scope.files = []\r\n for (var i = 0; i < element.files.length; i++) {\r\n if (element.files[i].type.match('image.*')) {\r\n ////console.log('files:', JSON.stringify(element.files[i]));\r\n var reader = new FileReader();\r\n reader.onload = (function (theFile) {\r\n return function (e) {\r\n var f = {};\r\n f.preview = [''].join('');\r\n f.name = theFile.name.split('.')[0];\r\n f.description = \"\";\r\n f.keywords = \"\";\r\n f.label = \"\";\r\n f.caption = \"\";\r\n f.source = \"\";\r\n f.filename = theFile.name;\r\n f.size = theFile.size;\r\n f.height = 0;\r\n f.width = 0;\r\n f.runtime = 0;\r\n f.resolution = \"\";\r\n f.file = theFile;\r\n f.TagGroups = [];\r\n $.each($scope.TagGroups, function (grpidx, grp) {\r\n var tagGroup = {}\r\n tagGroup.Id = grp.Id;\r\n tagGroup.Name = grp.Name;\r\n tagGroup.Tags = [];\r\n $.each(grp.Tags, function (idx, tag) {\r\n var Tag = {};\r\n Tag.Id = tag.Id;\r\n Tag.Name = tag.Name;\r\n Tag.Selected = false;\r\n tagGroup.Tags.push(Tag);\r\n });\r\n f.TagGroups.push(tagGroup);\r\n });\r\n f.SelectedTagGroup = f.TagGroups[0];\r\n f.Categories = [];\r\n $.each($scope.Categories, function (catidx, cat) {\r\n var category = {}\r\n category.Id = cat.Id;\r\n category.Name = cat.Name;\r\n category.Selected = false;\r\n f.Categories.push(category);\r\n });\r\n $scope.files.push(f);\r\n $scope.ShowUploadButton = true;\r\n $scope.$apply();\r\n };\r\n })(element.files[i]);\r\n reader.readAsDataURL(element.files[i]);\r\n }\r\n }\r\n $scope.progressVisible = false\r\n });\r\n }\r\n $scope.StartUpload = function () {\r\n var fd = new FormData();\r\n angular.forEach($scope.files, function (f, idx) {\r\n var TagIds = [];\r\n angular.forEach(f.TagGroups, function (tg) {\r\n angular.forEach(tg.Tags, function (t) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(f.Categories, function (cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n fd.append(idx, f.file);\r\n fd.append(\"Name\" + idx, f.name);\r\n fd.append(\"Description\" + idx, f.description);\r\n fd.append(\"Username\" + idx, $rootScope.User.UserId);\r\n fd.append(\"Keywords\" + idx, f.keywords);\r\n fd.append(\"Label\" + idx, f.label);\r\n fd.append(\"Caption\" + idx, f.caption);\r\n fd.append(\"Source\" + idx, f.source);\r\n fd.append(\"Filename\" + idx, f.filename);\r\n fd.append(\"Size\" + idx, f.size);\r\n fd.append(\"Height\" + idx, f.height);\r\n fd.append(\"Width\" + idx, f.width);\r\n fd.append(\"Runtime\" + idx, f.runtime);\r\n fd.append(\"Resolution\" + idx, f.resolution);\r\n fd.append(\"Tags\" + idx, TagIds.join(\",\"));\r\n fd.append(\"Categories\" + idx, CatIds.join(\",\"));\r\n });\r\n $http.post(\"/MediaUpload\", fd).success(function (data) {\r\n $scope.files = [];\r\n $scope.SearchCriteriaVisible = false;\r\n $scope.AddVisible = false;\r\n $scope.ResultsVisible = true;\r\n $scope.$apply();\r\n $scope.setPage(0);\r\n $scope.setPage(1);\r\n $scope.$apply();\r\n })\r\n //$.ajax({\r\n // url: '/MediaUpload',\r\n // type: 'POST',\r\n // xhr: function () {\r\n // myXhr = $.ajaxSettings.xhr();\r\n // if (myXhr.upload) {\r\n // myXhr.upload.addEventListener('progress', function (evt) {\r\n // if (evt.lengthComputable) {\r\n // var percentComplete = evt.loaded / evt.total;\r\n // $scope.saveprogress = percentComplete;\r\n // $scope.Debug = percentComplete * 100;\r\n // $scope.isSaving = true;\r\n // $scope.$apply();\r\n // }\r\n\r\n // }, false);\r\n // }\r\n // return myXhr;\r\n // },\r\n // complete: function (data, xhr) {\r\n // //alert(data.responseText);\r\n // $scope.files = [];\r\n // $scope.SearchCriteriaVisible = false;\r\n // $scope.AddVisible = false;\r\n // $scope.ResultsVisible = true;\r\n // $scope.$apply();\r\n // $scope.setPage(0);\r\n // $scope.setPage(1);\r\n // $scope.$apply();\r\n // },\r\n // data: fd,\r\n // cache: false,\r\n // contentType: false,\r\n // processData: false\r\n //});\r\n\r\n }\r\n $scope.SaveMediaObject = function (media) {\r\n var params = [];\r\n var TagIds = [];\r\n angular.forEach(media.TagGroups, function (tg, tgidx) {\r\n angular.forEach(tg.Tags, function (t, idx) {\r\n if (t.Selected == true) {\r\n TagIds.push(t.Id);\r\n }\r\n });\r\n });\r\n var CatIds = [];\r\n angular.forEach(media.Categories, function (idx, cat) {\r\n if (cat.Selected == true) {\r\n CatIds.push(cat.Id);\r\n }\r\n });\r\n //console.log(media)\r\n params[0] = media.Name;\r\n params[1] = media.Description;\r\n params[2] = media.Path;\r\n params[3] = media.Keywords;\r\n params[4] = $rootScope.User.UserId;\r\n params[5] = media.Label;\r\n params[6] = media.Caption;\r\n params[7] = media.Source;\r\n params[8] = media.OriginalFileName;\r\n params[9] = media.Size;\r\n params[10] = media.Height;\r\n params[11] = media.Width;\r\n params[12] = media.Runtime;\r\n params[13] = media.Resolution;\r\n params[14] = TagIds.join(\",\");\r\n params[15] = CatIds.join(\",\");\r\n //console.log(JSON.stringify(params));\r\n $http.post(\"/Execute/SaveMedia\", params).success(function (data) {\r\n media.IsDirty = false;\r\n media.RowClass = null;\r\n }).error(function (err) {\r\n alert(err);\r\n });\r\n }\r\n $scope.setPage = function (pageNo) {\r\n $scope.CurrentPage = pageNo;\r\n $scope.ExecuteSearch();\r\n };\r\n }\r\n \r\n }\r\n});\r\napp.directive('customExamCourseAdd', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n course: \"=\",\r\n },\r\n templateUrl: 'app/tpls/customExamCourseAdd.htm',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, ngIntroService) {\r\n //console.log($scope.course)\r\n $scope.ChangeMe = function (c) {\r\n\r\n //console.log(c)\r\n ////console.log($rootScope.SelectedCourses)\r\n $scope.ChapterExams = [];\r\n $http.post('/Execute/GetCourseChaptersAndQuestionPools', [vm.SelectedCourse.Id]).success(function (data) {\r\n $scope.CourseAssess = data.RS_1;\r\n\r\n angular.forEach($scope.CourseAssess, function (ca) {\r\n if (ca.AssessmentType == 'Baseline Exam' || ca.AssessmentType == 'EOR Exam') {\r\n $scope.ChapterExams.push({\r\n //Id: ca.Id,\r\n Name: ca.Name,\r\n AssessmentId: ca.Assessment_Id\r\n })\r\n }\r\n })\r\n ////console.log($scope.ChapterExams)\r\n\r\n });\r\n $http.get('/api/Courses(' + c.Id + 'L)/CourseChapters?$expand=Chapter').success(function (dta) {\r\n //console.log(dta)\r\n c.Chapters = []\r\n $scope.ChaptersLoadedCount = 0;\r\n angular.forEach(dta.d, function (cc) {\r\n var ch = cc.Chapter;\r\n var types = '4,5';\r\n ch.SortOrder = cc.SortOrder;\r\n c.Chapters.push(ch);\r\n var proc = '/Execute/GetQuestionsInCourseChapterByType'\r\n //if (vm.IsIntitution) {\r\n // proc = '/Execute/GetQuestionsInCourseChapterForInstitution'\r\n //}\r\n\r\n $http.post(proc, [$scope.User.UserName, c.Id, ch.Id, types]).success(function (qdata) {\r\n // //console.log([$scope.User.UserName, c.Id, ch.Id])\r\n ////console.log(qdata)\r\n\r\n\r\n ch.Topics = [];\r\n ch.Assessments = [];\r\n ch.Selected = false;\r\n angular.forEach(qdata.RS_0, function (q) {\r\n if (q.TopicId > 0) {\r\n var topic = null\r\n angular.forEach(ch.Topics, function (t) {\r\n if (t.Id == q.TopicId) {\r\n topic = t;\r\n }\r\n });\r\n if (topic == null) {\r\n topic = {\r\n Id: q.TopicId,\r\n Name: q.TopicName,\r\n Assessments: [],\r\n Selected: false,\r\n TimesAnswered: 0,\r\n TimesCorrect: 0,\r\n TimesSeen: 0,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n ch.Topics.push(topic);\r\n }\r\n var tassessment = null\r\n angular.forEach(topic.Assessments, function (a) {\r\n if (a.Id == q.AssessmentId) {\r\n tassessment = a;\r\n }\r\n });\r\n if (tassessment == null) {\r\n\r\n tassessment = {\r\n Id: q.AssessmentId,\r\n Name: q.AssessmentName,\r\n Questions: [],\r\n Selected: false,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n\r\n\r\n topic.Assessments.push(tassessment);\r\n }\r\n tassessment.Questions.push(q);\r\n //var TimesAnsweredas = 0;\r\n //var TimesCorrectas = 0;\r\n var TimesSeenas = 0;\r\n var SelectedCounts = 0;\r\n angular.forEach(tassessment.Questions, function (tq) {\r\n //TimesAnsweredas += parseInt(tq.TimesAnswered);\r\n //TimesCorrectas += parseInt(tq.TimesCorrect);\r\n //TimesSeenas += parseInt(tq.TimesSeen);\r\n tq.Selected = false;\r\n angular.forEach($rootScope.SelectedQuestions, function (sel) {\r\n if (sel == tq.QuestionId) {\r\n tq.Selected = true;\r\n }\r\n\r\n });\r\n\r\n });\r\n tassessment.SelectedCount = 0;\r\n\r\n\r\n\r\n //tassessment.TimesAnswered = TimesAnsweredas;\r\n //tassessment.TimesCorrect = TimesCorrectas;\r\n //tassessment.TimesSeen = TimesSeenas;\r\n //tassessment.SelectedCount = SelectedCounts;\r\n tassessment.QuestionCount = tassessment.Questions.length;\r\n for (var i = 0; i < tassessment.Questions.length; i++) {\r\n if (tassessment.Id == '1100') {\r\n ////console.log(i)\r\n // //console.log(tassessment.Questions[i])\r\n }\r\n if (tassessment.Questions[i].Selected == true) {\r\n tassessment.SelectedCount++\r\n\r\n }\r\n\r\n\r\n }\r\n if (tassessment.SelectedCount == tassessment.Questions.length) {\r\n // //console.log('They are equal')\r\n tassessment.Selected = true;\r\n }\r\n else {\r\n tassessment.Selected = false;\r\n }\r\n ////console.log(tassessment.SelectedCount)\r\n } else {\r\n var assessment = null\r\n angular.forEach(ch.Assessments, function (a) {\r\n if (a.Id == q.AssessmentId) {\r\n assessment = a;\r\n }\r\n });\r\n if (assessment == null) {\r\n assessment = {\r\n Id: q.AssessmentId,\r\n Name: q.AssessmentName,\r\n Questions: [],\r\n Selected: false,\r\n QuestionCount: 0,\r\n SelectedCount: 0,\r\n }\r\n ch.Assessments.push(assessment);\r\n }\r\n assessment.Questions.push(q);\r\n\r\n }\r\n //var TimesAnsweredas = 0;\r\n //var TimesCorrectas = 0;\r\n var TimesSeenas = 0;\r\n var QuestionCount = 0;\r\n var SelectedCount = 0;\r\n if (topic != undefined) {\r\n angular.forEach(topic.Assessments, function (chtop) {\r\n //TimesAnsweredas += chtop.TimesAnswered;\r\n //TimesCorrectas += chtop.TimesCorrect;\r\n //TimesSeenas += chtop.TimesSeen;\r\n QuestionCount += chtop.QuestionCount;\r\n SelectedCount += chtop.SelectedCount;\r\n\r\n });\r\n for (i = 0; i < topic.Assessments.length; i++) {\r\n if (topic.Assessments[i].Selected == false) {\r\n topic.Selected = false;\r\n break;\r\n }\r\n else {\r\n topic.Selected = true;\r\n }\r\n }\r\n topic.QuestionCount = QuestionCount;\r\n topic.SelectedCount = SelectedCount;\r\n //if (topic.SelectedCount == topic.QuestionCount) {\r\n // topic.Selected = true;\r\n // //console.log(topic)\r\n //}\r\n }\r\n //topic.TimesAnswered = TimesAnsweredas;\r\n //topic.TimesCorrect = TimesCorrectas;\r\n //topic.TimesSeen = TimesSeenas;\r\n\r\n });\r\n //var TimesAnsweredas = 0;\r\n //var TimesCorrectas = 0;\r\n var TimesSeenas = 0;\r\n var QuestionCount = 0;\r\n var SelectedCount = 0;\r\n angular.forEach(ch.Topics, function (chtop) {\r\n //TimesAnsweredas += chtop.TimesAnswered;\r\n //TimesCorrectas += chtop.TimesCorrect;\r\n //TimesSeenas += chtop.TimesSeen;\r\n QuestionCount += chtop.QuestionCount;\r\n SelectedCount += chtop.SelectedCount;\r\n });\r\n //ch.TimesAnswered = TimesAnsweredas;\r\n //ch.TimesCorrect = TimesCorrectas;\r\n //ch.TimesSeen = TimesSeenas;\r\n ch.QuestionCount = QuestionCount;\r\n ch.SelectedCount = SelectedCount;\r\n if (ch.SelectedCount === ch.QuestionCount) {\r\n ch.Selected = true;\r\n }\r\n ////console.log(ch.Topics)\r\n $scope.ChaptersLoadedCount += 1;\r\n\r\n\r\n $scope.SearchString = \"\";\r\n //$scope.SearchLabel = $scope.SearchString;\r\n\r\n $scope.customexamsearch = false;\r\n $scope.StartSearch = false;\r\n $scope.ExecuteSearch = function (c, s) {\r\n $scope.SelectAlls = false;\r\n $scope.customexamsearch = true;\r\n $scope.StartSearch = true;\r\n $scope.SearchWait = true;\r\n $scope.CourseArray = parseInt(c.Id);\r\n $scope.SearchString = s;\r\n //console.log($scope.SearchString);\r\n //console.log($scope.CourseArray);\r\n $http.post('/Execute/SearchQuestionsForStringByCourse', [$scope.SearchString, $scope.CourseArray]).success(function (rslt) {\r\n //console.log($rootScope.SelectedQuestions)\r\n //console.log(rslt)\r\n $scope.SearchResults = $scope.SearchString;\r\n $rootScope.Results = {};\r\n $rootScope.Results.Questions = rslt.RS_0;\r\n //$rootScope.Results.Questions.SubTopic = rslt.RS_0;\r\n //$rootScope.Results.Questions.Topic = rslt.RS_1;\r\n //$rootScope.Results.Questions.Chapter = rslt.RS_2;\r\n angular.forEach($rootScope.Results.Questions, function (qu) {\r\n qu.Selected = false;\r\n })\r\n //$scope.SelectQuestion = function (ques) {\r\n // ques.Selected = !ques.Selected;\r\n\r\n //}\r\n //console.log($rootScope.Results.Questions)\r\n\r\n //$rootScope.Results.Questions = $filter('filter')($rootScope.Results.Questions, $rootScope.Results.Questions.TopicId !== undefined)\r\n\r\n\r\n $scope.CheckSelectedQs($rootScope.Results.Questions);\r\n\r\n\r\n\r\n $scope.SelectAll = function () {\r\n $scope.SelectAlls = !$scope.SelectAlls;\r\n if ($scope.SelectAlls) {\r\n angular.forEach($rootScope.Results.Questions, function (rq) {\r\n if (!rq.Selected) {\r\n rq.Selected = true;\r\n //$rootScope.TotalSelected++;\r\n $rootScope.SelectedQuestions.push(rq.QuestionId)\r\n }\r\n })\r\n }\r\n if (!$scope.SelectAlls) {\r\n angular.forEach($rootScope.Results.Questions, function (rq) {\r\n if (rq.Selected === true) {\r\n rq.Selected = false;\r\n //$rootScope.TotalSelected--;\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + rq.QuestionId, true)\r\n }\r\n })\r\n }\r\n //console.log($rootScope.SelectedQuestions)\r\n }\r\n $scope.ClearAll = function () {\r\n\r\n\r\n }\r\n\r\n\r\n $rootScope.Results.QuestionsTotal = $rootScope.Results.Questions.length;\r\n\r\n $rootScope.Results.AllTotal = ($rootScope.Results.QuestionsTotal + $rootScope.Results.PagesTotal + $rootScope.Results.SubTopicsTotal + $rootScope.Results.TopicsTotal + $rootScope.Results.ChaptersTotal + $rootScope.Results.CoursesTotal);\r\n $scope.AddQuestions = function (c) {\r\n $scope.customexamsearch = false;\r\n $scope.CourseChanged(c)\r\n }\r\n $scope.ClearSearch = function (c) {\r\n $scope.SearchString = '';\r\n $scope.CourseChanged(c);\r\n }\r\n $scope.SearchWait = false;\r\n });\r\n }\r\n $scope.ShowAssessment = function (Assessment) {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/tpls/CustomExam-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.Assessment = Assessment;\r\n $scope.TotalAssessSelected = 0;\r\n //console.log($scope.Assessment)\r\n angular.forEach($scope.Assessment.Questions, function (aq) {\r\n aq.Answers = JSON.parse(aq.AnswersJSON);\r\n });\r\n if ($scope.Assessment.Selected === false) {\r\n angular.forEach($scope.Assessment.Questions, function (aq) {\r\n if (aq.Selected === true) {\r\n $scope.TotalAssessSelected++\r\n }\r\n });\r\n //$rootScope.TotalSelected = $rootScope.TotalSelected - $scope.TotalAssessSelected;\r\n }\r\n else {\r\n $scope.TotalAssessSelected = $scope.Assessment.QuestionCount;\r\n //$rootScope.TotalSelected = $rootScope.TotalSelected - $scope.TotalAssessSelected;\r\n }\r\n $scope.SelectQuestion = function (ques, Selected) {\r\n //console.log(ques)\r\n ques.Selected = Selected;\r\n if (ques.Selected == true) {\r\n //$rootScope.TotalSelected++\r\n $rootScope.SelectedQuestions.push(ques.QuestionId)\r\n }\r\n if (ques.Selected == false) {\r\n //$rootScope.TotalSelected--\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n }\r\n ////console.log($rootScope.SelectedQuestions)\r\n ////console.log($rootScope.TotalSelected)\r\n }\r\n $scope.cancel = function (Assessment) {\r\n\r\n modalInstance.close();\r\n //console.log(Assessment)\r\n };\r\n $scope.SetAssessmentSelected = function (Assessment) {\r\n\r\n angular.forEach(Assessment.Questions, function (q) {\r\n q.Selected = Assessment.Selected;\r\n if ($rootScope.SelectedQuestions.indexOf(q.QuestionId) == -1) {\r\n $scope.SelectQuestion(q, Assessment.Selected)\r\n }\r\n });\r\n };\r\n\r\n //console.log($scope.Assessment);\r\n },\r\n scope: $scope,\r\n resolve: {}\r\n });\r\n }\r\n $scope.ShowQuestion = function (Question) {\r\n angular.forEach($rootScope.SelectedQuestions, function (sq) {\r\n if (Question.QuestionId === sq) {\r\n Question.Selected = true;\r\n }\r\n })\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'app/tpls/CustomExam-modal.htm',\r\n windowClass: 'assign-modal',\r\n size: 'lg-dark',\r\n backdrop: \"static\",\r\n controller: function ($scope, $http, $rootScope) {\r\n $scope.SelectQuestion = function (ques, Selected) {\r\n //console.log(ques)\r\n ques.Selected = !ques.Selected;\r\n //if (ques.Selected === true) {\r\n // $rootScope.TotalSelected++\r\n // $rootScope.SelectedQuestions.push(ques.QuestionId)\r\n //}\r\n //if (ques.Selected === false) {\r\n // $rootScope.TotalSelected--\r\n // $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId)\r\n //}\r\n\r\n }\r\n\r\n if (!Question.HTML) {\r\n $http.get(\"/api/Questions(\" + Question.QuestionId + \"L)\").success(function (data) {\r\n $scope.Question = data.d;\r\n ////console.log($scope.Question)\r\n $http.get(\"/api/Questions(\" + $scope.Question.Id + \"L)/Answers\").success(function (datas) {\r\n $scope.Question.Answers = datas.d;\r\n $scope.QuestionBody = $scope.Question.HTML;\r\n if (Question.AnswersJSON) {\r\n $scope.QuestionAnswsers = JSON.parse(Question.AnswersJSON);\r\n }\r\n $scope.Question.Selected = Question.Selected;\r\n $scope.Question.QuestionId = $scope.Question.Id;\r\n $scope.QuestionAnswers = $scope.Question.Answers;\r\n angular.forEach($rootScope.SelectedQuestions, function (sq) {\r\n if ($scope.Question.Id === sq) {\r\n $scope.Question.Selected = true;\r\n }\r\n });\r\n $scope.Question.Searched = true;\r\n\r\n $scope.QuestionRemediation = $scope.Question.CorrectRemediation;\r\n //console.log($scope.Question)\r\n });\r\n })\r\n }\r\n else {\r\n //console.log(Question)\r\n $scope.Question = Question;\r\n $scope.QuestionBody = Question.HTML;\r\n $scope.QuestionAnswers = JSON.parse(Question.AnswersJSON);\r\n $scope.QuestionRemediation = Question.CorrectRemediation;\r\n $scope.Question.Selected = Question.Selected;\r\n ////console.log($scope.QuestionAnswers);\r\n $scope.Question.Searched = false;\r\n }\r\n //$scope.Question = Question;\r\n\r\n //$scope.SelectedQuestion = function (ques) {\r\n // //console.log(ques)\r\n\r\n //}\r\n $scope.cancel = function (ques) {\r\n //console.log(ques)\r\n if (ques.Selected === true) {\r\n //$rootScope.TotalSelected++\r\n $rootScope.SelectedQuestions.push(ques.QuestionId);\r\n }\r\n if (ques.Selected === false) {\r\n //$rootScope.TotalSelected--\r\n $rootScope.SelectedQuestions = $filter('filter')($rootScope.SelectedQuestions, '!' + ques.QuestionId, true)\r\n }\r\n if (ques.Searched === true) {\r\n $scope.CheckSelectedQs($rootScope.Results.Questions)\r\n }\r\n //console.log($rootScope.SelectedQuestions)\r\n ////console.log($rootScope.Results.Questions)\r\n modalInstance.close();\r\n };\r\n\r\n },\r\n scope: $scope,\r\n resolve: {}\r\n });\r\n }\r\n\r\n\r\n });\r\n });\r\n });\r\n\r\n }\r\n\r\n \r\n $scope.CourseChanged = function (c) {\r\n //console.log(c)\r\n ////console.log(vm.SelectedCourse)\r\n //$scope.ChangeMe(c)\r\n $scope.ChapterExams = [];\r\n if ($rootScope.SelectedQuestions.length > 0) {\r\n //console.log(c)\r\n \r\n ////console.log(next)\r\n if ($rootScope.SelectedQuestions.length > 0) {\r\n event.preventDefault();\r\n swal({\r\n title: \"You have selected questions from this course.\",\r\n text: \"Changing the course will erase current selections. Do you want to proceed?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $rootScope.SelectedQuestions = [];\r\n $scope.CurrentCourse = vm.SelectedCourse;\r\n //console.log($scope.CurrentCourse)\r\n $scope.ChangeMe($scope.CurrentCourse)\r\n }\r\n else if (result.dismiss === 'cancel') {\r\n vm.SelectedCourse = $scope.CurrentCourse;\r\n }\r\n\r\n })\r\n\r\n }\r\n\r\n //var con = confirm('You have selected questions from this course. Changing the course will erase current selections. Do you want to proceed?');\r\n //if (!con) {\r\n // vm.SelectedCourse = $scope.CurrentCourse;\r\n //}\r\n //if (con) {\r\n // $rootScope.SelectedQuestions = [];\r\n // $scope.CurrentCourse = vm.SelectedCourse;\r\n // //console.log($scope.CurrentCourse)\r\n // $scope.ChangeMe($scope.CurrentCourse)\r\n //}\r\n }\r\n else {\r\n //$scope.updateOn = true;\r\n //$scope.CurrentCourse = ;\r\n $scope.CurrentCourse = vm.SelectedCourse;\r\n //console.log(vm.SelectedCourse)\r\n if (vm.SelectedCourse) {\r\n \r\n }\r\n \r\n $scope.ChangeMe(vm.SelectedCourse)\r\n }\r\n \r\n }\r\n vm.Courses = [];\r\n $('select').selectpicker('data-hide-disabled', false)\r\n \r\n angular.forEach($rootScope.Courses, function (c) {\r\n if ($scope.trialAlert == false) {\r\n\r\n if (c.IsTrial == '1') {\r\n $scope.trialAlert = true;\r\n c.Name = c.Name + '*'\r\n }\r\n }\r\n \r\n //$('select').selectpicker('refresh')\r\n if (c.Id != 745 && c.Id != 1106) {\r\n vm.Courses.push(c);\r\n }\r\n });\r\n //console.log(vm.Courses)\r\n $scope.CourseChanged($scope.course)\r\n\r\n }\r\n }\r\n});\r\napp.directive('smartimage', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict:'EACM',\r\n replace: true,\r\n scope: { imageid: '=', showtitle: '=?', showcaption: '=?', showattr: '=?' },\r\n template: '
',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, ngIntroService) {\r\n $scope.$watch('imageid', function () {\r\n if ($scope.imageid) {\r\n $http.post('/Execute/GetUserMediaById', [$scope.imageid]).success(function (d) {\r\n var img = d.RS_0[0]\r\n $scope.src = 'https://s3.amazonaws.com/' + img.S3Path\r\n });\r\n }\r\n });\r\n }\r\n }\r\n});\r\napp.directive('mediaLibrary', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: { qid: \"=\", hidestart: \"=\", profiletab: \"=\", programtab: \"=\" },\r\n templateUrl: '/app/tpls/mediaLib.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, ngIntroService) { }\r\n }\r\n});\r\napp.controller('QuestionLibCtl', function ($scope, $rootScope, $http, $compile, $stateParams, $filter, $timeout, $location, $state, toastr, toastrConfig, ngIntroService, $templateCache) {\r\n $scope.startup = function () {\r\n \r\n function flattentree(nodes, parent, lst) {\r\n if (!lst) { lst = [] }\r\n angular.forEach(nodes, function (node) {\r\n if (node.nodes) {\r\n lst = flattentree(node.nodes, node, lst)\r\n } else {\r\n var Idexists = false;\r\n angular.forEach(lst, function (itm) {\r\n if (itm.node.Id == node.Id) { Idexists = true };\r\n });\r\n if (Idexists) {\r\n lst.push({ parent: parent, node: node });\r\n }\r\n }\r\n });\r\n return lst;\r\n }\r\n $templateCache.remove($scope.QuestionTemp);\r\n $scope.QuestionTemp = 'nodes_renderer.html'\r\n $scope.CleanTree = function (tree) {\r\n //var tree = ($scope.QuestionTree)\r\n var lst = flattentree(tree);\r\n //console.log(lst)\r\n var newlist = []\r\n angular.forEach(lst, function (itm) {\r\n\r\n })\r\n return newlist\r\n\r\n }\r\n\r\n $scope.DeleteFolder = function (parent, index) {\r\n ////console.log(parent.$parent.$parent.$modelValue, index);\r\n parent.$parent.$parent.$modelValue.splice(index, 1);\r\n $scope.SaveTree();\r\n }\r\n $scope.SaveTree = function (fn) {\r\n console.log('tree', JSON.stringify($scope.QuestionTree))\r\n $http.post('/Execute/SaveUserQuestionTree', [$scope.User.UserId, JSON.stringify($scope.QuestionTree)]).success(function (d) {\r\n // //console.log(d)\r\n //console.log('Saved Tree')\r\n $scope.TreeSaved = true\r\n if (fn) {\r\n fn()\r\n }\r\n }); \r\n }\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n $scope.UndoTree = function () {\r\n //console.log([$scope.User.UserId])\r\n $http.post('/Execute/RemoveLastUserQuestionTree', [$scope.User.UserId]).success(function (d) {\r\n $scope.load(true)\r\n });\r\n }\r\n $scope.EditNode = function (obj) {\r\n if (obj.nodes) {\r\n obj.EditName = true;\r\n $scope.changeName = true\r\n //console.log($scope.QuestionTree)\r\n } else {\r\n $scope.Rollback = angular.copy(obj)\r\n $scope.CurrentQuestion = obj\r\n $scope.CurrentQuestion.RemediationType = obj.RemediationType\r\n $scope.IsEditing = true;\r\n }\r\n //console.log($scope.CurrentQuestion)\r\n }\r\n $scope.EditNameSave = function (obj) {\r\n delete obj.EditName;\r\n $scope.changeName = false\r\n $scope.SaveTree()\r\n }\r\n $scope.checkForUnsaved = function (obj) {\r\n if (obj.nodes) {\r\n delete obj.EditName\r\n }\r\n }\r\n $scope.searchstatus = ''\r\n $scope.qfilter = ''\r\n\r\n $scope.TreeOptions = {\r\n removed: function (e) {\r\n //console.log(e)\r\n },\r\n dropped: function (e) {\r\n //console.log(e)\r\n $scope.SaveTree()\r\n },\r\n toggle: function () {\r\n //$scope.SaveTree()\r\n },\r\n //accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n // var retval = true\r\n // //console.log(sourceNodeScope)\r\n // //console.log(destNodesScope)\r\n // if (destNodesScope.$modelValue.Id) {\r\n // retval = false;\r\n // } else {\r\n // if (destNodesScope.$modelValue.length > 0) {\r\n // angular.forEach(destNodesScope.$modelValue, function (nd) {\r\n // if (nd.Id == sourceNodeScope.$modelValue.Id) {\r\n // retval = (sourceNodeScope.$parent.$modelValue == destNodesScope.$modelValue);\r\n // ////console.log(destIndex)\r\n // }\r\n // if (!nd.Id) {\r\n // retval = true;\r\n // }\r\n // });\r\n // }\r\n // else {\r\n // ////console.log(destNodesScope)\r\n // retval = true;\r\n // }\r\n\r\n // }\r\n // return retval;\r\n //}\r\n }\r\n $scope.textAreaSetup = function ($element) {\r\n $compile($element.contents())($scope);\r\n };\r\n $scope.NewFolder = function (folder) {\r\n if (!folder) {\r\n folder = $scope.QuestionTree\r\n }\r\n var folderCount = new Number(0)\r\n angular.forEach(folder, function (f) {\r\n if (f.nodes) { folderCount += 1 }\r\n })\r\n $scope.QuestionTree.push({ Id: guid(), Name: \"Folder \" + (parseInt(folderCount) + 1), nodes: [] })\r\n $scope.SaveTree()\r\n }\r\n $scope.User = $rootScope.User;\r\n $scope.IsQuestionInNodes = function (qid, nodes) {\r\n var retval = false\r\n angular.forEach(nodes, function (node) {\r\n node.isCollapsed = false\r\n if (node.Id) {\r\n if (node.Id == qid) {\r\n retval = true;\r\n ////console.log($scope.CurrentQuestionList[qid])\r\n node.Answers = $scope.CurrentQuestionList[qid].Answers\r\n node.AnswersJSON = $scope.CurrentQuestionList[qid].AnswersJSON\r\n node.CaseBased = $scope.CurrentQuestionList[qid].CaseBased\r\n node.CorrectIndex = $scope.CurrentQuestionList[qid].CorrectIndex\r\n node.CorrectRemediation = $scope.CurrentQuestionList[qid].CorrectRemediation\r\n node.DifficultyLevel_Id = $scope.CurrentQuestionList[qid].DifficultyLevel_Id\r\n node.HTML = $scope.CurrentQuestionList[qid].HTML\r\n node.IncorrectRemediation = $scope.CurrentQuestionList[qid].IncorrectRemediation\r\n node.Keywords = $scope.CurrentQuestionList[qid].Keywords\r\n node.LastReview = $scope.CurrentQuestionList[qid].LastReview\r\n node.LastReviewBy = $scope.CurrentQuestionList[qid].LastReviewBy\r\n node.MultiAnswer = $scope.CurrentQuestionList[qid].MultiAnswer\r\n node.Name = $scope.CurrentQuestionList[qid].Name\r\n node.PhysicianTask_Id = $scope.CurrentQuestionList[qid].PhysicianTask_Id\r\n node.SpecialPopulation_Id = $scope.CurrentQuestionList[qid].SpecialPopulation_Id\r\n node.Tags = $scope.CurrentQuestionList[qid].Tags\r\n node.PrivacyModeId = $scope.CurrentQuestionList[qid].PrivacyModeId\r\n node.StatusId = $scope.CurrentQuestionList[qid].StatusId\r\n }\r\n }\r\n if (node.nodes) {\r\n if ($scope.IsQuestionInNodes(qid, node.nodes)) {\r\n retval = true;\r\n }\r\n } else {\r\n node = $scope.CurrentQuestionList[qid]\r\n ////console.log($scope.CurrentQuestionList[qid])\r\n\r\n }\r\n });\r\n return retval;\r\n }\r\n $scope.ViewNode = function (node) {\r\n node.isCollapsed = !node.isCollapsed\r\n }\r\n $scope.loading = false\r\n $scope.load = function (notreecolapse) {\r\n $scope.loading = true\r\n var IsFirstRun\r\n $scope.QuestionTree = []\r\n //console.log($scope.User.UserId)\r\n $http.post('/Execute/GetUserQuestions', [$scope.User.UserId]).success(function (d) {\r\n //console.log(d)\r\n $scope.Questions = d.RS_0;\r\n $scope.PrivateQuestions = jQuery.grep($scope.Questions, function (q) {\r\n return (q.PrivacyModeId == \"1\");\r\n });\r\n $scope.OrgOnlyQuestions = jQuery.grep($scope.Questions, function (q) {\r\n return (q.PrivacyModeId == \"2\");\r\n });\r\n $scope.AuthorsOnlyQuestions = jQuery.grep($scope.Questions, function (q) {\r\n return (q.PrivacyModeId == \"3\");\r\n });\r\n $scope.PublicQuestions = jQuery.grep($scope.Questions, function (q) {\r\n return (q.PrivacyModeId == \"4\");\r\n });\r\n $scope.qcountTooltip = \"

Private: \" + $scope.PrivateQuestions.length + \"
Shared w/ Org: \" + $scope.OrgOnlyQuestions.length + \"

\";\r\n //$scope.qcountTooltip += \"
Shared w/ All Authors: \"+$scope.AuthorsOnlyQuestions.length+\"
Public: \"+$scope.PublicQuestions.length;\r\n $scope.CurrentQuestionList = [];\r\n var tmpTree\r\n if (d.RS_1.length > 0) {\r\n tmpTree = JSON.parse(d.RS_1[0].TreeJSON);\r\n IsFirstRun = false\r\n\r\n } else {\r\n tmpTree = []\r\n IsFirstRun = true\r\n }\r\n\r\n //$scope.QuestionTree = $scope.CleanTree(tmpTree)\r\n $scope.QuestionTree = tmpTree\r\n ////console.log($scope.QuestionTree)\r\n //$scope.publishedToggle = false\r\n $scope.currentFilter = 'uiTreeFilter'\r\n $scope.treeFilter = $filter($scope.currentFilter);\r\n //$scope.togglePublished = function (toggle) {\r\n // $scope.publishedToggle = toggle\r\n // if ($scope.publishedToggle == false) {\r\n // $scope.currentFilter = 'uiTreeFilter'\r\n // }\r\n // if ($scope.publishedToggle == true) {\r\n // $scope.currentFilter = 'uiTreeFilterStatus'\r\n // }\r\n // $scope.treeFilter = $filter($scope.currentFilter);\r\n // //console.log($scope.treeFilter)\r\n //}\r\n $scope.childlessFilter = function (filtered) {\r\n if (filtered.nodes && $scope.publishedToggle == true) {\r\n //console.log(filtered.nodes)\r\n //$filter('filter')(filtered, filtered.nodes.length > 0)\r\n }\r\n ////console.log(filtered)\r\n //$filter('filter')(filtered, filtered.length > 0)\r\n }\r\n angular.forEach($scope.Questions, function (q) {\r\n $scope.CurrentQuestionList[q.Id] = q\r\n q.Tags = []\r\n var kw = q.Keywords.split(',')\r\n angular.forEach(kw, function (w) {\r\n q.Tags.push({ text: w });\r\n });\r\n try {\r\n q.Answers = JSON.parse(q.AnswersJSON);\r\n angular.forEach(q.Answers, function (ans) {\r\n ans.HTML = ans.HTML.replace(new RegExp('<', 'g'), '<').replace(new RegExp('>', 'g'), '>').replace(new RegExp('&', 'g'), '&');\r\n\r\n })\r\n }\r\n catch (err) {\r\n ////console.log(q.QuestionId)\r\n ////console.log(err.message);\r\n ////console.log(\"Value\" + q.AnswersJSON);\r\n }\r\n if (q.MultiAnswer == \"True\") {\r\n q.MultiAnswer = 1\r\n } else {\r\n if (q.Answers.length == 2) {\r\n q.MultiAnswer = -1\r\n } else {\r\n q.MultiAnswer = 0\r\n }\r\n angular.forEach(q.Answers, function (a, idx) {\r\n if (a.IsCorrect) {\r\n q.CorrectIndex = idx\r\n }\r\n })\r\n }\r\n //if (IsFirstRun) {\r\n // $scope.QuestionTree.push(q)\r\n //}\r\n\r\n })\r\n //console.log('loading')\r\n angular.forEach($scope.Questions, function (q) {\r\n if ($scope.IsQuestionInNodes(q.Id, $scope.QuestionTree) == false) {\r\n $scope.QuestionTree.push(q)\r\n }\r\n })\r\n //if (!notreecolapse) {\r\n // $timeout(function () {\r\n // $scope.$broadcast('angular-ui-tree:collapse-all');\r\n // }, 500);\r\n //}\r\n \r\n //console.log($scope.QuestionTree)\r\n $timeout(function () {\r\n $scope.loading = false\r\n },0)\r\n });\r\n };\r\n $scope.SetRtype = function (q) {\r\n\r\n }\r\n $scope.EditQuestion = function (q) {\r\n $scope.Rollback = angular.copy(q)\r\n $scope.CurrentQuestion = q\r\n $scope.IsEditing = true;\r\n //console.log($scope.Rollback)\r\n };\r\n $scope.newq = false\r\n $scope.NewQuestion = function () {\r\n $scope.newq = true\r\n $scope.CurrentQuestion = { Id: 0, Name: '', HTML: '', MultiAnswer: 0, IncorrectRemediation: '', CorrectRemediation: '', RemediationType: 1, Answers: [], PrivacyModeId: \"1\", StatusId: \"-1\", PlaceHolderText: 'Remediation' }\r\n $scope.IsEditing = true;\r\n //console.log($scope.CurrentQuestion)\r\n };\r\n $scope.SetAnswerCorrect = function (q, idx) {\r\n //$scope.CurrentQuestion.CorrectIndex = idx\r\n angular.forEach(q.Answers, function (a, i) {\r\n a.IsCorrect = false;\r\n if (i == idx) {\r\n a.IsCorrect = true;\r\n }\r\n });\r\n }\r\n $scope.changed = false\r\n $scope.isChanged = function () {\r\n ////console.log('changing')\r\n $scope.changed = true\r\n }\r\n function CommitQuestion(q) {\r\n var params = [\r\n q.Id,\r\n $scope.User.UserId,\r\n q.Name,\r\n q.HTML,\r\n q.CorrectRemediation,\r\n q.IncorrectRemediation,\r\n q.Keywords,\r\n ((q.MultiAnswer < 1) ? 0 : 1),\r\n (1 * q.PrivacyModeId),\r\n (1 * q.StatusId)\r\n ];\r\n $http.post('/Execute/SaveUserQuestion', params).success(function (d) {\r\n $scope.CurrentQuestion.Id = d.RS_0[0].Id\r\n var aIds = []\r\n angular.forEach($scope.CurrentQuestion.Answers, function (a) {\r\n aIds.push(a.Id)\r\n })\r\n var p = [$scope.CurrentQuestion.Id, aIds.join(\",\")]\r\n $http.post(\"/Execute/DeleteUserQuestionAnswersNotIn\", p).success(function (dta) {\r\n SaveAnswer($scope.CurrentQuestion.Answers, 0, function () {\r\n \r\n })\r\n })\r\n $timeout(function () {\r\n $scope.SaveTree(function () {\r\n toastr['success']('Question Saved!');\r\n //$scope.IsEditing = false;\r\n $scope.changed = false\r\n $scope.load(true)\r\n })\r\n })\r\n \r\n });\r\n }\r\n function SaveAnswer(lst, idx, fn) {\r\n if (idx < lst.length) {\r\n var a = lst[idx]\r\n $http.post('/Execute/SaveUserQuestionAnswer', [a.Id, a.HTML, a.IsCorrect, $scope.CurrentQuestion.Id]).success(function (dta) {\r\n a.Id = dta.RS_0[0].Id\r\n SaveAnswer(lst, idx + 1, fn)\r\n //$scope.load();\r\n });\r\n } else {\r\n fn()\r\n }\r\n }\r\n $scope.SaveQuestion = function () {\r\n var q = $scope.CurrentQuestion\r\n var validationText = '';\r\n if (!q.Answers || q.Answers.length < 2) {\r\n validationText += 'Question must have at least 2 Answers\\n'\r\n }\r\n var hasCorrect = false;\r\n angular.forEach(q.Answers, function (a) {\r\n if (a.IsCorrect) {\r\n hasCorrect = true;\r\n }\r\n });\r\n if (!hasCorrect) {\r\n validationText += 'Question must have at least 1 Correct Answer\\n'\r\n }\r\n if (validationText != '') {\r\n swal({ title: \"Validation Error!\", text: validationText, type: \"error\" })\r\n }\r\n if (!q.StatusId || q.StatusId == -1) {\r\n swal({ title: \"Validation Error!\", text: 'Please set a Publish Status for your Question', type: \"error\", html: true })\r\n }\r\n else {\r\n if (q.RemediationType == 0) {\r\n q.CorrectRemediation = 'Correct Answer';\r\n q.IncorrectRemediation = 'Incorrect Answer';\r\n }\r\n if (q.RemediationType == 1) {\r\n q.CorrectRemediation = q.IncorrectRemediation\r\n }\r\n\r\n var kw = []\r\n angular.forEach(q.Tags, function (t) {\r\n kw.push(t.text)\r\n });\r\n q.Keywords = kw.join(',');\r\n var oldStatus = \"0\";\r\n if ($scope.Rollback) {\r\n oldStatus = $scope.Rollback.StatusId;\r\n }\r\n if (q.StatusId != \"1\" && oldStatus == 1) {\r\n $http.post('/Execute/CheckIsQinExam', [q.Id]).success(function (dq) {\r\n if (dq.RS_0.length > 0) {\r\n var alertText = \"
\";\r\n angular.forEach(dq.RS_0, function (exam) {\r\n if (exam.OwnerId == $rootScope.User.UserId) {\r\n alertText += exam.Name + \" (Created by you)
\";\r\n } else {\r\n alertText += exam.Name + \" (Created by \" + exam.DisplayName + \")
\";\r\n }\r\n });\r\n\r\n swal({\r\n title: \"There are Custom Exams are using this question\",\r\n text: \"The Question will be hidden in the following Custom Exams while the Question Status is not 'Published' if you choose "Yes":\" + alertText + \"Do you want to Change the Published Status?\",\r\n type: \"warning\",\r\n buttons: true,\r\n confirmButtonText: \"Yes, Change it\",\r\n cancelButtonText: \"No, Don't Change it\",\r\n showCancelButton: true,\r\n html: true\r\n }, function (result) {\r\n if (result) {\r\n\r\n CommitQuestion(q);\r\n }\r\n else {\r\n q.StatusId = $scope.Rollback.StatusId\r\n CommitQuestion(q);\r\n }\r\n\r\n })\r\n } else {\r\n CommitQuestion(q);\r\n }\r\n });\r\n } else {\r\n CommitQuestion(q);\r\n }\r\n\r\n\r\n }\r\n };\r\n $scope.CancelEdit = function () {\r\n //console.log($scope.changeName)\r\n if (($scope.IsEditing == true && $scope.changed == true)) {\r\n swal({\r\n title: \"You have unsaved changes to your Question!\",\r\n text: \"Do you want to Cancel?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n $scope.CurrentQuestion = $scope.Rollback\r\n $scope.IsEditing = false;\r\n $scope.changed = false\r\n if ($scope.newq == true) {\r\n $scope.newq = false\r\n }\r\n $scope.load(true);\r\n }\r\n else if (result.dismiss === 'cancel') {\r\n //$scope.removeUnloadEvent(event, next)\r\n event.preventDefault();\r\n }\r\n })\r\n }\r\n else {\r\n if ($scope.newq == true) {\r\n $scope.newq = false\r\n }\r\n $scope.IsEditing = false;\r\n $scope.changed = false\r\n $scope.load(true)\r\n }\r\n\r\n };\r\n $scope.RemoveAnswer = function (q, aid, idx) {\r\n for (i = 0; i < q.Answers.length;i++) {\r\n if (idx == i) {\r\n\r\n q.Answers.splice(i, 1)\r\n angular.forEach(q.Answers, function (qa, i) {\r\n if (qa.IsCorrect == true && q.MultiAnswer == 0) {\r\n q.CorrectIndex = i\r\n }\r\n })\r\n }\r\n }\r\n }\r\n $scope.AddAnswer = function (q) {\r\n //console.log(q)\r\n if (!q.Answers) {\r\n q.Answers = []\r\n }\r\n q.Answers.push({ Id: 0, HTML: '', IsCorrect: false })\r\n }\r\n $scope.SetQtype = function (q) {\r\n if (q.Answers) {\r\n angular.forEach(q.Answers, function (qa) {\r\n qa.IsCorrect = false\r\n })\r\n q.CorrectIndex = null\r\n } \r\n //if (q.MultiAnswer == -1) {\r\n // q.Answers = [{ HTML: 'True', IsCorrect: true }, { HTML: 'False', IsCorrect: false }]\r\n //} else {\r\n // q.Answers = []\r\n //}\r\n ////console.log(q)\r\n\r\n };\r\n var changing = function (event, next) {\r\n if (($scope.IsEditing == true && $scope.changed == true)) {\r\n ////console.log('test listener')\r\n event.returnValue = function () {\r\n return true\r\n }\r\n }\r\n }\r\n $scope.handleUnloadEvent = function ($event, next) {\r\n $event.preventDefault()\r\n window.removeEventListener('beforeunload', changing)\r\n \r\n swal({\r\n title: 'You have unsaved changes to your Question!',\r\n text: \"Do you want to leave?\",\r\n type: \"warning\",\r\n showCancelButton: true,\r\n }, function (result) {\r\n if (result) {\r\n angular.forEach($scope.QuestionTree, function (qt) {\r\n $scope.checkForUnsaved(qt)\r\n })\r\n if (next.url.search(':Id') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':Id', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n window.location.href = next.overrideurl\r\n }\r\n else if (next.url.search(':CourseId') >= 0) {\r\n ////console.log('url search start: ', next.url)\r\n next.overrideurl = next.overrideurl.replace(':CourseId', $rootScope.UserSettings.PersistentCourseId)\r\n //console.log('changed: ', next.overrideurl)\r\n //$window.location.href = next.url\r\n window.location.href = next.overrideurl\r\n }\r\n else {\r\n //console.log(next)\r\n if (next.overrideurl) {\r\n window.location.href = next.overrideurl\r\n }\r\n else {\r\n window.location.href = next.url\r\n }\r\n }\r\n }\r\n else {\r\n window.addEventListener('beforeunload', changing)\r\n $event.preventDefault()\r\n }\r\n })\r\n }\r\n $rootScope.$on('Qexception', function (exception, cause) {\r\n //\r\n $timeout(function () {\r\n //console.log('going')\r\n \r\n })\r\n })\r\n $rootScope.$on('$stateChangeStart', function (event, next) {\r\n ////console.log(next, event)\r\n $scope.SaveTree()\r\n if (($scope.IsEditing == true && $scope.changed == true)) {\r\n $scope.handleUnloadEvent(event, next)\r\n }\r\n else {\r\n angular.forEach($scope.QuestionTree, function (qt) {\r\n $scope.checkForUnsaved(qt)\r\n })\r\n }\r\n });\r\n window.addEventListener('beforeunload', changing)\r\n $scope.load();\r\n $timeout(function () {\r\n $scope.SaveTree();\r\n }, 100)\r\n \r\n //\r\n }\r\n $scope.startup()\r\n})\r\n .factory('$exceptionHandler', function ($injector) {\r\n return function (exception, cause) {\r\n var rScope = $injector.get('$rootScope');\r\n //if (rScope) {\r\n // rScope.$broadcast('Qexception', exception, cause);\r\n //}\r\n }\r\n\r\n});\r\napp.directive('questionLibrary', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter, $timeout, $location, $state, toastr, toastrConfig) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: { qid: \"=\", hidestart: \"=\", profiletab: \"=\", programtab: \"=\", refresh: \"=\", },\r\n templateUrl: '/app/tpls/questionLibrary.html',\r\n controller: 'QuestionLibCtl'\r\n }\r\n});\r\napp.directive('milestones', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestones.htm',\r\n scope: {\r\n specialty: '=',\r\n institutionid: '=',\r\n milestoneaccess: '=',\r\n classes: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n ////console.log(toastrConfig);\r\n //function assigncalendar(baConfig) {\r\n // var dashboardColors = baConfig.colors.dashboard;\r\n ////////console.log(GanttData)\r\n //if ($scope.milestoneaccess == undefined) {\r\n // ////console.log('solved')\r\n // $scope.milestoneaccess = false\r\n //}\r\n ////console.log($scope.specialty)\r\n $scope.today = new Date(\"January 1, 2018 01:01:01\")\r\n $scope.milestoneDisplay = 'User'\r\n $scope.overviewDisplay = 'Summary'\r\n $scope.selectedms = 1\r\n $scope.changems = function (ms) {\r\n $scope.selectedms = ms\r\n }\r\n if (!$rootScope.InstitutionSettings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [$rootScope.User.InstitutionId]).success(function (inst) {\r\n $rootScope.InstitutionSettings = JSON.parse(inst.RS_0[0].SettingsJSON);\r\n ////console.log($rootScope.InstitutionSettings)\r\n })\r\n }\r\n $http.post(\"/Execute/GetAssignableUsersForInstitution\", [$scope.institutionid]).success(function (cal) {\r\n $scope.InstitutionUserList = cal.RS_0;\r\n ////console.log($scope.InstitutionUserList)\r\n\r\n ////console.log($rootScope.InstitutionSettings.StudentClasses)\r\n $scope.Show1 = [1, 2, 3, 4]\r\n $scope.mslFilter = []\r\n $scope.mslFilterList = function (msls) {\r\n //console.log('msls', msls, 'mslFilter', $scope.mslFilter)\r\n $scope.noAdd = false\r\n angular.forEach($scope.mslFilter, function (mf) {\r\n angular.forEach(msls, function (ms) {\r\n if (mf === ms) {\r\n $scope.noAdd = true\r\n //console.log(ms)\r\n $scope.mslFilter = $filter('filter')($scope.mslFilter, '!' + ms)\r\n //console.log($scope.mslFilter)\r\n }\r\n })\r\n })\r\n ////console.log($scope.noAdd)\r\n if ($scope.noAdd == false) {\r\n //console.log('false')\r\n if ($scope.mslFilter.length == 0) {\r\n $scope.mslFilter = msls\r\n }\r\n else {\r\n \r\n $scope.mslFilter = $scope.mslFilter.concat(msls)\r\n //console.log('concat')\r\n \r\n \r\n }\r\n }\r\n //console.log($scope.noAdd, $scope.mslFilter)\r\n }\r\n \r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n\r\n $scope.predicate = 'LastName';\r\n $scope.reverse = true;\r\n $scope.order = function (predicate) {\r\n $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;\r\n $scope.predicate = predicate;\r\n };\r\n $scope.ms = 1\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n //////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n $scope.filterqueuez = []\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n $scope.toggleDisplay = function () {\r\n if ($scope.milestoneDisplay == 'User') {\r\n $scope.milestoneDisplay = 'Milestone'\r\n }\r\n else {\r\n $scope.milestoneDisplay = 'User'\r\n }\r\n }\r\n $scope.toggleOverview = function () {\r\n if ($scope.overviewDisplay == 'Summary') {\r\n $scope.overviewDisplay = 'Edit'\r\n $scope.changeuser($scope.milestone.Users[0])\r\n ////console.log($scope.milestone.Users[0])\r\n }\r\n else {\r\n $scope.overviewDisplay = 'Summary'\r\n $scope.updateAverage()\r\n }\r\n }\r\n $scope.gotoUser = function (user) {\r\n $scope.toggleOverview()\r\n $scope.milestoneDisplay = 'User'\r\n $scope.changeuser(user)\r\n //////console.log(user, $scope.milestoneDisplay)\r\n }\r\n $scope.gotoMilestone = function (milestone) {\r\n $scope.toggleDisplay()\r\n $scope.ms = milestone.M\r\n $scope.changems($scope.ms)\r\n }\r\n $scope.pageSizeChange = function (page) {\r\n $scope.PageSize = page\r\n $scope.PageSizze = page\r\n }\r\n $scope.changeuser = function (user) {\r\n //console.log(user)\r\n if ($scope.specialty == 1) {\r\n user.milestoneslevel[0].msltext = 'Emergency Stabilization (PC1) Prioritizes critical initial stabilization action and mobilizes hospital support services in the resuscitation of a critically ill or injured patient and reassesses after stabilizing intervention.'\r\n user.milestoneslevel[1].msltext = 'Performance of Focused History and Physical Exam (PC2) Abstracts current findings in a patient with multiple chronic medical problems and, when appropriate, compares with a prior medical record and identifies significant differences between the current presentation and past presentations.'\r\n user.milestoneslevel[2].msltext = 'Diagnostic Studies (PC3) Applies the results of diagnostic testing based on the probability of disease and the likelihood of test results altering management.'\r\n user.milestoneslevel[3].msltext = 'Diagnosis (PC4) Based on all of the available data, narrows and prioritizes the list of weighted differential diagnoses to determine appropriate management.'\r\n user.milestoneslevel[4].msltext = 'Pharmacotherapy (PC5) Selects and prescribes, appropriate pharmaceutical agents based upon relevant considerations such as mechanism of action, intended effect, financial considerations, possible adverse effects, patient preferences, allergies, potential drug-food and drug-drug interactions, institutional policies, and clinical guidelines; and effectively combines agents and monitors and intervenes in the advent of adverse effects in the ED.'\r\n user.milestoneslevel[5].msltext = 'Observation and Reassessment (PC6) Re-evaluates patients undergoing ED observation (and monitoring) and using appropriate data and resources, determines the differential diagnosis and, treatment plan, and displosition.'\r\n user.milestoneslevel[6].msltext = 'Disposition (PC7) Establishes and implements a comprehensive disposition plan that uses appropriate consultation resources; patient education regarding diagnosis; treatment plan; medications; and time and location specific disposition instructions.'\r\n user.milestoneslevel[7].msltext = 'Multi-tasking (Task-switching) (PC8) Employs task switching in an efficient and timely manner in order to manage the ED.'\r\n user.milestoneslevel[8].msltext = 'General Approach to Procedures (PC9) Performs the indicated procedure on all appropriate patients (including those who are uncooperative, at the extremes of age, hemodynamically unstable and those who have multiple co-morbidities, poorly defined anatomy, high risk for pain or procedural complications, sedation requirement), takes steps to avoid potential complications, and recognizes the outcome and/or complications resulting from the procedure.'\r\n user.milestoneslevel[9].msltext = 'Airway Management (PC10) Performs airway management on all appropriate patients (including those who are uncooperative, at the extremes of age, hemodynamically unstable and those who have multiple co-morbidities, poorly defined anatomy, high risk for pain or procedural complications, sedation requirement), takes steps to avoid potential complications, and recognize the outcome and/or complications resulting from the procedure.'\r\n user.milestoneslevel[10].msltext = 'Anesthesia and Acute Pain Management (PC11) Provides safe acute pain management, anesthesia, and procedural sedation to patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[11].msltext = 'Other Diagnostic and Therapeutic Procedures: Goal-directed Focused Ultrasound (Diagnostic/Procedural) (PC12) Uses goal-directed focused Ultrasound for the bedside diagnostic evaluation of emergency medical conditions and diagnoses, resuscitation of the acutely ill or injured patient, and procedural guidance.'\r\n user.milestoneslevel[12].msltext = 'Other Diagnostic and Therapeutic Procedures: Wound Management (PC13) Assesses and appropriately manages wounds in patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[13].msltext = 'Other Diagnostic and Therapeutic Procedures: Vascular Access (PC14) Successfully obtains vascular access in patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[14].msltext = 'Medical Knowledge (MK) Demonstrates appropriate medical knowledge in the care of emergency medicine patients.'\r\n user.milestoneslevel[15].msltext = 'Patient Safety (SBP1) Participates in performance improvement to optimize patient safety.'\r\n user.milestoneslevel[16].msltext = 'Systems-based Management (SBP2) Participates in strategies to improve healthcare delivery and flow. Demonstrates an awareness of and responsiveness to the larger context and system of health care.'\r\n user.milestoneslevel[17].msltext = 'Technology (SBP3) Uses technology to accomplish and document safe healthcare delivery.'\r\n user.milestoneslevel[18].msltext = 'Practice-based Performance Improvement (PBLI) Participates in performance improvement to optimize ED function, self-learning, and patient care.'\r\n user.milestoneslevel[19].msltext = 'Professional values (PROF1) Demonstrates compassion, integrity, and respect for others as well as adherence to the ethical principles relevant to the practice of medicine.'\r\n user.milestoneslevel[20].msltext = 'Accountability (PROF2) Demonstrates accountability to patients, society, profession and self.'\r\n user.milestoneslevel[21].msltext = 'Patient Centered Communication (ICS1) Demonstrates interpersonal and communication skills that result in the effective exchange of information and collaboration with patients and their families.'\r\n user.milestoneslevel[22].msltext = 'Team Management (ICS2) Leads patient-centered care teams, ensuring effective communication and mutual respect among members of the team.'\r\n $scope.selecteduser = user\r\n }\r\n if ($scope.specialty == 2) {\r\n\r\n user.milestoneslevel[0].msltext = 'PC-1 Cares for acutely ill or injured patients in urgent and emergent situations and in all settings'\r\n user.milestoneslevel[1].msltext = 'PC-2 Cares for patients with chronic conditions'\r\n user.milestoneslevel[2].msltext = 'PC-3 Partners with the patient, family, and community to improve health through disease prevention and health promotion'\r\n user.milestoneslevel[3].msltext = 'PC-4 Partners with the patient to address issues of ongoing signs, symptoms, or health concerns that remain over time without clear diagnosis despite evaluation and treatment, in a patient-centered, cost-effective manner'\r\n user.milestoneslevel[4].msltext = 'PC-5 Performs specialty-appropriate procedures to meet the health care needs of individual patients, families, and communities, and is knowledgeable about procedures performed by other specialists to guide their patients\\' care'\r\n user.milestoneslevel[5].msltext = 'MK-1 Demonstrates medical knowledge of sufficient breadth and depth to practice family medicine'\r\n user.milestoneslevel[6].msltext = 'MK-2 Applies critical thinking skills in patient care'\r\n user.milestoneslevel[7].msltext = 'SBP-1 Provides cost-conscious medical care'\r\n user.milestoneslevel[8].msltext = 'SBP-2 Emphasizes patient safety'\r\n user.milestoneslevel[9].msltext = 'SBP-3 Advocates for individual and community health'\r\n user.milestoneslevel[10].msltext = 'SBP-4 Coordinates team-based care'\r\n user.milestoneslevel[11].msltext = 'PBLI -1 Locates, appraises, and assimilates evidence from scientific studies related to the patients\\' health problems'\r\n user.milestoneslevel[12].msltext = 'PBLI-2 Demonstrates self-directed learning'\r\n user.milestoneslevel[13].msltext = 'PBLI-3 Improves systems in which the physician provides care'\r\n user.milestoneslevel[14].msltext = 'PROF-1 Completes a process of professionalization'\r\n user.milestoneslevel[15].msltext = 'PROF-2 Demonstrates professional conduct and accountability'\r\n user.milestoneslevel[16].msltext = 'PROF-3 Demonstrates humanism and cultural proficiency'\r\n user.milestoneslevel[17].msltext = 'PROF-4 Maintains emotional, physical, and mental health; and pursues continual personal and professional growth'\r\n user.milestoneslevel[18].msltext = 'C-1 Develops meaningful, therapeutic relationships with patients and families'\r\n user.milestoneslevel[19].msltext = 'C-2 Communicates effectively with patients, families, and the public'\r\n user.milestoneslevel[20].msltext = 'C-3 Develops relationships and effectively communicates with physicians, other health professionals, and health care teams'\r\n user.milestoneslevel[21].msltext = 'C-4 Utilizes technology to optimize communication'\r\n $scope.selecteduser = user\r\n }\r\n if ($scope.specialty == 3) {\r\n user.milestoneslevel[0].msltext = '1. Gathers and synthesizes essential and accurate information to define each patient\\'s clinical problem(s). (PC1)'\r\n user.milestoneslevel[1].msltext = '2. Develops and achieves comprehensive management plan for each patient. (PC2)'\r\n user.milestoneslevel[2].msltext = '3. Manages patients with progressive responsibility and independence. (PC3)'\r\n user.milestoneslevel[3].msltext = '4. Skill in performing procedures. (PC4)'\r\n user.milestoneslevel[4].msltext = '5. Requests and provides consultative care. (PC5)'\r\n user.milestoneslevel[5].msltext = '6. Clinical knowledge (MK1)'\r\n user.milestoneslevel[6].msltext = '7. Knowledge of diagnostic testing and procedures. (MK2)'\r\n user.milestoneslevel[7].msltext = '8. Works effectively within an interprofessional team (e.g. peers, consultants, nursing, ancillary professionals and other support personnel). (SBP1)'\r\n user.milestoneslevel[8].msltext = '9. Recognizes system error and advocates for system improvement. (SBP2)'\r\n user.milestoneslevel[9].msltext = '10. Identifies forces that impact the cost of health care, and advocates for, and practices cost-effective care. (SBP3)'\r\n user.milestoneslevel[10].msltext = '11. Transitions patients effectively within and across health delivery systems. (SBP4)'\r\n user.milestoneslevel[11].msltext = '12. Monitors practice with a goal for improvement. (PBLI1)'\r\n user.milestoneslevel[12].msltext = '13. Learns and improves via performance audit. (PBLI2)'\r\n user.milestoneslevel[13].msltext = '14. Learns and improves via feedback. (PBLI3)'\r\n user.milestoneslevel[14].msltext = '15. Learns and improves at the point of care. (PBLI4)'\r\n user.milestoneslevel[15].msltext = '16. Has professional and respectful interactions with patients, caregivers and members of the interprofessional team (e.g. peers, consultants, nursing, ancillary professionals and support personnel). (PROF1)'\r\n user.milestoneslevel[16].msltext = '17. Accepts responsibility and follows through on tasks. (PROF2)'\r\n user.milestoneslevel[17].msltext = '18. Responds to each patient\\'s unique characteristics and needs. (PROF3)'\r\n user.milestoneslevel[18].msltext = '19. Exhibits integrity and ethical behavior in professional conduct. (PROF4)'\r\n user.milestoneslevel[19].msltext = '20. Communicates effectively with patients and caregivers. (ICS1)'\r\n user.milestoneslevel[20].msltext = '21. Communicates effectively in interprofessional teams (e.g. peers, consultants, nursing, ancillary professionals and other support personnel). (ICS2)'\r\n user.milestoneslevel[21].msltext = '22. Appropriate utilization and completion of health records. (ICS3)'\r\n user.milestoneslevel[22].msltext = ' '\r\n $scope.selecteduser = user\r\n }\r\n if ($scope.specialty == 4) {\r\n user.milestoneslevel[0].msltext = '1. PC-1 Cares for acutely ill or injured patients in urgent and emergent situations and in all settings'\r\n user.milestoneslevel[1].msltext = '2. PC-2 Cares for patients with chronic conditions '\r\n user.milestoneslevel[2].msltext = '3. PC-3 Partners with the patient, family, and community to improve health through disease prevention and health promotion'\r\n user.milestoneslevel[3].msltext = '4. PC-4 Partners with the patient to address issues of ongoing signs, symptoms, or health concerns that remain over time without clear diagnosis despite evaluation and treatment, in a patient-centered, cost-effective manner'\r\n user.milestoneslevel[4].msltext = '5. PC-5 Performs specialty-appropriate procedures to meet the health care needs of individual patients, families, and communities, and is knowledgeable about procedures performed by other specialists to guide their patients\\' care'\r\n user.milestoneslevel[5].msltext = '6. MK-1 Demonstrates medical knowledge of sufficient breadth and depth to practice family medicine'\r\n user.milestoneslevel[6].msltext = '7. MK-2 Applies critical thinking skills in patient care '\r\n user.milestoneslevel[7].msltext = '8. SBP-1 Provides cost-conscious medical care '\r\n user.milestoneslevel[8].msltext = '9. SBP-2 Emphasizes patient safet'\r\n user.milestoneslevel[9].msltext = '10. SBP-3 Advocates for individual and community health'\r\n user.milestoneslevel[10].msltext = '11. SBP-4 Coordinates team-based car'\r\n user.milestoneslevel[11].msltext = '12. PBLI -1 Locates, appraises, and assimilates evidence from scientific studies related to the patients\\' health problems '\r\n user.milestoneslevel[12].msltext = '13. PBLI-2 Demonstrates self-directed learning '\r\n user.milestoneslevel[13].msltext = '14. PBLI-3 Improves systems in which the physician provides care '\r\n user.milestoneslevel[14].msltext = '15. PROF-1 Completes a process of professionalization '\r\n user.milestoneslevel[15].msltext = '16. PROF-2 Demonstrates professional conduct and accountability'\r\n user.milestoneslevel[16].msltext = '17. PROF-3 Demonstrates humanism and cultural proficiency'\r\n user.milestoneslevel[17].msltext = '18. PROF-4 Maintains emotional, physical, and mental health; and pursues continual personal and professional growth'\r\n user.milestoneslevel[18].msltext = '19. C-1 Develops meaningful, therapeutic relationships with patients and familie'\r\n user.milestoneslevel[19].msltext = '20. C -2 Communicates effectively with patients, families, and the public '\r\n user.milestoneslevel[20].msltext = '21. C -3 Develops relationships and effectively communicates with physicians, other health professionals, and health care teams '\r\n user.milestoneslevel[21].msltext = '22. C-4 Utilizes technology to optimize communication '\r\n $scope.selecteduser = user\r\n }\r\n if ($scope.specialty == 5) {\r\n user.milestoneslevel[0].msltext = 'EPA 1a: Obtain a complete and accurate history in an organized fashion PC2'\r\n user.milestoneslevel[1].msltext = 'EPA 1b: Demonstrate patient-centered interview skills ICS1 ICS7 P1 P3 P5'\r\n user.milestoneslevel[2].msltext = 'EPA 1c: Demonstrate clinical reasoning in gathering focused information relevant to a patient\\'s care KP1'\r\n user.milestoneslevel[3].msltext = 'EPA 1d: Perform a clinically relevant, appropriately thorough physical exam pertinent to the setting and purpose of the patient visit PC2'\r\n user.milestoneslevel[4].msltext = 'EPA 2a: Synthesize essential information from previous records, history, physical exam, and initial diagnostic evaluations to propose a scientifically supported differential diagnosis PC2 KP3 KP4 KP2'\r\n user.milestoneslevel[5].msltext = 'EPA 2b: Prioritize and continue to integrate information as it emerges to update differential diagnosis, while managing ambiguity PC4 KP3 KP4 PPD8 PBL1'\r\n user.milestoneslevel[6].msltext = 'EPA 2c: Engage and communicate with team members for endorsement and verification of the working diagnosis that will inform management plans KP3 KP4 ICS2'\r\n user.milestoneslevel[7].msltext = 'EPA 3a: Recommend first-line cost-effective screening and diagnostic tests for routine health maintenance and common disorders PC5 PC9 SBP3 PBLI9 KP1 KP4'\r\n user.milestoneslevel[8].msltext = 'EPA 3b: Provide rationale for decision to order tests, taking into account preand posttest probability and patient preference PC5 PC7 KP1 KP4 SBP3 PBLI9'\r\n user.milestoneslevel[9].msltext = 'EPA 3c: Interpret results of basic studies and understand the implication and urgency of the results PC4 PC5 PC7 KP1'\r\n user.milestoneslevel[10].msltext = 'EPA 4a: Compose orders efficiently and effectively verbally, on paper, and electronically PC6 PBLI1'\r\n user.milestoneslevel[11].msltext = 'EPA 4b: Demonstrate an understanding of the patient\\'s condition that underpins the provided orders PC5 PC2'\r\n user.milestoneslevel[12].msltext = 'EPA 4c: Recognize and avoid errors by attending to patient-specific factors, using resources, and appropriately responding to safety alerts PBLI7'\r\n user.milestoneslevel[13].msltext = 'EPA 4d: Discuss planned orders and prescriptions with team, patients, and families ICS1 SBP3'\r\n user.milestoneslevel[14].msltext = 'EPA 5a: Prioritize and synthesize information into a cogent narrative for a variety of clinical encounters (e.g., admission, progress, preand post-op, and procedure notes; informed consent; discharge summary) P4 ICS1'\r\n user.milestoneslevel[15].msltext = 'EPA 5b: Follow documentation requirements to meet regulations and professional expectations ICS5 P4 SBP1'\r\n user.milestoneslevel[16].msltext = 'EPA 5c: Document a problem list, differential diagnosis, and plan supported through clinical reasoning that reflects patient\\'s preferences PC4 PC6 ICS1 ICS2'\r\n user.milestoneslevel[17].msltext = 'EPA 6a: Present personally gathered and verified information, acknowledging areas of uncertainty PC2 PBL1 PPD4 P1'\r\n user.milestoneslevel[18].msltext = 'EPA 6b: Provide an accurate, concise, well-organized oral presentation ICS2 PC6'\r\n user.milestoneslevel[19].msltext = 'EPA 6c: Adjust the oral presentation to meet the needs of the receiver ICS1 ICS2 PBL1 PPD7'\r\n user.milestoneslevel[20].msltext = 'EPA 6d: Demonstrate respect for patient\\'s privacy and autonomy P3 P1 PPD4'\r\n user.milestoneslevel[21].msltext = 'EPA 7a: Combine curiosity, objectivity, and scientific reasoning to develop a well-formed, focused, pertinent clinical question (ASK) KP3 PBLI6 PBLI1 PBLI3 '\r\n user.milestoneslevel[22].msltext = 'EPA 7b: Demonstrate awareness and skill in using information technology to access accurate and reliable medical information (ACQUIRE) PBLI6 PBLI7'\r\n user.milestoneslevel[23].msltext = 'EPA 7c: Demonstrate skill in appraising sources, content, and applicability of evidence (APPRAISE) PBLI6 KP3 KP4 '\r\n user.milestoneslevel[24].msltext = 'EPA 7d: Apply findings to individuals and/or patient panels; communicate findings to the patient and team, reflecting on process and outcomes (ADVISE) ICS1 ICS2 PBLI1 PBLI8 PBLI9 PC7'\r\n user.milestoneslevel[25].msltext = 'EPA 8a: Document and update an electronic handover tool and apply this to deliver a structured verbal handover PBLI7 ICS2 ICS3 P3 *Transmitter '\r\n user.milestoneslevel[26].msltext = 'EPA 8b: Conduct handover using communication strategies known to minimize threats to transition of care ICS2 ICS3 *Transmitter'\r\n user.milestoneslevel[27].msltext = 'EPA 8c: Provide succinct verbal communication conveying illness severity, situational awareness, action planning, and contingency planning ICS2 PC8 *Transmitter '\r\n user.milestoneslevel[28].msltext = 'EPA 8d: Give or elicit feedback about handover communication and ensure closed-loop communication PBLI5 ICS2 ICS3 *Transmitter and Receiver'\r\n user.milestoneslevel[29].msltext = 'EPA 8e: Demonstrate respect for patient\\'s privacy and confidentiality P3 *Transmitter and Receiver'\r\n user.milestoneslevel[30].msltext = 'EPA 9a: Identify team members\\' roles and responsibilities and seek help from other members of the team to optimize health care delivery IPC2 SBP2 ICS3'\r\n user.milestoneslevel[31].msltext = 'EPA 9b: Include team members, listen attentively, and adjust communication content and style to align with team-member needs ICS2/IPC3 IPC1 ICS7 P1'\r\n user.milestoneslevel[32].msltext = 'EPA 9c: Establish and maintain a climate of mutual respect, dignity, integrity, and trust Prioritize team needs over personal needs to optimize delivery of care Help team members in need P1 ICS7 IPC1 SBP2'\r\n user.milestoneslevel[33].msltext = 'EPA 10a: Recognize normal and abnormal vital signs as they relate to patient- and disease-specific factors as potential etiologies of a patient\\'s decompensation PC2 PC4 PC5'\r\n user.milestoneslevel[34].msltext = 'EPA 10b: Recognize severity of a patient\\'s illness and indications for escalating care and initiate interventions and management PC4 PC3PC2 PC5 PC6 PPD1'\r\n user.milestoneslevel[35].msltext = 'EPA 10c: Initiate and participate in a code response and apply basic and advanced life support PC1 PPD1 SBP2 IPC4'\r\n user.milestoneslevel[36].msltext = 'EPA 10d: Upon recognition of a patient\\'s deterioration, communicate situation, clarify patient\\'s goals of care, and update family members ICS2 ICS6 PPD1'\r\n user.milestoneslevel[37].msltext = 'EPA 11a: Describe the key elements of informed consent: indications, contraindications, risks, benefits, alternatives, and potential complications of the intervention PC6 KP3 KP4 KP5 P6'\r\n user.milestoneslevel[38].msltext = 'EPA 11b: Communicate with the patient and family to ensure that they understand the intervention PC7 ICS1 ICS7 PC5'\r\n user.milestoneslevel[39].msltext = 'EPA 11c: Display an appropriate balance of confidence and skill to put the patient and family at ease, seeking help when needed PPD1 PPD7 PPD8'\r\n user.milestoneslevel[40].msltext = 'EPA 12a: Demonstrate technical skills required for the procedure PC1'\r\n user.milestoneslevel[41].msltext = 'EPA 12b: Understand and explain the anatomy, physiology, indications, contraindications, risks, benefits, alternatives, and potential complications of the procedure PC1 '\r\n user.milestoneslevel[42].msltext = 'EPA 12c: Communicate with the patient and family to ensure they understand pre- and postprocedural activities PC7 ICS6 P6'\r\n user.milestoneslevel[43].msltext = 'EPA 12d: Demonstrate confidence that puts patients and families at ease PPD7 PPD1'\r\n user.milestoneslevel[44].msltext = 'EPA 13a: Identify and report actual and potential (\"near miss\") errors in care using system reporting structure (e.g., event reporting systems, chain of command policies) KP1 ICS2 P4 PPD5 '\r\n user.milestoneslevel[45].msltext = 'EPA 13b: Participate in system improvement activities in the context of rotations or learning experiences (e.g., rapidcycle change using plan�do�study� act cycles, root cause analyses, morbidity and mortality conference, failure modes and effects analyses, improvement projects) PBLI4 PBLI10 '\r\n user.milestoneslevel[46].msltext = 'EPA 13c: Engage in daily safety habits (e.g., accurate and complete documentation, including allergies and adverse reactions, medicine reconciliation, patient education, universal precautions, hand washing, isolation protocols, falls and other risk assessments, standard prophylaxis, time-outs) SBP4'\r\n user.milestoneslevel[47].msltext = 'EPA 13d: Admit one\\'s own errors, reflect on one\\'s contribution, and develop an individual improvement plan P4 SBP5' \r\n $scope.selecteduser = user\r\n }\r\n ////console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n //////console.log(ms, msl, level, msi)\r\n }\r\n $scope.msConditonal = function (userms, value, user) {\r\n ////console.log(user)\r\n userms.condition = value\r\n\r\n $scope.saveData($scope.specialty, $scope.milestone.Users, user)\r\n }\r\n $scope.msLevelCheck = function (ms, level, msl, idx, idx2) {\r\n ms = level\r\n angular.forEach(msl, function (mile) {\r\n if (mile.l !== ms) {\r\n mile.s = false\r\n }\r\n else {\r\n mile.s = true\r\n }\r\n })\r\n }\r\n $scope.updateMilestoneByLevel = function (user, msl, level, selecteduser) {\r\n if (user.M == msl) {\r\n user.level = level\r\n }\r\n //////console.log(user.level)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users, selecteduser)\r\n }\r\n $scope.getMilestone = function (milestone, newspec) {\r\n if ($scope.specialty == undefined || newspec) {\r\n if (milestone.AddInId) {\r\n $scope.specialty = milestone.AddInId\r\n }\r\n }\r\n $scope.selectedMilestone = milestone\r\n //////console.log(new Date($scope.selectedMilestone.Expires) > $scope.today, new Date($scope.selectedMilestone.Expires), $scope.today, $scope.selectedMilestone.Expires == '')\r\n if ($scope.milestoneaccess == false || $scope.milestoneaccess == undefined) {\r\n //////console.log($scope.selectedMilestone.Expires == '')\r\n if ($scope.selectedMilestone.Expires == '') {\r\n $scope.milestoneaccess = true\r\n }\r\n else {\r\n if (new Date($scope.selectedMilestone.Expires) > $scope.today) {\r\n //////console.log('it is true')\r\n $scope.milestoneaccess = true\r\n }\r\n }\r\n }\r\n $http.post(\"/Execute/GetAddInDataForInstitution\", [$scope.institutionid, $scope.specialty]).success(function (data) {\r\n //////console.log(data.RS_0)\r\n $scope.milestone = []\r\n // $scope.specialty = 2\r\n if ($scope.specialty == 2) {\r\n ////console.log('FM spec')\r\n $scope.milestonetotal = []\r\n for (i = 1; i <= 22; i++) {\r\n\r\n $scope.milestonetotal.push({\r\n value: i,\r\n mstext: ' '\r\n })\r\n }\r\n $scope.milestonetotal[0].mstext = '1. PC-1 Cares for acutely ill...'\r\n $scope.milestonetotal[1].mstext = '2. PC-2 Cares for patients...'\r\n $scope.milestonetotal[2].mstext = '3. PC-3 Partners with the patient, family...'\r\n $scope.milestonetotal[3].mstext = '4. PC-4 Partners with the patient to...'\r\n $scope.milestonetotal[4].mstext = '5. PC-5 Performs specialty-appropriate...'\r\n $scope.milestonetotal[5].mstext = '6. MK-1 Demonstrates medical knowledge...'\r\n $scope.milestonetotal[6].mstext = '7. MK-2 Applies critical thinking...'\r\n $scope.milestonetotal[7].mstext = '8. SBP-1 Provides cost-conscious...'\r\n $scope.milestonetotal[8].mstext = '9. SBP-2 Emphasizes patient safety'\r\n $scope.milestonetotal[9].mstext = '10. SBP-3 Advocates for individual...'\r\n $scope.milestonetotal[10].mstext = '11. SBP-4 Coordinates team-based care'\r\n $scope.milestonetotal[11].mstext = '12. PBLI-1 Locates, appraises, and...'\r\n $scope.milestonetotal[12].mstext = '13. PBLI-2 Demonstrates self-directed...'\r\n $scope.milestonetotal[13].mstext = '14. PBLI-3 mproves systems in which...'\r\n $scope.milestonetotal[14].mstext = '15. PROF-1 Completes a process...'\r\n $scope.milestonetotal[15].mstext = '16. PROF-2 Demonstrates professional...'\r\n $scope.milestonetotal[16].mstext = '17. PROF-3 Demonstrates humanism...'\r\n $scope.milestonetotal[17].mstext = '18. PROF-4 Maintains emotional,...'\r\n $scope.milestonetotal[18].mstext = '19. C-1 Develops meaningful,...'\r\n $scope.milestonetotal[19].mstext = '20. C-2 Communicates effectively...'\r\n $scope.milestonetotal[20].mstext = '21. C-3 Develops relationships...'\r\n $scope.milestonetotal[21].mstext = '22. C-4 Utilizes technology...'\r\n $scope.ms = $scope.milestonetotal[0].value\r\n $scope.milestonelevels = []\r\n for (i = 0; i < 10; i++) {\r\n if (i == 0) {\r\n var selected = true\r\n }\r\n else {\r\n var selected = false\r\n }\r\n var level = (i / 2)\r\n if (level == 0.5) {\r\n level = 1\r\n }\r\n else {\r\n if (level > 0) {\r\n level = level + .5\r\n }\r\n }\r\n $scope.milestonelevels.push({\r\n l: level,\r\n s: selected\r\n })\r\n }\r\n $scope.milestone.specialty = 'Family Medicine',\r\n $scope.milestone.Id = 2\r\n $scope.milestoneslevel = []\r\n for (i = 1; i <= $scope.milestonetotal.length; i++) {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n msltext: ' '\r\n })\r\n }\r\n ////console.log($scope.milestonetotal)\r\n }\r\n if ($scope.specialty == 1) {\r\n ////console.log('EM spec')\r\n $scope.milestonetotal = []\r\n for (i = 1; i <= 23; i++) {\r\n $scope.milestonetotal.push({\r\n value: i,\r\n mstext: ' '\r\n })\r\n }\r\n $scope.milestonetotal[0].mstext = '1. Emergency Stabilization (PC1)'\r\n $scope.milestonetotal[1].mstext = '2. Performance of Focused History (PC2)'\r\n $scope.milestonetotal[2].mstext = '3. Diagnostic Studies (PC3)'\r\n $scope.milestonetotal[3].mstext = '4. Diagnosis (PC4)'\r\n $scope.milestonetotal[4].mstext = '5. Pharmacotherapy (PC5)'\r\n $scope.milestonetotal[5].mstext = '6. Observation and Reassessment (PC6)'\r\n $scope.milestonetotal[6].mstext = '7. Disposition (PC7)'\r\n $scope.milestonetotal[7].mstext = '8. Multi-tasking (Task-switching) (PC8)'\r\n $scope.milestonetotal[8].mstext = '9. General Approach to Procedures (PC9)'\r\n $scope.milestonetotal[9].mstext = '10. Airway Management (PC10)'\r\n $scope.milestonetotal[10].mstext = '11. Anesthesia and Acute Pain Management (PC11)'\r\n $scope.milestonetotal[11].mstext = '12. Goal-directed Focused Ultrasound (PC12)'\r\n $scope.milestonetotal[12].mstext = '13. Wound Management (PC13)'\r\n $scope.milestonetotal[13].mstext = '14. Vascular Access (PC14)'\r\n $scope.milestonetotal[14].mstext = '15. Medical Knowledge (MK)'\r\n $scope.milestonetotal[15].mstext = '16. Patient Safety (SBP1)'\r\n $scope.milestonetotal[16].mstext = '17. Systems-based Management (SBP2)'\r\n $scope.milestonetotal[17].mstext = '18. Technology (SBP3)'\r\n $scope.milestonetotal[18].mstext = '19. Practice-based Performance Improvement (PBLI)'\r\n $scope.milestonetotal[19].mstext = '20. Professional values (PROF1)'\r\n $scope.milestonetotal[20].mstext = '21. Accountability (PROF2)'\r\n $scope.milestonetotal[21].mstext = '22. Patient Centered Communication (ICS1)'\r\n $scope.milestonetotal[22].mstext = '23. Team Management (ICS2)'\r\n $scope.ms = $scope.milestonetotal[0].value\r\n $scope.milestonelevels = []\r\n for (i = 0; i < 10; i++) {\r\n if (i == 0) {\r\n var selected = true\r\n }\r\n else {\r\n var selected = false\r\n }\r\n var level = (i / 2)\r\n if (level == 0.5) {\r\n level = 1\r\n }\r\n else {\r\n if (level > 0) {\r\n level = level + .5\r\n }\r\n }\r\n $scope.milestonelevels.push({\r\n l: level,\r\n s: selected\r\n })\r\n }\r\n $scope.milestone.specialty = 'Emergency Medicine',\r\n $scope.milestone.Id = 1\r\n $scope.milestoneslevel = []\r\n for (i = 1; i <= $scope.milestonetotal.length; i++) {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n msltext: ' '\r\n })\r\n }\r\n ////console.log($scope.milestonetotal)\r\n }\r\n if ($scope.specialty == 3) {\r\n ////console.log('IM spec')\r\n $scope.milestonetotal = []\r\n for (i = 1; i <= 23; i++) {\r\n $scope.milestonetotal.push({\r\n value: i,\r\n mstext: ' '\r\n })\r\n }\r\n $scope.milestonetotal[0].mstext = '1. (PC1) Gathers and synthesizes...'\r\n $scope.milestonetotal[1].mstext = '2. (PC2) Develops and achieves...'\r\n $scope.milestonetotal[2].mstext = '3. (PC3) Manages patients with...'\r\n $scope.milestonetotal[3].mstext = '4. (PC4) Skill in performing...'\r\n $scope.milestonetotal[4].mstext = '5. (PC5) Requests and provides...'\r\n $scope.milestonetotal[5].mstext = '6. (MK1) Clinical knowledge'\r\n $scope.milestonetotal[6].mstext = '7. (MK2) Knowledge of diagnostic...'\r\n $scope.milestonetotal[7].mstext = '8. (SBP1) Works effectively within...'\r\n $scope.milestonetotal[8].mstext = '9. (SBP2) Recognizes system error...'\r\n $scope.milestonetotal[9].mstext = '10. (SBP3) Identifies forces that...'\r\n $scope.milestonetotal[10].mstext = '11. (SBP4) Transitions patients...'\r\n $scope.milestonetotal[11].mstext = '12. (PBLI1) Monitors practice with...'\r\n $scope.milestonetotal[12].mstext = '13. (PBLI2) Learns and improves via performance...'\r\n $scope.milestonetotal[13].mstext = '14. (PBLI3) Learns and improves via feedback'\r\n $scope.milestonetotal[14].mstext = '15. (PBLI4) Learns and improves at the point...'\r\n $scope.milestonetotal[15].mstext = '16. (PROF1) Has professional and respectful...'\r\n $scope.milestonetotal[16].mstext = '17. (PROF2) Accepts responsibility...'\r\n $scope.milestonetotal[17].mstext = '18. (PROF3) Responds to each patient...'\r\n $scope.milestonetotal[18].mstext = '19. (PROF4) Exhibits integrity and...'\r\n $scope.milestonetotal[19].mstext = '20. (ICS1) Communicates effectively with...'\r\n $scope.milestonetotal[20].mstext = '21. (ICS2) Communicates effectively in...'\r\n $scope.milestonetotal[21].mstext = '22. (ICS3) Appropriate utilization...'\r\n $scope.milestonetotal[22].mstext = '_'\r\n $scope.ms = $scope.milestonetotal[0].value\r\n $scope.milestonelevels = []\r\n for (i = 0; i < 9; i++) {\r\n if (i == 0) {\r\n var selected = true\r\n }\r\n else {\r\n var selected = false\r\n }\r\n var level = (i / 2)\r\n\r\n $scope.milestonelevels.push({\r\n l: level,\r\n s: selected\r\n })\r\n }\r\n //////console.log($scope.milestonelevels)\r\n $scope.milestone.specialty = 'Internal Medicine',\r\n $scope.milestone.Id = 1\r\n $scope.milestoneslevel = []\r\n for (i = 1; i <= $scope.milestonetotal.length; i++) {\r\n if (i == 5 || i == 7 || i == 9 || i == 15 || i == 19 || i == 22 || i == 23) {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n condition: '',\r\n msltext: ' '\r\n })\r\n }\r\n else {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n msltext: ' '\r\n })\r\n }\r\n\r\n }\r\n ////console.log($scope.milestonetotal)\r\n }\r\n if ($scope.specialty == 4) {\r\n ////console.log('PEDS spec')\r\n $scope.milestonetotal = []\r\n for (i = 1; i <= 22; i++) {\r\n $scope.milestonetotal.push({\r\n value: i,\r\n mstext: ' '\r\n })\r\n }\r\n $scope.milestonetotal[0].mstext = '1. PC-1 Cares for acutely ill...'\r\n $scope.milestonetotal[1].mstext = '2. PC-2 Cares for patients...'\r\n $scope.milestonetotal[2].mstext = '3. PC-3 Partners with the patient...'\r\n $scope.milestonetotal[3].mstext = '4. PC-4 Partners with the patient...'\r\n $scope.milestonetotal[4].mstext = '5. PC-5 Performs specialty-appropriate...'\r\n $scope.milestonetotal[5].mstext = '6. MK-1 Demonstrates medical...'\r\n $scope.milestonetotal[6].mstext = '7. MK-2 Applies critical thinking...'\r\n $scope.milestonetotal[7].mstext = '8. SBP-1 Provides cost-conscious...'\r\n $scope.milestonetotal[8].mstext = '9. SBP-2 Emphasizes patient safety '\r\n $scope.milestonetotal[9].mstext = '10. SBP-3 Advocates for individual...'\r\n $scope.milestonetotal[10].mstext = '11. SBP-4 Coordinates team-based care '\r\n $scope.milestonetotal[11].mstext = '12. PBLI-1 Locates, appraises, and...'\r\n $scope.milestonetotal[12].mstext = '13. PBLI-2 Demonstrates self-directed...'\r\n $scope.milestonetotal[13].mstext = '14. PBLI-3 Improves systems...'\r\n $scope.milestonetotal[14].mstext = '15. PROF-1 Completes a process...'\r\n $scope.milestonetotal[15].mstext = '16. PROF-2 Demonstrates professional...'\r\n $scope.milestonetotal[16].mstext = '17. PROF-3 Demonstrates humanism...'\r\n $scope.milestonetotal[17].mstext = '18. PROF-4 Maintains emotional...'\r\n $scope.milestonetotal[18].mstext = '19. C-1 Develops meaningful...'\r\n $scope.milestonetotal[19].mstext = '20. C -2 Communicates effectively...'\r\n $scope.milestonetotal[20].mstext = '21. C -3 Develops relationships...'\r\n $scope.milestonetotal[21].mstext = '22. C-4 Utilizes technology...'\r\n $scope.ms = $scope.milestonetotal[0].value\r\n $scope.milestonelevels = []\r\n for (i = 0; i < 10; i++) {\r\n if (i == 0) {\r\n var selected = true\r\n }\r\n else {\r\n var selected = false\r\n }\r\n var level = (i / 2)\r\n if (level == 0.5) {\r\n level = 1\r\n }\r\n else {\r\n if (level > 0) {\r\n level = level + .5\r\n }\r\n }\r\n $scope.milestonelevels.push({\r\n l: level,\r\n s: selected\r\n })\r\n }\r\n $scope.milestone.specialty = 'Pediatrics',\r\n $scope.milestone.Id = 4\r\n $scope.milestoneslevel = []\r\n for (i = 1; i <= $scope.milestonetotal.length; i++) {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n msltext: ' '\r\n })\r\n }\r\n ////console.log($scope.milestonetotal)\r\n }\r\n if ($scope.specialty == 5) {\r\n //console.log('EPA')\r\n $scope.milestonetotal = []\r\n for (i = 1; i <= 48; i++) {\r\n $scope.milestonetotal.push({\r\n value: i,\r\n mstext: ' '\r\n })\r\n }\r\n $scope.milestonetotal[0].mstext = '1. EPA 1a: Obtain a complete...'\r\n $scope.milestonetotal[1].mstext = '2. EPA 1b: Demonstrate patient-centered...'\r\n $scope.milestonetotal[2].mstext = '3. EPA 1c: Demonstrate clinical reasoning...'\r\n $scope.milestonetotal[3].mstext = '4. EPA 1d: Performa clinically relevant...'\r\n $scope.milestonetotal[4].mstext = '5. EPA 2a: Synthesize essential information...'\r\n $scope.milestonetotal[5].mstext = '6. EPA 2b: Prioritize and continue to...'\r\n $scope.milestonetotal[6].mstext = '7. EPA 2c: Engage and communicate...'\r\n $scope.milestonetotal[7].mstext = '8. EPA 3a: Recommend first-line...'\r\n $scope.milestonetotal[8].mstext = '9. EPA 3b: Provide rationale for...'\r\n $scope.milestonetotal[9].mstext = '10. EPA 3c: Interpret results of basic...'\r\n $scope.milestonetotal[10].mstext = '11. EPA 4a: Compose orders efficiently...'\r\n $scope.milestonetotal[11].mstext = '12. EPA 4b: Demonstrate an understanding...'\r\n $scope.milestonetotal[12].mstext = '13. EPA 4c: Recognize and avoid ...'\r\n $scope.milestonetotal[13].mstext = '14. EPA 4d: Discuss planned orders...'\r\n $scope.milestonetotal[14].mstext = '15. EPA 5a: Prioritize and synthesize...'\r\n $scope.milestonetotal[15].mstext = '16. EPA 5b: Follow documentation...'\r\n $scope.milestonetotal[16].mstext = '17. EPA 5c: Document a problem...'\r\n $scope.milestonetotal[17].mstext = '18. EPA 6a: Present personally...'\r\n $scope.milestonetotal[18].mstext = '19. EPA 6b: Provide an accurate...'\r\n $scope.milestonetotal[19].mstext = '20. EPA 6c: Adjust the oral...'\r\n $scope.milestonetotal[20].mstext = '21. EPA 6d: Demonstrate respect for...'\r\n $scope.milestonetotal[21].mstext = '22. EPA 7a: Combine curiosity...'\r\n $scope.milestonetotal[22].mstext = '23. EPA 7b: Demonstrate awareness...'\r\n $scope.milestonetotal[23].mstext = '24. EPA 7c: Demonstrate skill in...'\r\n $scope.milestonetotal[24].mstext = '25. EPA 7d: Apply findings to...'\r\n $scope.milestonetotal[25].mstext = '26. EPA 8a: Document and update an...'\r\n $scope.milestonetotal[26].mstext = '27. EPA 8b: Conduct handover using...'\r\n $scope.milestonetotal[27].mstext = '28. EPA 8c: Provide succinct verbal...'\r\n $scope.milestonetotal[28].mstext = '29. EPA 8d: Give or elicit feedback...'\r\n $scope.milestonetotal[29].mstext = '30. EPA 8e: Demonstrate respect for...'\r\n $scope.milestonetotal[30].mstext = '31. EPA 9a: Identify team members...'\r\n $scope.milestonetotal[31].mstext = '32. EPA 9b: Include team members...'\r\n $scope.milestonetotal[32].mstext = '33. EPA 9c: Establish and maintain...'\r\n $scope.milestonetotal[33].mstext = '34. EPA 10a: Recognize normal and...'\r\n $scope.milestonetotal[34].mstext = '35. EPA 10b: Recognize severity of...'\r\n $scope.milestonetotal[35].mstext = '36. EPA 10c: Initiate and participate...'\r\n $scope.milestonetotal[36].mstext = '37. EPA 10d: Upon recognition of...'\r\n $scope.milestonetotal[37].mstext = '38. EPA 11a: Describe the key...'\r\n $scope.milestonetotal[38].mstext = '39. EPA 11b: Communicate with the...'\r\n $scope.milestonetotal[39].mstext = '40. EPA 11c: Display an appropriate...'\r\n $scope.milestonetotal[40].mstext = '41. EPA 12a: Demonstrate technical...'\r\n $scope.milestonetotal[41].mstext = '42. EPA 12b: Understand and explain ...'\r\n $scope.milestonetotal[42].mstext = '43. EPA 12c: Communicate with the...'\r\n $scope.milestonetotal[43].mstext = '44. EPA 12d: Demonstrate confidence...'\r\n $scope.milestonetotal[44].mstext = '45. EPA 13a: Identify and report...'\r\n $scope.milestonetotal[45].mstext = '46. EPA 13b: Participate in system...'\r\n $scope.milestonetotal[46].mstext = '47. EPA 13c: Engage in daily safety...'\r\n $scope.milestonetotal[47].mstext = '48. EPA 13d: Admit one\\'s own...'\r\n $scope.ms = $scope.milestonetotal[0].value\r\n $scope.milestonelevels = []\r\n for (i = 0; i < 9; i++) {\r\n if (i == 0) {\r\n var selected = true\r\n }\r\n else {\r\n var selected = false\r\n }\r\n var level = (i / 2)\r\n\r\n $scope.milestonelevels.push({\r\n l: level,\r\n s: selected\r\n })\r\n }\r\n $scope.milestone.specialty = 'EPAs for Entering Residency',\r\n $scope.milestone.Id = 5\r\n $scope.milestoneslevel = []\r\n for (i = 1; i <= $scope.milestonetotal.length; i++) {\r\n $scope.milestoneslevel.push({\r\n M: i,\r\n level: 0,\r\n msltext: ' '\r\n })\r\n }\r\n //////console.log($scope.milestonetotal)\r\n }\r\n if (!data.RS_0[0] || !data.RS_0[0].Data || data.RS_0[0].Data == 'null' || data.RS_0[0].Data == '[]') {\r\n //console.log('No Data')\r\n $scope.milestone.Users = []\r\n //////console.log($scope.InstitutionUserList)\r\n angular.forEach($scope.InstitutionUserList, function (user) {\r\n ////console.log(user)\r\n if (user.UserID !== '') {\r\n $scope.milestone.Users.push({\r\n FirstName: user.FirstName,\r\n LastName: user.LastName,\r\n Name: user.FirstName + ' ' + user.LastName,\r\n Id: user.UserID,\r\n Class: user.Class,\r\n Email: user.Email,\r\n milestoneavg: 0,\r\n milestoneslevel: [],\r\n })\r\n }\r\n else {\r\n $scope.milestone.Users.unshift({\r\n Name: 'All',\r\n Id: ''\r\n })\r\n }\r\n })\r\n ////console.log($scope.milestoneslevel)\r\n angular.forEach($scope.milestone.Users, function (muser) {\r\n muser.milestonelevels = angular.copy($scope.milestonelevels)\r\n muser.milestoneslevel = angular.copy($scope.milestoneslevel)\r\n })\r\n ////console.log('no data', $scope.milestone)\r\n //$scope.saveData($scope.specialty, $scope.milestone.Users)\r\n $scope.changeuser($scope.milestone.Users[0])\r\n }\r\n else {\r\n $scope.milestone = data.RS_0[0]\r\n $scope.milestone.Expires = new Date($scope.milestone.Expires)\r\n $scope.milestone.Users = JSON.parse($scope.milestone.Data)\r\n //console.log('some data', $scope.milestone.Users)\r\n angular.forEach($scope.milestone.Users, function (msu) {\r\n msu.cutme = true\r\n angular.forEach($scope.InstitutionUserList, function (user) {\r\n if (msu.Id == user.UserID) {\r\n msu.cutme = false\r\n msu.FirstName = user.FirstName\r\n msu.LastName = user.LastName\r\n msu.Name = user.FirstName + ' ' + user.LastName\r\n msu.Class = user.Class,\r\n msu.Email = user.Email\r\n }\r\n })\r\n if (msu.cutme == false) {\r\n\r\n msu.milestoneavg = 0\r\n for (var i = 0; i < msu.milestoneslevel.length; i++) {\r\n //////console.log(msu.milestoneslevel[i])\r\n msu.milestoneavg += msu.milestoneslevel[i].level\r\n }\r\n msu.milestoneavg = msu.milestoneavg / msu.milestoneslevel.length\r\n }\r\n else {\r\n delete msu\r\n }\r\n })\r\n angular.forEach($scope.InstitutionUserList, function (user) {\r\n user.newuser = true\r\n angular.forEach($scope.milestone.Users, function (msu) {\r\n if (msu.Id == user.UserID) {\r\n user.newuser = false\r\n }\r\n })\r\n if (user.newuser == true) {\r\n $scope.milestone.Users.push({\r\n FirstName: user.FirstName,\r\n LastName: user.LastName,\r\n Name: user.FirstName + ' ' + user.LastName,\r\n Email: user.Email,\r\n Id: user.UserID,\r\n Class: user.Class,\r\n milestoneslevel: angular.copy($scope.milestoneslevel),\r\n milestonelevels: angular.copy($scope.milestonelevels)\r\n })\r\n }\r\n })\r\n\r\n //$scope.filterqueue = []\r\n ////console.log($scope.milestone.Users)\r\n }\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n $scope.changeuser($scope.milestone.Users[0])\r\n })\r\n //}\r\n }\r\n $http.post(\"/Execute/GetAllInstitutionAddIns\", [$scope.institutionid]).success(function (data) {\r\n $scope.milestonedata = data.RS_0\r\n $scope.milestonesavailable = []\r\n\r\n if ($scope.milestoneaccess == true) {\r\n $scope.getMilestone()\r\n }\r\n else {\r\n if ($scope.milestonedata.length > 0) {\r\n for (i = 0; i < $scope.milestonedata.length; i++) {\r\n if (new Date($scope.milestonedata[i].Expires) > $scope.today || $scope.milestonedata[i].Expires == '') {\r\n $scope.milestonesavailable.push($scope.milestonedata[i])\r\n ////console.log($scope.milestonesavailable)\r\n ////console.log($scope.milestonedata[i])\r\n $scope.getMilestone($scope.milestonedata[i]);\r\n\r\n\r\n }\r\n }\r\n }\r\n }\r\n ////console.log($scope.milestonesavailable)\r\n\r\n })\r\n $scope.updateAverage = function () {\r\n angular.forEach($scope.milestone.Users, function (msu) {\r\n msu.milestoneavg = 0\r\n for (var i = 0; i < msu.milestoneslevel.length; i++) {\r\n //////console.log(msu.milestoneslevel[i])\r\n msu.milestoneavg += msu.milestoneslevel[i].level\r\n }\r\n msu.milestoneavg = msu.milestoneavg / msu.milestoneslevel.length\r\n })\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n //////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$scope.institutionid, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n\r\n })\r\n }\r\n $scope.deleteData = function (specialty) {\r\n $scope.jsontext = JSON.stringify(null)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$scope.institutionid, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n })\r\n }\r\n $scope.q = '';\r\n $scope.searchmsl = function (val) {\r\n //////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n $scope.printMilestone = function (specialty, user, view, milestone) {\r\n window.location.href = 'Program/MilestoneViewer?selected=' + user + '&specialty=' + specialty + '&view=' + view + '&milestone=' + milestone\r\n }\r\n //}\r\n })\r\n }\r\n }\r\n});\r\napp.directive('milestonespeds', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestonesPEDS.htm',\r\n scope: {\r\n selectedms: '=',\r\n milestone: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n //console.log($scope.Classes)\r\n $scope.specialty = 4\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n $scope.milestoneDisplay = 'Milestone'\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n //console.log(ms, msl, level, msi)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n ////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$rootScope.User.InstitutionId, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n\r\n })\r\n }\r\n $scope.changeuser = function (user) {\r\n\r\n if ($scope.specialty == 4) {\r\n user.milestoneslevel[0].msltext = '1. PC-1 Cares for acutely ill or injured patients in urgent and emergent situations and in all settings'\r\n user.milestoneslevel[1].msltext = '2. PC-2 Cares for patients with chronic conditions '\r\n user.milestoneslevel[2].msltext = '3. PC-3 Partners with the patient, family, and community to improve health through disease prevention and health promotion'\r\n user.milestoneslevel[3].msltext = '4. PC-4 Partners with the patient to address issues of ongoing signs, symptoms, or health concerns that remain over time without clear diagnosis despite evaluation and treatment, in a patient-centered, cost-effective manner'\r\n user.milestoneslevel[4].msltext = '5. PC-5 Performs specialty-appropriate procedures to meet the health care needs of individual patients, families, and communities, and is knowledgeable about procedures performed by other specialists to guide their patients\\' care'\r\n user.milestoneslevel[5].msltext = '6. MK-1 Demonstrates medical knowledge of sufficient breadth and depth to practice family medicine'\r\n user.milestoneslevel[6].msltext = '7. MK-2 Applies critical thinking skills in patient care '\r\n user.milestoneslevel[7].msltext = '8. SBP-1 Provides cost-conscious medical care '\r\n user.milestoneslevel[8].msltext = '9. SBP-2 Emphasizes patient safet'\r\n user.milestoneslevel[9].msltext = '10. SBP-3 Advocates for individual and community health'\r\n user.milestoneslevel[10].msltext = '11. SBP-4 Coordinates team-based car'\r\n user.milestoneslevel[11].msltext = '12. PBLI -1 Locates, appraises, and assimilates evidence from scientific studies related to the patients\\' health problems '\r\n user.milestoneslevel[12].msltext = '13. PBLI-2 Demonstrates self-directed learning '\r\n user.milestoneslevel[13].msltext = '14. PBLI-3 Improves systems in which the physician provides care '\r\n user.milestoneslevel[14].msltext = '15. PROF-1 Completes a process of professionalization '\r\n user.milestoneslevel[15].msltext = '16. PROF-2 Demonstrates professional conduct and accountability'\r\n user.milestoneslevel[16].msltext = '17. PROF-3 Demonstrates humanism and cultural proficiency'\r\n user.milestoneslevel[17].msltext = '18. PROF-4 Maintains emotional, physical, and mental health; and pursues continual personal and professional growth'\r\n user.milestoneslevel[18].msltext = '19. C-1 Develops meaningful, therapeutic relationships with patients and familie'\r\n user.milestoneslevel[19].msltext = '20. C -2 Communicates effectively with patients, families, and the public '\r\n user.milestoneslevel[20].msltext = '21. C -3 Develops relationships and effectively communicates with physicians, other health professionals, and health care teams '\r\n user.milestoneslevel[21].msltext = '22. C-4 Utilizes technology to optimize communication '\r\n $scope.selecteduser = user\r\n }\r\n //console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n }\r\n }\r\n})\r\napp.directive('milestonesim', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestonesIM.htm',\r\n scope: {\r\n selectedms: '=',\r\n milestone: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n //console.log($scope.Classes)\r\n $scope.specialty = 3\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n $scope.milestoneDisplay = 'Milestone'\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n //console.log(ms, msl, level, msi)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n ////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$rootScope.User.InstitutionId, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n\r\n })\r\n }\r\n $scope.changeuser = function (user) {\r\n\r\n if ($scope.specialty == 3) {\r\n user.milestoneslevel[0].msltext = '1. Gathers and synthesizes essential and accurate information to define each patient\\'s clinical problem(s). (PC1)'\r\n user.milestoneslevel[1].msltext = '2. Develops and achieves comprehensive management plan for each patient. (PC2)'\r\n user.milestoneslevel[2].msltext = '3. Manages patients with progressive responsibility and independence. (PC3)'\r\n user.milestoneslevel[3].msltext = '4. Skill in performing procedures. (PC4)'\r\n user.milestoneslevel[4].msltext = '5. Requests and provides consultative care. (PC5)'\r\n user.milestoneslevel[5].msltext = '6. Clinical knowledge (MK1)'\r\n user.milestoneslevel[6].msltext = '7. Knowledge of diagnostic testing and procedures. (MK2)'\r\n user.milestoneslevel[7].msltext = '8. Works effectively within an interprofessional team (e.g. peers, consultants, nursing, ancillary professionals and other support personnel). (SBP1)'\r\n user.milestoneslevel[8].msltext = '9. Recognizes system error and advocates for system improvement. (SBP2)'\r\n user.milestoneslevel[9].msltext = '10. Identifies forces that impact the cost of health care, and advocates for, and practices cost-effective care. (SBP3)'\r\n user.milestoneslevel[10].msltext = '11. Transitions patients effectively within and across health delivery systems. (SBP4)'\r\n user.milestoneslevel[11].msltext = '12. Monitors practice with a goal for improvement. (PBLI1)'\r\n user.milestoneslevel[12].msltext = '13. Learns and improves via performance audit. (PBLI2)'\r\n user.milestoneslevel[13].msltext = '14. Learns and improves via feedback. (PBLI3)'\r\n user.milestoneslevel[14].msltext = '15. Learns and improves at the point of care. (PBLI4)'\r\n user.milestoneslevel[15].msltext = '16. Has professional and respectful interactions with patients, caregivers and members of the interprofessional team (e.g. peers, consultants, nursing, ancillary professionals and support personnel). (PROF1)'\r\n user.milestoneslevel[16].msltext = '17. Accepts responsibility and follows through on tasks. (PROF2)'\r\n user.milestoneslevel[17].msltext = '18. Responds to each patient\\'s unique characteristics and needs. (PROF3)'\r\n user.milestoneslevel[18].msltext = '19. Exhibits integrity and ethical behavior in professional conduct. (PROF4)'\r\n user.milestoneslevel[19].msltext = '20. Communicates effectively with patients and caregivers. (ICS1)'\r\n user.milestoneslevel[20].msltext = '21. Communicates effectively in interprofessional teams (e.g. peers, consultants, nursing, ancillary professionals and other support personnel). (ICS2)'\r\n user.milestoneslevel[21].msltext = '22. Appropriate utilization and completion of health records. (ICS3)'\r\n user.milestoneslevel[22].msltext = ' '\r\n $scope.selecteduser = user\r\n }\r\n //console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n }\r\n }\r\n});\r\napp.directive('milestonesfm', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestonesFM.htm',\r\n scope: {\r\n selectedms: '=',\r\n milestone: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n //console.log($scope.Classes)\r\n $scope.specialty = 2\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n $scope.milestoneDisplay = 'Milestone'\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n //console.log(ms, msl, level, msi)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n ////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$rootScope.User.InstitutionId, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n\r\n })\r\n }\r\n $scope.changeuser = function (user) {\r\n\r\n if ($scope.specialty == 2) {\r\n\r\n user.milestoneslevel[0].msltext = 'PC-1 Cares for acutely ill or injured patients in urgent and emergent situations and in all settings'\r\n user.milestoneslevel[1].msltext = 'PC-2 Cares for patients with chronic conditions'\r\n user.milestoneslevel[2].msltext = 'PC-3 Partners with the patient, family, and community to improve health through disease prevention and health promotion'\r\n user.milestoneslevel[3].msltext = 'PC-4 Partners with the patient to address issues of ongoing signs, symptoms, or health concerns that remain over time without clear diagnosis despite evaluation and treatment, in a patient-centered, cost-effective manner'\r\n user.milestoneslevel[4].msltext = 'PC-5 Performs specialty-appropriate procedures to meet the health care needs of individual patients, families, and communities, and is knowledgeable about procedures performed by other specialists to guide their patients\\' care'\r\n user.milestoneslevel[5].msltext = 'MK-1 Demonstrates medical knowledge of sufficient breadth and depth to practice family medicine'\r\n user.milestoneslevel[6].msltext = 'MK-2 Applies critical thinking skills in patient care'\r\n user.milestoneslevel[7].msltext = 'SBP-1 Provides cost-conscious medical care'\r\n user.milestoneslevel[8].msltext = 'SBP-2 Emphasizes patient safety'\r\n user.milestoneslevel[9].msltext = 'SBP-3 Advocates for individual and community health'\r\n user.milestoneslevel[10].msltext = 'SBP-4 Coordinates team-based care'\r\n user.milestoneslevel[11].msltext = 'PBLI -1 Locates, appraises, and assimilates evidence from scientific studies related to the patients\\' health problems'\r\n user.milestoneslevel[12].msltext = 'PBLI-2 Demonstrates self-directed learning'\r\n user.milestoneslevel[13].msltext = 'PBLI-3 Improves systems in which the physician provides care'\r\n user.milestoneslevel[14].msltext = 'PROF-1 Completes a process of professionalization'\r\n user.milestoneslevel[15].msltext = 'PROF-2 Demonstrates professional conduct and accountability'\r\n user.milestoneslevel[16].msltext = 'PROF-3 Demonstrates humanism and cultural proficiency'\r\n user.milestoneslevel[17].msltext = 'PROF-4 Maintains emotional, physical, and mental health; and pursues continual personal and professional growth'\r\n user.milestoneslevel[18].msltext = 'C-1 Develops meaningful, therapeutic relationships with patients and families'\r\n user.milestoneslevel[19].msltext = 'C-2 Communicates effectively with patients, families, and the public'\r\n user.milestoneslevel[20].msltext = 'C-3 Develops relationships and effectively communicates with physicians, other health professionals, and health care teams'\r\n user.milestoneslevel[21].msltext = 'C-4 Utilizes technology to optimize communication'\r\n $scope.selecteduser = user\r\n }\r\n\r\n //console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n }\r\n }\r\n})\r\napp.directive('milestonesem', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestonesEM.htm',\r\n scope: {\r\n selectedms: '=',\r\n milestone: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n //console.log($scope.Classes)\r\n $scope.specialty = 2\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n $scope.milestoneDisplay = 'Milestone'\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n //console.log(ms, msl, level, msi)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n ////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$rootScope.User.InstitutionId, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n\r\n })\r\n }\r\n $scope.changeuser = function (user) {\r\n\r\n if ($scope.specialty == 1) {\r\n user.milestoneslevel[0].msltext = 'Emergency Stabilization (PC1) Prioritizes critical initial stabilization action and mobilizes hospital support services in the resuscitation of a critically ill or injured patient and reassesses after stabilizing intervention.'\r\n user.milestoneslevel[1].msltext = 'Performance of Focused History and Physical Exam (PC2) Abstracts current findings in a patient with multiple chronic medical problems and, when appropriate, compares with a prior medical record and identifies significant differences between the current presentation and past presentations.'\r\n user.milestoneslevel[2].msltext = 'Diagnostic Studies (PC3) Applies the results of diagnostic testing based on the probability of disease and the likelihood of test results altering management.'\r\n user.milestoneslevel[3].msltext = 'Diagnosis (PC4) Based on all of the available data, narrows and prioritizes the list of weighted differential diagnoses to determine appropriate management.'\r\n user.milestoneslevel[4].msltext = 'Pharmacotherapy (PC5) Selects and prescribes, appropriate pharmaceutical agents based upon relevant considerations such as mechanism of action, intended effect, financial considerations, possible adverse effects, patient preferences, allergies, potential drug-food and drug-drug interactions, institutional policies, and clinical guidelines; and effectively combines agents and monitors and intervenes in the advent of adverse effects in the ED.'\r\n user.milestoneslevel[5].msltext = 'Observation and Reassessment (PC6) Re-evaluates patients undergoing ED observation (and monitoring) and using appropriate data and resources, determines the differential diagnosis and, treatment plan, and displosition.'\r\n user.milestoneslevel[6].msltext = 'Disposition (PC7) Establishes and implements a comprehensive disposition plan that uses appropriate consultation resources; patient education regarding diagnosis; treatment plan; medications; and time and location specific disposition instructions.'\r\n user.milestoneslevel[7].msltext = 'Multi-tasking (Task-switching) (PC8) Employs task switching in an efficient and timely manner in order to manage the ED.'\r\n user.milestoneslevel[8].msltext = 'General Approach to Procedures (PC9) Performs the indicated procedure on all appropriate patients (including those who are uncooperative, at the extremes of age, hemodynamically unstable and those who have multiple co-morbidities, poorly defined anatomy, high risk for pain or procedural complications, sedation requirement), takes steps to avoid potential complications, and recognizes the outcome and/or complications resulting from the procedure.'\r\n user.milestoneslevel[9].msltext = 'Airway Management (PC10) Performs airway management on all appropriate patients (including those who are uncooperative, at the extremes of age, hemodynamically unstable and those who have multiple co-morbidities, poorly defined anatomy, high risk for pain or procedural complications, sedation requirement), takes steps to avoid potential complications, and recognize the outcome and/or complications resulting from the procedure.'\r\n user.milestoneslevel[10].msltext = 'Anesthesia and Acute Pain Management (PC11) Provides safe acute pain management, anesthesia, and procedural sedation to patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[11].msltext = 'Other Diagnostic and Therapeutic Procedures: Goal-directed Focused Ultrasound (Diagnostic/Procedural) (PC12) Uses goal-directed focused Ultrasound for the bedside diagnostic evaluation of emergency medical conditions and diagnoses, resuscitation of the acutely ill or injured patient, and procedural guidance.'\r\n user.milestoneslevel[12].msltext = 'Other Diagnostic and Therapeutic Procedures: Wound Management (PC13) Assesses and appropriately manages wounds in patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[13].msltext = 'Other Diagnostic and Therapeutic Procedures: Vascular Access (PC14) Successfully obtains vascular access in patients of all ages regardless of the clinical situation.'\r\n user.milestoneslevel[14].msltext = 'Medical Knowledge (MK) Demonstrates appropriate medical knowledge in the care of emergency medicine patients.'\r\n user.milestoneslevel[15].msltext = 'Patient Safety (SBP1) Participates in performance improvement to optimize patient safety.'\r\n user.milestoneslevel[16].msltext = 'Systems-based Management (SBP2) Participates in strategies to improve healthcare delivery and flow. Demonstrates an awareness of and responsiveness to the larger context and system of health care.'\r\n user.milestoneslevel[17].msltext = 'Technology (SBP3) Uses technology to accomplish and document safe healthcare delivery.'\r\n user.milestoneslevel[18].msltext = 'Practice-based Performance Improvement (PBLI) Participates in performance improvement to optimize ED function, self-learning, and patient care.'\r\n user.milestoneslevel[19].msltext = 'Professional values (PROF1) Demonstrates compassion, integrity, and respect for others as well as adherence to the ethical principles relevant to the practice of medicine.'\r\n user.milestoneslevel[20].msltext = 'Accountability (PROF2) Demonstrates accountability to patients, society, profession and self.'\r\n user.milestoneslevel[21].msltext = 'Patient Centered Communication (ICS1) Demonstrates interpersonal and communication skills that result in the effective exchange of information and collaboration with patients and their families.'\r\n user.milestoneslevel[22].msltext = 'Team Management (ICS2) Leads patient-centered care teams, ensuring effective communication and mutual respect among members of the team.'\r\n $scope.selecteduser = user\r\n }\r\n\r\n //console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n }\r\n }\r\n})\r\napp.directive('milestonesepa', function ($parse, $http, $compile, App, $uibModal) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/tpls/milestonesepa.htm',\r\n scope: {\r\n selectedms: '=',\r\n milestone: '=',\r\n user: '='\r\n },\r\n controller: function ($scope, $http, $rootScope, $filter, toastr, toastrConfig) {\r\n $scope.Classes = []\r\n if ($rootScope.InstitutionSettings) {\r\n angular.forEach($rootScope.InstitutionSettings.StudentClasses, function (sc) {\r\n $scope.Classes.push({\r\n name: sc,\r\n value: sc,\r\n })\r\n })\r\n }\r\n $scope.Classes.unshift({\r\n name: 'All Classes',\r\n value: ''\r\n })\r\n $scope.filterClass = function (clas) {\r\n ////console.log(clas)\r\n $scope.classFilter = clas.value\r\n $scope.classesFilter = clas.value\r\n ////console.log($scope.filterqueuez)\r\n }\r\n $scope.classFilter = $scope.Classes[0].value\r\n $scope.filterClass($scope.Classes[0])\r\n //console.log($scope.Classes)\r\n $scope.specialty = 4\r\n toastrConfig.timeOut = 1000;\r\n toastrConfig.extendedTimeOut = 3000;\r\n toastrConfig.fadeIn = 0;\r\n toastrConfig.fadeOut = 0;\r\n $scope.milestoneDisplay = 'Milestone'\r\n $scope.updateMilestone = function (ms, msl, level, msi) {\r\n angular.forEach(ms, function (m) {\r\n if (m.M == level) {\r\n m.level = msi\r\n }\r\n })\r\n angular.forEach(msl, function (mile) {\r\n mile.s = false\r\n })\r\n msi.s = true\r\n //console.log(ms, msl, level, msi)\r\n $scope.saveData($scope.specialty, $scope.milestone.Users)\r\n toastr.success('User updated.');\r\n }\r\n $scope.saveData = function (specialty, text, user) {\r\n ////console.log(user)\r\n angular.forEach(text, function (t) {\r\n angular.forEach(t.milestoneslevel, function (tmsl) {\r\n tmsl.msltext = ''\r\n })\r\n })\r\n $scope.jsontext = JSON.stringify(text)\r\n if (user) {\r\n $scope.changeuser(user)\r\n toastr.success('User updated.');\r\n }\r\n ////console.log(specialty, $scope.jsontext)\r\n $http.post(\"/Execute/SaveAddInDataForInstitution\", [$rootScope.User.InstitutionId, specialty, $scope.jsontext]).success(function (data) {\r\n ////console.log(data)\r\n })\r\n }\r\n $scope.changeuser = function (user) {\r\n if ($scope.specialty == 5) {\r\n user.milestoneslevel[0].msltext = '1. EPA 1a: Obtain a complete...'\r\n user.milestoneslevel[1].msltext = '2. EPA 1b: Demonstrate patient-centered...'\r\n user.milestoneslevel[2].msltext = '3. EPA 1c: Demonstrate clinical reasoning...'\r\n user.milestoneslevel[3].msltext = '4. EPA 1d: Performa clinically relevant...'\r\n user.milestoneslevel[4].msltext = '5. EPA 2a: Synthesize essential information...'\r\n user.milestoneslevel[5].msltext = '6. EPA 2b: Prioritize and continue to...'\r\n user.milestoneslevel[6].msltext = '7. EPA 2c: Engage and communicate...'\r\n user.milestoneslevel[7].msltext = '8. EPA 3a: Recommend first-line...'\r\n user.milestoneslevel[8].msltext = '9. EPA 3b: Provide rationale for...'\r\n user.milestoneslevel[9].msltext = '10. EPA 3c: Interpret results of basic...'\r\n user.milestoneslevel[10].msltext = '11. EPA 4a: Compose orders efficiently...'\r\n user.milestoneslevel[11].msltext = '12. EPA 4b: Demonstrate an understanding...'\r\n user.milestoneslevel[12].msltext = '13. EPA 4c: Recognize and avoid ...'\r\n user.milestoneslevel[13].msltext = '14. EPA 4d: Discuss planned orders...'\r\n user.milestoneslevel[14].msltext = '15. EPA 5a: Prioritize and synthesize...'\r\n user.milestoneslevel[15].msltext = '16. EPA 5b: Follow documentation...'\r\n user.milestoneslevel[16].msltext = '17. EPA 5c: Document a problem...'\r\n user.milestoneslevel[17].msltext = '18. EPA 6a: Present personally...'\r\n user.milestoneslevel[18].msltext = '19. EPA 6b: Provide an accurate...'\r\n user.milestoneslevel[19].msltext = '20. EPA 6c: Adjust the oral...'\r\n user.milestoneslevel[20].msltext = '21. EPA 6d: Demonstrate respect for...'\r\n user.milestoneslevel[21].msltext = '22. EPA 7a: Combine curiosity...'\r\n user.milestoneslevel[22].msltext = '23. EPA 7b: Demonstrate awareness...'\r\n user.milestoneslevel[23].msltext = '24. EPA 7c: Demonstrate skill in...'\r\n user.milestoneslevel[24].msltext = '25. EPA 7d: Apply findings to...'\r\n user.milestoneslevel[25].msltext = '26. EPA 8a: Document and update an...'\r\n user.milestoneslevel[26].msltext = '27. EPA 8b: Conduct handover using...'\r\n user.milestoneslevel[27].msltext = '28. EPA 8c: Provide succinct verbal...'\r\n user.milestoneslevel[28].msltext = '29. EPA 8d: Give or elicit feedback...'\r\n user.milestoneslevel[29].msltext = '30. EPA 8e: Demonstrate respect for...'\r\n user.milestoneslevel[30].msltext = '31. EPA 9a: Identify team members...'\r\n user.milestoneslevel[31].msltext = '32. EPA 9b: Include team members...'\r\n user.milestoneslevel[32].msltext = '33. EPA 9c: Establish and maintain...'\r\n user.milestoneslevel[33].msltext = '34. EPA 10a: Recognize normal and...'\r\n user.milestoneslevel[34].msltext = '35. EPA 10b: Recognize severity of...'\r\n user.milestoneslevel[35].msltext = '36. EPA 10c: Initiate and participate...'\r\n user.milestoneslevel[36].msltext = '37. EPA 10d: Upon recognition of...'\r\n user.milestoneslevel[37].msltext = '38. EPA 11a: Describe the key...'\r\n user.milestoneslevel[38].msltext = '39. EPA 11b: Communicate with the...'\r\n user.milestoneslevel[39].msltext = '40. EPA 11c: Display an appropriate...'\r\n user.milestoneslevel[40].msltext = '41. EPA 12a: Demonstrate technical...'\r\n user.milestoneslevel[41].msltext = '42. EPA 12b: Understand and explain ...'\r\n user.milestoneslevel[42].msltext = '43. EPA 12c: Communicate with the...'\r\n user.milestoneslevel[43].msltext = '44. EPA 12d: Demonstrate confidence...'\r\n user.milestoneslevel[44].msltext = '45. EPA 13a: Identify and report...'\r\n user.milestoneslevel[45].msltext = '46. EPA 13b: Participate in system...'\r\n user.milestoneslevel[46].msltext = '47. EPA 13c: Engage in daily safety...'\r\n user.milestoneslevel[47].msltext = '48. EPA 13d: Admit one\\'s own...'\r\n $scope.selecteduser = user\r\n }\r\n //console.log('SL ', $scope.selecteduser)\r\n }\r\n $scope.PageSizes = [\"10\", \"20\", \"50\", \"100\", \"250\"]\r\n $scope.PageSize = $scope.PageSizes[0];\r\n $scope.PageSizzes = [\"25\", \"50\", \"100\", \"250\", \"500\"]\r\n $scope.PageSizze = $scope.PageSizzes[0];\r\n $scope.q = '';\r\n $scope.searchChange = function (val) {\r\n ////////////console.log(val);\r\n $scope.q = val;\r\n };\r\n }\r\n }\r\n});\r\napp.directive('quickquiz', function ($parse, $http, $compile, $window, $sce, $anchorScroll, $filter) {\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {qid: \"=\", hidestart: \"=\", profiletab: \"=\", programtab: \"=\"},\r\n templateUrl: '/app/tpls/quickquiz.html',\r\n controller: function ($scope, $rootScope, $http, $stateParams, $filter, ngIntroService) {\r\n var introSteps = [\r\n {\r\n element: '#launch',\r\n intro: \"

Quick Quiz

\" +\r\n \"

Get board review questions and earn CME for free with our weekly medical education quiz.

\" +\r\n \"
    \" +\r\n \"
  • Up to five Quick Quiz issues are available at a time.
  • \" +\r\n \"
  • See how you stack up against your peers in the leaderboards.
  • \" +\r\n \"
  • Points are calculated based on correct answers, and time taken to complete the quiz.
  • \" +\r\n \"
\"\r\n },\r\n {\r\n element: '#qq-average-rank',\r\n intro: \"

Average Ranking

\" +\r\n \"

Your average leaderboard position across the five current Quick Quiz issues.

\" +\r\n \"

If your account is part of a group program with Med-Challenger, your ranking is among other members of your group.

\" +\r\n \"

Retail users are ranked against all other retail users.

\"\r\n },\r\n {\r\n element: '#qq-unclaimed',\r\n intro: \"

Unclaimed Quick Quiz CME

\" +\r\n \"

Shows the CME credits you've earned from completing quizzes, but have not yet claimed. Click the claim button to go directly to CME claims*.

\" +\r\n \"

* In order to claim earned CME credits, you must have a current Premium subscription.

\"\r\n },\r\n {\r\n element: '#qq-high-score',\r\n intro: \"

High Score

\" +\r\n \"

The most Quick Quiz points you've ever personally recorded.

\"\r\n },\r\n {\r\n element: '#launch',\r\n intro: \"

That's it! Thanks for taking the Quick Quiz tour!

\" +\r\n \"

Each page of the app has its own tour, so be sure to check out every one so you don't miss out on any of our great features.

\" +\r\n \"

For more, check out the help page.

\"\r\n }\r\n ];\r\n $scope.IntroOptions = {\r\n steps: introSteps,\r\n showStepNumbers: false,\r\n tooltipPosition: 'auto',\r\n positionPrecedence: ['top', 'right', 'bottom', 'left']\r\n };\r\n $scope.Loading = {\r\n IsHappening: false,\r\n PercentComplete: 0,\r\n Message: \"\"\r\n };\r\n $scope.User = $rootScope.User;\r\n $rootScope.$on(\"ReloadQQ\", function () {\r\n //////console.log(\"reload qq\");\r\n $scope.Load();\r\n });\r\n $scope.scroll = function () {\r\n $anchorScroll();\r\n };\r\n $scope.activeTab = [];\r\n $scope.selectTab1 = function (index) {\r\n $scope.activeTab[index] = true;\r\n };\r\n $scope.clickTab = function (index) {\r\n $scope.activeTab[index] = true;\r\n };\r\n $scope.IsCheater = true;\r\n $scope.loadUserAssessment = function (id) {\r\n ////////console.log(id)\r\n if (id) {\r\n $scope.UserAssessmentId = parseInt(id);\r\n //$scope.$apply();\r\n $http.get('/LMSData.svc/UserAssessments(' + id + 'L)?$expand=Questions,Assessment/AssessmentType').success(function (data) {\r\n $scope.UserAssessment = data.d;\r\n var ans = \"\";\r\n $scope.SelectQuestionIdx = -1;\r\n $.each($scope.UserAssessment.Questions, function (idx, q) {\r\n ans = q.AnswersJSON.replace(/\\n/g, \"\");\r\n try {\r\n q.Answers = $.parseJSON(ans);\r\n $.each(q.Answers, function (aidx, a) {\r\n a.HTML = a.HTML.replace(/>/g, \">\");\r\n a.HTML = a.HTML.replace(/</g, \"<\");\r\n a.HTML = a.HTML.replace(/&#37;/g, \"%\");\r\n a.HTML = a.HTML.replace(/&/g, \"&\");\r\n });\r\n if (q.HasAnswered == false && $scope.SelectQuestionIdx == -1) {\r\n $scope.SelectQuestionIdx = idx;\r\n }\r\n q.HTML = q.HTML.replace(/ 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n\r\n qquiz.Results = data.RS_0;\r\n\r\n //qquiz.Performance = data.RS_1;\r\n //qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n qquiz.Results = $filter('filter')(qquiz.Results, r.Email.indexOf('@chall.com') == -1)\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n //console.log(qquiz.Results)\r\n\r\n });\r\n }\r\n \r\n qquiz.updateActivity = function (pagesz) {\r\n qquiz.completedPageSize = pagesz;\r\n if (qquiz.activityPageInfo.TotalPages === 1) {\r\n qquiz.activityPageInfo.TotalPages = 1;\r\n }\r\n if (qquiz.showGlobalLB == true) {\r\n $http.post(\"/Execute/GetLeaderBoardGlobal\", [qquiz.AssessmentId, 1, $scope.User.UserName, qquiz.completedCurrentPage, qquiz.completedPageSize]).success(function (data) {\r\n qquiz.activityPageInfo = data.RS_1[0];\r\n ////console.log($scope.activityPageInfo)\r\n if (qquiz.completedCurrentPage > 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n ////////console.log(data)\r\n qquiz.Results = data.RS_0;\r\n\r\n //qquiz.Performance = data.RS_1;\r\n //qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n qquiz.Results = $filter('filter')(qquiz.Results, r.Email.indexOf('@chall.com') == -1)\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n //////console.log(\"PARTIAL_SECONDS\")\r\n })\r\n });\r\n };\r\n };\r\n }\r\n $scope.showLeaderBoard = function (qquiz) {\r\n qquiz.showLB = !qquiz.showLB;\r\n qquiz.WaitQQ = true;\r\n \r\n qquiz.useGlobalLB = false;\r\n qquiz.useLB = true;\r\n //console.log('Global', qquiz.useGlobalLB, 'Local', qquiz.useLB)\r\n qquiz.completedPageSize = \"5\";\r\n qquiz.completedCurrentPage = 1;\r\n qquiz.updateActivityPage = function (pagesz, page) {\r\n qquiz.completedCurrentPage = page;\r\n qquiz.updateActivity(pagesz);\r\n };\r\n if (qquiz.showLB == true) {\r\n ////////console.log(qquiz);\r\n $http.post(\"/Execute/GetQuickQuiz\", [qquiz.AssessmentId, $scope.User.UserName, qquiz.completedCurrentPage, qquiz.completedPageSize]).success(function (data) {\r\n qquiz.activityPageInfo = data.RS_3[0];\r\n //console.log(data);\r\n if (qquiz.completedCurrentPage > 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n\r\n qquiz.Results = data.RS_0;\r\n\r\n qquiz.Performance = data.RS_1;\r\n qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n //qquiz.Results = $filter('filter')(qquiz.Results, r.Email.indexOf('@chall.com') == -1)\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n //console.log(qquiz.Results)\r\n\r\n });\r\n };\r\n qquiz.updateGlobalActivity = function (pagesz) {\r\n qquiz.completedPageSize = pagesz;\r\n qquiz.useGlobalLB = true;\r\n qquiz.useLB = false;\r\n //console.log('Global', qquiz.useGlobalLB, 'Local', qquiz.useLB)\r\n if (qquiz.activityPageInfo.TotalPages === 1) {\r\n qquiz.activityPageInfo.TotalPages = 1;\r\n }\r\n \r\n $http.post(\"/Execute/GetLeaderBoardGlobal\", [qquiz.AssessmentId, 1, $scope.User.UserName, qquiz.completedCurrentPage, qquiz.completedPageSize]).success(function (data) {\r\n qquiz.activityPageInfo = data.RS_1[0];\r\n ////console.log($scope.activityPageInfo)\r\n if (qquiz.completedCurrentPage > 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n //console.log(data)\r\n qquiz.Results = data.RS_0;\r\n\r\n //qquiz.Performance = data.RS_1;\r\n //qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n //////console.log(\"PARTIAL_SECONDS\")\r\n })\r\n });\r\n \r\n }\r\n qquiz.updateActivity = function (pagesz) {\r\n qquiz.completedPageSize = pagesz;\r\n qquiz.useGlobalLB = false;\r\n qquiz.useLB = true;\r\n //console.log('Global', qquiz.useGlobalLB, 'Local', qquiz.useLB)\r\n if (qquiz.activityPageInfo.TotalPages === 1) {\r\n qquiz.activityPageInfo.TotalPages = 1;\r\n }\r\n \r\n $http.post(\"/Execute/GetQuickQuiz\", [qquiz.AssessmentId, $scope.User.UserName, qquiz.completedCurrentPage, qquiz.completedPageSize]).success(function (data) {\r\n qquiz.activityPageInfo = data.RS_3[0];\r\n ////console.log($scope.activityPageInfo)\r\n if (qquiz.completedCurrentPage > 1 * qquiz.activityPageInfo.TotalPages) {\r\n qquiz.updateActivityPage(qquiz.completedPageSize, 1 * qquiz.activityPageInfo.TotalPages);\r\n }\r\n qquiz.WaitQQ = false;\r\n ////////console.log(data)\r\n qquiz.Results = data.RS_0;\r\n\r\n qquiz.Performance = data.RS_1;\r\n qquiz.Assessment = data.RS_2[0];\r\n angular.forEach(qquiz.Results, function (r) {\r\n if (r.UserId == $scope.User.UserID) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n //////console.log(\"PARTIAL_SECONDS\")\r\n })\r\n });\r\n \r\n };\r\n }\r\n $scope.QQFeedback = function () {\r\n var modalInstance = $modal.open({\r\n templateUrl: '/js/App/templates/QQFeedback.htm',\r\n controller: function ($scope, $http, $rootScope, $modalInstance, items, App) {\r\n $scope.UpdateUserComments = function (e) {\r\n\r\n }\r\n $scope.ok = function () {\r\n\r\n // Comment this part out when the proc is ready.\r\n //alert(\"Thank you for your Quick Quiz Feedback submission. We will contact you if further information is needed. \\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n //$modalInstance.close();\r\n $scope.feedback = $scope.Question.UserComments + '

' + 'Username: ' + items.user.UserName + '
' + 'Email: ' + items.user.Email + '
' + 'Phone: ' + items.user.Profile.Telephone + '
' + 'Institution: ' + items.user.Profile.Institution + '

';\r\n $http.post(\"/Execute/MessageDistro\", ['Y29udGVudGZlZWRiYWNr', 'UXVpY2sgUXVpeiBGZWVkYmFjaw==', $scope.feedback]).success(function (data) {\r\n alert(\"Thank you for your Quick Quiz Feedback submission. \\n\\nContent Development Team\\nEmail: QuestionFeedback@chall.com\");\r\n $modalInstance.close();\r\n });\r\n }\r\n $scope.cancel = function () {\r\n $modalInstance.close();\r\n }\r\n\r\n },\r\n resolve: {\r\n items: function () {\r\n return {user: $scope.User}\r\n }\r\n }\r\n })\r\n };\r\n $scope.Load = function () {\r\n $scope.Loading.IsHappening = true;\r\n //////console.log($scope.qid);\r\n $scope.RightNow = new Date();\r\n $scope.ShowLogin = false;\r\n $scope.ShowRegister = false;\r\n $scope.User = $rootScope.User\r\n if ($scope.User.UserName) {\r\n if (isNumeric(getQueryVariable(\"qid\")) == true) {\r\n $scope.Id = getQueryVariable(\"qid\");\r\n $http.post(\"/Execute/GetQuickQuiz\", [$scope.Id, $scope.User.UserName, 1, 5]).success(function (data) {\r\n //////console.log(\"qqq\");\r\n //////console.log(data);\r\n $scope.Results = data.RS_0;\r\n $scope.Performance = data.RS_1;\r\n $scope.Assessment = data.RS_2[0];\r\n angular.forEach($scope.Results, function (r) {\r\n if (r.UserId == $scope.User.UserId) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n $scope.Loading.IsHappening = false;\r\n });\r\n } else {\r\n if (isNumeric($scope.qid) == true) {\r\n $scope.Id = $scope.qid;\r\n //////console.log($scope.qid);\r\n $http.post(\"/Execute/GetQuickQuiz\", [$scope.Id, $scope.User.UserName, 1, 5]).success(function (data) {\r\n ////////console.log(data);\r\n $scope.Results = data.RS_0;\r\n $scope.Performance = data.RS_1;\r\n $scope.QuizList = $scope.Performance;\r\n $scope.QuizList[0].AssessmentId = $scope.QuizList[0].Assessment_Id;\r\n ////////console.log($scope.QuizList);\r\n\r\n $scope.Assessment = data.RS_2[0];\r\n angular.forEach($scope.Results, function (r) {\r\n if (r.UserId == $scope.User.UserId) {\r\n $scope.HasTaken = true;\r\n }\r\n r.partialSeconds = parseFloat(r.TimeToTake).toFixed(2).split(\".\")[1];\r\n })\r\n $scope.showLeaderBoard($scope.QuizList[0]);\r\n $scope.Loading.IsHappening = false;\r\n });\r\n } else {\r\n $http.post(\"/Execute/GetQuickQuizListForUser\", [$scope.User.UserName]).success(function (data) {\r\n $scope.QuickQuiz = data.RS_1;\r\n //////console.log(\"QqQqQ\")\r\n ////console.log($scope.QuickQuiz)\r\n $scope.QuickQuiz = $filter('orderBy')($scope.QuickQuiz, '-AssessmentName', false);\r\n $http.post(\"/Execute/GetCMEDataForClaims\", [$scope.User.UserName, CurrentUserTZoffsett, 1]).success(function (data) {\r\n //////console.log(data)\r\n angular.forEach(data.RS_2, function (qq) {\r\n if (qq.CourseName === 'Challenger Quick Quiz') {\r\n $scope.QuickQuizCME = qq.EarnedHours - qq.ClaimedHours;\r\n }\r\n });\r\n //////console.log($scope.QuickQuizCME)\r\n });\r\n $http.post('/Execute/GetUserSettings', [$scope.User.UserId]).success(function (dat) {\r\n $scope.Settings = JSON.parse(dat.RS_0[0].Settings);\r\n //////console.log($scope.Settings)\r\n });\r\n\r\n // //////console.log($scope.QuizList )\r\n /*$scope.QuickQuiz.highScore = 0;\r\n var highScoreFound = false;*/\r\n angular.forEach($scope.QuickQuiz, function (qq) {\r\n /*if (qq.Score === \"\") {\r\n qq.Points = 0;\r\n }\r\n else {\r\n qq.Points = 100 * (qq.Score / qq.TimeToTake);\r\n\r\n }*/\r\n /*if (qq.Points > $scope.QuickQuiz.highScore || highScoreFound === false) {\r\n $scope.QuickQuiz.highScore = Math.round(qq.Points);\r\n highScoreFound = true;\r\n }*/\r\n qq.partialSeconds = parseFloat(qq.TimeToTake).toFixed(2).split(\".\")[1];\r\n $http.get(\"/APi/Assessments(\" + qq.AssessmentId + \"L)\").success(function (data) {\r\n qq.Description = data.d.Description;\r\n });\r\n });\r\n var sum = 0;\r\n var points = 0;\r\n var maxpoints = 0;\r\n for (var i = 0, Available = 0, NotAvailable = 0; 4 >= i; i++) {\r\n if ($scope.QuickQuiz[i].Score === \"\") {\r\n Available++;\r\n //$scope.QuickQuiz[i].Points = 0;\r\n }\r\n else {\r\n NotAvailable++\r\n //if ($scope.QuickQuiz[i].Rank === \"\") {\r\n // $scope.QuickQuiz[i].Rank = 0;\r\n //}\r\n\r\n //points = 100 * ($scope.QuickQuiz[i].Score / $scope.QuickQuiz[i].TimeToTake);\r\n //$scope.QuickQuiz[i].Points = points;\r\n //if (!isNumeric($scope.QuickQuiz[i].Points) || !$scope.QuickQuiz[i].Points) {\r\n // $scope.QuickQuiz[i].Points = 0;\r\n //}\r\n sum += parseInt($scope.QuickQuiz[i].Rank, 10);\r\n\r\n //////console.log(maxpoints)\r\n }\r\n\r\n\r\n }\r\n\r\n //////console.log(sum);\r\n $scope.QuickQuiz.Available = Available;\r\n // maxpoints = Math.max($scope.QuickQuiz[0].Points, $scope.QuickQuiz[1].Points, $scope.QuickQuiz[2].Points, $scope.QuickQuiz[3].Points, $scope.QuickQuiz[4].Points);\r\n //$scope.QuickQuiz.MaxPoints = maxpoints;\r\n $scope.QuickQuiz.RankAverage = Math.round(sum / NotAvailable);\r\n //////console.log($scope.QuickQuiz)\r\n $scope.Goto = function (Assessment) {\r\n if (!$scope.User.Profile.Nickname) {\r\n swal({\r\n title: \"Missing Info\",\r\n text: \"In order to participate in a Quick Quiz, you'll first need to set a Gaming Alias.

Your alias will be publicly visible on our leaderboards.\",\r\n type: \"input\",\r\n showCancelButton: true,\r\n closeOnConfirm: false,\r\n animation: \"slide-from-top\",\r\n inputPlaceholder: \"Enter a Gaming Alias\",\r\n allowEscapeKey: true,\r\n html: true\r\n },\r\n function (inputValue) {\r\n if (inputValue === false) return false;\r\n\r\n if (inputValue === \"\") {\r\n swal.showInputError(\"Please enter a Gaming Alias to continue!\");\r\n return false\r\n }\r\n if (inputValue.length > 20) {\r\n swal.showInputError(\"Gaming Alias may contain no more than 20 characters.\");\r\n return false;\r\n }\r\n $http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [inputValue]).success(function (da) {\r\n if (da.RS_0[0].Message !== \"All Good\") {\r\n swal.showInputError(\"Sorry, that Gaming Alias is already in use!\");\r\n return false;\r\n } else {\r\n $http.post(\"/Execute/SetUserProfileProperty\", [$scope.User.UserName, 'Nickname', inputValue]).success(function (dd) {\r\n ////////console.log(dd);\r\n if (dd.RS_0[0].PropertyValue == inputValue) {\r\n $scope.NickNameSet = true;\r\n swal({\r\n title: \"Gaming Alias Saved\",\r\n text: \"You're all set. Thanks for playing Challenger's Quick Quiz, and have fun!\",\r\n type: \"success\",\r\n\r\n }, function(goto) {\r\n if(goto){\r\n window.location.href = \"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\";\r\n }\r\n });\r\n } else {\r\n swal.showInputError(\"Set Gaming Alias failed. Try again or contact support.\");\r\n return false;\r\n }\r\n });\r\n }\r\n });\r\n\r\n });\r\n\r\n\r\n }\r\n else {\r\n window.location.href = \"/QuestionPool/\" + Assessment.AssessmentId + \"/\" + Assessment.CourseId + \"/\" + Assessment.ChapterId + \"/\" + Assessment.TopicId + \"/Assessment\";\r\n }\r\n };\r\n $scope.Loading.IsHappening = false;\r\n angular.forEach($scope.QuickQuiz, function(qq,$index){\r\n $scope.showLeaderBoard(qq);\r\n })\r\n })\r\n }\r\n }\r\n }\r\n else {\r\n $scope.ShowLogin = true;\r\n\r\n }\r\n\r\n }\r\n $scope.Load();\r\n },\r\n link: function (scope, element, attrs) { }\r\n }\r\n});\r\napp.directive(\"venobox\", function() {\r\n return {\r\n restrict: 'E',\r\n transclude: false,\r\n link: function (scope, element) {\r\n scope.initVenobox = function() {\r\n var defaultOptions = {\r\n //framewidth: '400px', // default: ''\r\n //frameheight: '300px', // default: ''\r\n border: '10px', // default: '0'\r\n //bgcolor: '#5dff5e', // default: '#fff'\r\n titleattr: 'data-title', // default: 'title'\r\n //numeratio: true, // default: false\r\n //infinigall: true // default: false\r\n };\r\n var customOptions = scope.$eval($(element).attr('data-options'));\r\n for(var key in customOptions) {\r\n defaultOptions[key] = customOptions[key];\r\n }\r\n $(element).venobox(defaultOptions);\r\n }\r\n scope.initVenobox();\r\n }\r\n };\r\n});\r\napp.directive('backButton', function(){\r\n return {\r\n restrict: 'A',\r\n link: function(scope, element, attrs) {\r\n element.bind('click', function () {\r\n history.back();\r\n scope.$apply();\r\n });\r\n }\r\n }\r\n});\r\napp.directive('linkGo', function ( $window ) {\r\n return function ( $scope, $element, $attrs ) {\r\n var href;\r\n var target;\r\n\r\n $attrs.$observe( 'linkGo', function(val) {\r\n href = val;\r\n });\r\n $attrs.$observe( 'linkTarget', function(val) {\r\n target = val;\r\n })\r\n $element.bind('click', function(){\r\n $scope.$apply( function () {\r\n if(target==='_blank') {\r\n $window.open(href, \"_blank\");\r\n } else {\r\n $window.location.href=href;\r\n }\r\n\r\n })\r\n })\r\n\r\n }\r\n});\r\napp.directive('onEnter', function() {\r\n return function(scope, elm, attr) {\r\n elm.bind('keypress', function(e) {\r\n if (e.keyCode === 13) {\r\n scope.$apply(attr.onEnter);\r\n }\r\n });\r\n };\r\n});\r\napp.directive('onEsc', function() {\r\n return function(scope, elm, attr) {\r\n elm.bind('keydown', function(e) {\r\n if (e.keyCode === 27) {\r\n scope.$apply(attr.onEsc);\r\n }\r\n });\r\n };\r\n});\r\n\n/**\r\n * Created by k.danovsky on 13.05.2016.\r\n */\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .config(config);\r\n\r\n /** @ngInject */\r\n function config(baConfigProvider, colorHelper) {\r\n baConfigProvider.changeTheme({blur: true});\r\n baConfigProvider.changeColors({\r\n default: 'rgba(#000000, 0.2)',\r\n defaultText: '#ffffff',\r\n dashboard: {\r\n white: '#ffffff',\r\n },\r\n });\r\n }\r\n})();\r\n\n/**\r\n * Created by k.danovsky on 13.05.2016.\r\n */\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n var basic = {\r\n default: '#ffffff',\r\n defaultText: '#666666',\r\n border: '#dddddd',\r\n borderDark: '#aaaaaa',\r\n };\r\n\r\n // main functional color scheme\r\n var colorScheme = {\r\n primary: '#209e91',\r\n info: '#2dacd1',\r\n success: '#90b900',\r\n warning: '#dfb81c',\r\n danger: '#e85656',\r\n };\r\n\r\n // dashboard colors for charts\r\n var dashboardColors = {\r\n blueStone: '#005562',\r\n surfieGreen: '#0e8174',\r\n silverTree: '#6eba8c',\r\n gossip: '#b9f2a1',\r\n white: '#10c4b5',\r\n };\r\n\r\n angular.module('BlurAdmin.theme')\r\n .provider('baConfig', configProvider);\r\n\r\n /** @ngInject */\r\n function configProvider(colorHelper) {\r\n var conf = {\r\n theme: {\r\n blur: true,\r\n },\r\n colors: {\r\n default: basic.default,\r\n defaultText: basic.defaultText,\r\n border: basic.border,\r\n borderDark: basic.borderDark,\r\n\r\n primary: colorScheme.primary,\r\n info: colorScheme.info,\r\n success: colorScheme.success,\r\n warning: colorScheme.warning,\r\n danger: colorScheme.danger,\r\n\r\n primaryLight: colorHelper.tint(colorScheme.primary, 30),\r\n infoLight: colorHelper.tint(colorScheme.info, 30),\r\n successLight: colorHelper.tint(colorScheme.success, 30),\r\n warningLight: colorHelper.tint(colorScheme.warning, 30),\r\n dangerLight: colorHelper.tint(colorScheme.danger, 30),\r\n\r\n primaryDark: colorHelper.shade(colorScheme.primary, 15),\r\n infoDark: colorHelper.shade(colorScheme.info, 15),\r\n successDark: colorHelper.shade(colorScheme.success, 15),\r\n warningDark: colorHelper.shade(colorScheme.warning, 15),\r\n dangerDark: colorHelper.shade(colorScheme.danger, 15),\r\n\r\n dashboard: {\r\n blueStone: dashboardColors.blueStone,\r\n surfieGreen: dashboardColors.surfieGreen,\r\n silverTree: dashboardColors.silverTree,\r\n gossip: dashboardColors.gossip,\r\n white: dashboardColors.white,\r\n },\r\n }\r\n };\r\n\r\n conf.changeTheme = function(theme) {\r\n angular.merge(conf.theme, theme)\r\n };\r\n\r\n conf.changeColors = function(colors) {\r\n angular.merge(conf.colors, colors)\r\n };\r\n\r\n conf.$get = function () {\r\n delete conf.$get;\r\n return conf;\r\n };\r\n return conf;\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 15.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n var IMAGES_ROOT = 'assets/img/';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .constant('layoutSizes', {\r\n resWidthCollapseSidebar: 1200,\r\n resWidthHideSidebar: 500\r\n })\r\n .constant('layoutPaths', {\r\n images: {\r\n root: IMAGES_ROOT,\r\n profile: IMAGES_ROOT + 'app/profile/',\r\n amMap: 'assets/img/theme/vendor/ammap/dist/ammap/images/',\r\n amChart: 'assets/img/theme/vendor/amcharts/dist/amcharts/images/'\r\n }\r\n })\r\n .constant('colorHelper', {\r\n tint: function(color, weight) {\r\n return mix('#ffffff', color, weight);\r\n },\r\n shade: function(color, weight) {\r\n return mix('#000000', color, weight);\r\n },\r\n });\r\n\r\n function shade(color, weight) {\r\n return mix('#000000', color, weight);\r\n }\r\n\r\n function tint(color, weight) {\r\n return mix('#ffffff', color, weight);\r\n }\r\n\r\n //SASS mix function\r\n function mix(color1, color2, weight) {\r\n // convert a decimal value to hex\r\n function d2h(d) {\r\n return d.toString(16);\r\n }\r\n // convert a hex value to decimal\r\n function h2d(h) {\r\n return parseInt(h, 16);\r\n }\r\n\r\n var result = \"#\";\r\n for(var i = 1; i < 7; i += 2) {\r\n var color1Part = h2d(color1.substr(i, 2));\r\n var color2Part = h2d(color2.substr(i, 2));\r\n var resultPart = d2h(Math.floor(color2Part + (color1Part - color2Part) * (weight / 100.0)));\r\n result += ('0' + resultPart).slice(-2);\r\n }\r\n return result;\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 15.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n if(!navigator.cookieEnabled) {\r\n window.location.href=\"/nocookie.html\";\r\n }\r\n angular.module('BlurAdmin.theme')\r\n .run(themeRun);\r\n var dataLayer = window.dataLayer = window.dataLayer || [];\r\n /** @ngInject */\r\n function themeRun($timeout, $rootScope, $http, $window, $location, $cookies, layoutPaths, preloader, $q, baSidebarService, themeLayoutSettings, screenSize) {\r\n $rootScope.pageTitle = \"Dashboard\";\r\n var carto = $cookies.getObject('Cart');\r\n if(carto == {}){\r\n carto = Globals.CartTemplate();\r\n $cookies.putObject('Cart', carto, {'domain':'challengercme.com'});\r\n $rootScope.$broadcast('CartChanged', carto);\r\n $rootScope.$emit('CartChanged', carto);\r\n }\r\n $rootScope.FullScreenLoading=false;\r\n $rootScope.$on('$locationChangeSuccess', function () {\r\n\r\n dataLayer.push({\r\n event: 'ngRouteChange',\r\n attributes: {\r\n route: $location.path()\r\n }\r\n });\r\n ////console.log(dataLayer);\r\n });\r\n $rootScope.$on('$stateChangeStart', function (e, s) {\r\n $rootScope.pageTitle = s.title;\r\n if (s.url == \"/administration\") {\r\n $http.post(\"/CurrentUser\").success(function (u) {\r\n ////console.log(u);\r\n if (!u.isStaff) {\r\n e.preventDefault();\r\n $location.path(\"/\")\r\n }\r\n });\r\n }\r\n if (s.name.indexOf(\"editor\") > -1) {\r\n $http.post(\"/CurrentUser\").success(function (u) {\r\n //console.log(u);\r\n if (!u.isStaff) {\r\n e.preventDefault();\r\n $location.path(\"/\")\r\n }\r\n });\r\n }\r\n $http.post(\"/CurrentUser\").success(function (u) {\r\n if(u) {\r\n if(\r\n u.RequiredProductsNotPurchased.length &&\r\n s.url != '/store/RequiredPurchase' &&\r\n !s.url.includes('AddCart') &&\r\n !s.url.includes('checkout') &&\r\n !s.url.includes('cart') &&\r\n !s.url.includes('welcome') &&\r\n !s.url.includes('help') &&\r\n !s.url.includes('home') &&\r\n !s.url.includes('profile')\r\n ) {\r\n e.preventDefault();\r\n $location.path('/store/RequiredPurchase');\r\n }\r\n }\r\n\r\n })\r\n\r\n ////console.log(s);\r\n });\r\n function load() {\r\n var whatToWait = [\r\n preloader.loadAmCharts(),\r\n //$timeout(10)\r\n ];\r\n \r\n var theme = themeLayoutSettings;\r\n if (theme.blur) {\r\n if (theme.mobile) {\r\n whatToWait.unshift(preloader.loadImg(layoutPaths.images.root + 'blur-bg-mobile.jpg'));\r\n } else {\r\n whatToWait.unshift(preloader.loadImg(layoutPaths.images.root + 'blur-bg.jpg'));\r\n whatToWait.unshift(preloader.loadImg(layoutPaths.images.root + 'blur-bg-blurred.jpg'));\r\n }\r\n }\r\n\r\n $q.all(whatToWait).then(function () {\r\n $rootScope.$pageFinishedLoading = true;\r\n });\r\n\r\n $timeout(function () {\r\n if (!$rootScope.$pageFinishedLoading) {\r\n $rootScope.$pageFinishedLoading = true;\r\n }\r\n }, 1);\r\n $rootScope.$baSidebarService = baSidebarService;\r\n }\r\n $rootScope.GlobalSettings = {};\r\n $http.get(\"/GlobalSettings\").success(function(data){\r\n $rootScope.GlobalSettings = data;\r\n })\r\n\r\n $http.post(\"/CurrentUser\").success(function (data) {\r\n ////console.log(\"FFFFFFFFFFFFFFFFFFFF\")\r\n $rootScope.User = data;\r\n $rootScope.User.isEditor = false\r\n $rootScope.User.isAuthor = false\r\n if ($rootScope.User.isStaff == true) {\r\n $rootScope.User.isEditor = true\r\n }\r\n ////console.log($rootScope.User)\r\n if(data.UserName) {\r\n\r\n $http.post(\"/GetProducts\").success(function (prds) {\r\n $rootScope.TrialProducts = jQuery.grep(prds.RS_0, function(p) {\r\n return p.HasTrial==\"True\";\r\n });\r\n $rootScope.ExpiredTrialProducts = jQuery.grep($rootScope.TrialProducts, function(p) {\r\n return p.TrialHasExpired==\"True\";\r\n });\r\n $rootScope.ActiveTrialProducts = jQuery.grep($rootScope.TrialProducts, function(p) {\r\n return p.TrialHasExpired==\"False\";\r\n });\r\n ////console.log($rootScope.TrialProducts)\r\n });\r\n $http.post(\"/Execute/GetCourseProductsByUser\", [$rootScope.User.UserName]).success(function(data){\r\n $rootScope.UserPurchases = data.RS_1;\r\n });\r\n var pathy = $location.path();\r\n\r\n if($rootScope.User.Profile.AddressType == null) {\r\n $rootScope.User.Profile.AddressType = 'Home';\r\n }\r\n if($rootScope.User.Profile.AcceptableContactMethod == null) {\r\n $rootScope.User.Profile.AcceptableContactMethod = '';\r\n }\r\n $rootScope.User.Profile.AcceptableContactMethodArr = $rootScope.User.Profile.AcceptableContactMethod.split('|');\r\n\r\n $rootScope.User.Profile.HasRetailInterest = ($rootScope.User.Profile.HasRetailInterest == \"True\");\r\n $rootScope.User.Profile.HasAcademicInterest = ($rootScope.User.Profile.HasAcademicInterest == \"True\");\r\n $rootScope.User.Profile.HasCorporateInterest = ($rootScope.User.Profile.HasCorporateInterest == \"True\");\r\n //////console.log($rootScope.User);\r\n }\r\n if ($rootScope.User.UserId) {\r\n $http.post(\"/Execute/GetUserPremiumRenewalStats\", [$rootScope.User.UserId]).success(\r\n function (rs) {\r\n $rootScope.PremiumInfo = rs.RS_0[0];\r\n /*$scope.PremiumInfo.RenewalStats = {\r\n \"OptOut\": \"False\",\r\n \"Id\": \"\",\r\n \"UserId\": $scope.CurrentUserData.UserID.toString(),\r\n \"Token\": \"0a0a0a0a0a0a0a0a0a0a0a-0a0a0a0a0a-0a0a0a-0a0a0a0a\",\r\n \"TransactionId\": \"10385647290183657492\",\r\n \"ApprovalCode\": \"12345678\",\r\n \"Status\": \"Approved\",\r\n \"Exp\": \"01/17\",\r\n \"CCMask\": \"xxxx-xxxx-xxxx-4242\",\r\n \"IsDefault\": \"True\",\r\n \"StateProvince\": \"TN\"\r\n };*/\r\n\r\n if ($rootScope.PremiumInfo.OptOut == \"True\") {\r\n $rootScope.PremiumInfo.WillRenew = false;\r\n $rootScope.PremiumInfo.NoRenewReason = \"you have opted out of auto-renewal. You will lose full services \" + $rootScope.PremiumInfo.ExpiryDate.split(\" \")[0] + \".
To enable auto-renewal, email support or call 1-888-242-5536 M–F, 8am–6pm CST\";\r\n } else {\r\n if ($rootScope.PremiumInfo.Exp.length > 0) {\r\n var expMonth = 1 * $rootScope.PremiumInfo.Exp.split(\"/\")[0] - 1;\r\n var expYear = 1 * $rootScope.PremiumInfo.Exp.split(\"/\")[1];\r\n if (expYear.toString().length == 2) {\r\n expYear = (2000 + expYear);\r\n }\r\n var expDay = new Date(expYear, expMonth + 1, 0);\r\n ////////console.log((expMonth+1)+\"/\"+expYear)\r\n var premDay = new Date($rootScope.PremiumInfo.ExpiryDate);\r\n var todayDay = new Date();\r\n if (expDay < premDay && expDay > todayDay) {\r\n $rootScope.PremiumInfo.WillRenew = false;\r\n $rootScope.PremiumInfo.NoRenewReason = \"your default payment method expires before your automatic renwal date. Please update your payment method in your Profile to prevent loss of full services on \" + $rootScope.PremiumInfo.ExpiryDate.split(\" \")[0] + \".\";\r\n } else if (expDay <= todayDay) {\r\n $rootScope.PremiumInfo.WillRenew = false;\r\n $rootScope.PremiumInfo.NoRenewReason = \"your default payment method has expired.
Please update your payment method in your Profile to prevent loss of full services on \" + $rootScope.PremiumInfo.ExpiryDate.split(\" \")[0] + \".\";\r\n } else {\r\n $rootScope.PremiumInfo.WillRenew = true;\r\n $rootScope.PremiumInfo.NoRenewReason = null;\r\n }\r\n ////////console.log(expYear.length)\r\n } else {\r\n $rootScope.PremiumInfo.WillRenew = false;\r\n if($rootScope.PremiumInfo.ExpiryDate !== null) {\r\n $rootScope.PremiumInfo.NoRenewReason = \"you have not set a default payment method.
Please update your payment method in your Profile to prevent loss of full services on \" + $rootScope.PremiumInfo.ExpiryDate.split(\" \")[0] + \".\";\r\n\r\n }\r\n }\r\n if($rootScope.PremiumInfo.ExpiryDate == \"\") {\r\n $rootScope.PremiumInfo.ExpiryDate = false;\r\n } else {\r\n $rootScope.PremiumInfo.ExpiryDate = new Date($rootScope.PremiumInfo.ExpiryDate + \" UTC\")\r\n }\r\n\r\n ///*DEBUG*/$rootScope.User.ViewPremiumContent=true;\r\n }\r\n $rootScope.User.PremiumInfo = $rootScope.PremiumInfo;\r\n $rootScope.User.ViewPremiumContent = ($rootScope.User.IsPremium || $rootScope.User.InstitutionId);\r\n\r\n ////////console.log($rootScope.User.PremiumInfo)\r\n }\r\n );\r\n }\r\n\r\n $http.get(\"/GetCourses\").success(function (dc) {\r\n $rootScope.CoursesHolder = dc.RS_0;\r\n $rootScope.Courses = [];\r\n $rootScope.CourseIdArray = [];\r\n //////console.log($rootScope.CourseIdArray);\r\n $rootScope.CoursesForSelect = {};\r\n angular.forEach($rootScope.CoursesHolder, function(crs,index){\r\n crs.SelectTitle=\"Course: \"+crs.Name;\r\n if(1*crs.Id != 745 && 1*crs.Id != 1106 && 1*crs.Id != 1122) {\r\n $rootScope.CourseIdArray.push(crs.Id);\r\n $rootScope.Courses.push(crs);\r\n }\r\n });\r\n $rootScope.ExpiredTrials = jQuery.grep($rootScope.Courses,function(e){\r\n return (e.HasExpired == \"True\" && e.IsTrial == \"1\");\r\n })\r\n $rootScope.ActiveTrials = jQuery.grep($rootScope.Courses,function(e){\r\n return (e.HasExpired == \"False\" && e.IsTrial==\"1\");\r\n })\r\n ////////console.log($rootScope.CourseIdArray);\r\n if (data.UserName) {\r\n try {\r\n //////console.log(isImpersonating)\r\n if (isImpersonating) {\r\n $rootScope.isImpersonating = true;\r\n alert(\"You are impersonating a user\")\r\n } else {\r\n //console.log(data.isStaff);\r\n if (!data.isStaff) {\r\n $rootScope.io = io(\"wss://sockets.challengercme.com\", { secure: true, query: \"username=\" + data.UserName });\r\n $rootScope.io.on('UserCourse', function (d) {\r\n if (d == data.UserName && $window.location.pathname != '/Prohibited') {\r\n $window.location.href = '/Prohibited';\r\n }\r\n });\r\n }\r\n }\r\n\r\n }\r\n catch (e) {\r\n //////console.log(e);\r\n }\r\n\r\n $http.post(\"/Execute/GetUserSettings\", [data.UserId]).success(function (dset) {\r\n $rootScope.UserSettings = JSON.parse(dset.RS_0[0].Settings);\r\n $rootScope.SaveUserSettings = function () {\r\n $http.post(\"/Execute/SaveUserSettings\", [$rootScope.User.UserId, JSON.stringify($rootScope.UserSettings)]).success(function (data) {\r\n //$scope.LoadSettings();\r\n //console.log('Settings Saved')\r\n });\r\n }\r\n ////console.log($rootScope.UserSettings)\r\n $http.post(\"/Execute/GetUserRoleList\", [data.UserName]).success(function (d) {\r\n $rootScope.UserRoles = d.RS_0;\r\n //console.log($rootScope.UserRoles)\r\n ////console.log(d)\r\n $rootScope.IsCheater = (jQuery.grep($rootScope.UserRoles, function (e) {\r\n //////console.log(e)\r\n return e.RoleID == \"44\";\r\n })).length == 1;\r\n $rootScope.IsAssignee = (jQuery.grep($rootScope.UserRoles, function(e){\r\n return e.RoleID == \"41\";\r\n })).length == 1;\r\n $rootScope.IsPermanentPremium = (jQuery.grep($rootScope.UserRoles, function(e){\r\n return (e.RoleID == \"45\" && e.EffectiveDate != \"\" && e.ExpiryDate == \"\");\r\n })).length == 1;\r\n angular.forEach($rootScope.UserRoles, function (ur) {\r\n if (ur.RoleID == \"49\") {\r\n $rootScope.User.isAuthor = true\r\n }\r\n })\r\n ////console.log(\"PERMPREM=\"+$rootScope.IsPermanentPremium)\r\n //////console.log($rootScope.IsCheater)\r\n \r\n\r\n //jQuery.grep($rootScope.UserRoles, function (ur) {\r\n // if (jQuery.inArray(ur, $rootScope.InstitutionSettings.InactiveClasses) == 1) {\r\n // $rootScope.InactiveClassmate = true;\r\n \r\n // }\r\n // else {\r\n // $rootScope.InactiveClassmate = false;\r\n // }\r\n //})\r\n \r\n load();\r\n });\r\n if ($rootScope.User.InstitutionId > 0) {\r\n //////console.log($rootScope.User.InstitutionId)\r\n $http.post(\"/Execute/GetInstitutionSettings\", [$rootScope.User.InstitutionId]).success(function (inst) {\r\n $rootScope.InstitutionSettings = JSON.parse(inst.RS_0[0].SettingsJSON);\r\n ////console.log($rootScope.InstitutionSettings)\r\n if ($rootScope.InstitutionSettings.InactiveClasses) {\r\n angular.forEach($rootScope.InstitutionSettings.InactiveClasses, function (ia) {\r\n if (ia == $rootScope.User.Profile.Class) {\r\n $rootScope.User.ViewPremiumContent = false;\r\n //////console.log($rootScope.ViewPremiumContent)\r\n }\r\n else {\r\n $rootScope.User.ViewPremiumContent = true;\r\n //////console.log($rootScope.ViewPremiumContent)\r\n }\r\n })\r\n }\r\n else {\r\n $rootScope.User.ViewPremiumContent = true;\r\n }\r\n \r\n })\r\n $http.post(\"/Execute/GetAssignableUsersForInstitution\", [$rootScope.User.InstitutionId]).success(function (cal) {\r\n $rootScope.InstitutionUserList = cal.RS_0;\r\n\r\n //////console.log($rootScope.InstitutionUserList)\r\n })\r\n };\r\n });\r\n } else {\r\n $rootScope.UserRoles = [];\r\n load();\r\n }\r\n });\r\n\r\n\r\n });\r\n $rootScope.ptflurp = {};\r\n $rootScope.ptflurp.SearchQueryTop = '';\r\n $rootScope.ptflurp.PageSize = 10;\r\n $rootScope.ptflurp.PageSizes = [\r\n {\r\n id:5,\r\n label:'5'\r\n },\r\n {\r\n id:10,\r\n label:'10'\r\n },\r\n {\r\n id:50,\r\n label:'50'\r\n },\r\n {\r\n id:100,\r\n label:'100'\r\n }\r\n ];\r\n $rootScope.CurrentYear = new Date().getFullYear();\r\n $rootScope.desktop = screenSize.on('md, lg', function(match){\r\n $rootScope.desktop = match;\r\n });\r\n $rootScope.mobile = screenSize.on('xs, sm', function(match){\r\n $rootScope.mobile = match;\r\n });\r\n }\r\n})();\n/**\r\n * Created by k.danovsky on 12.05.2016.\r\n */\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('themeLayoutSettings', themeLayoutSettings);\r\n\r\n /** @ngInject */\r\n function themeLayoutSettings(baConfig) {\r\n var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|windows phone/).test(navigator.userAgent.toLowerCase());\r\n var mobileClass = isMobile ? 'mobile' : '';\r\n var blurClass = baConfig.theme.blur ? 'blur-theme' : '';\r\n angular.element(document.body).addClass(mobileClass).addClass(blurClass);\r\n\r\n return {\r\n blur: baConfig.theme.blur,\r\n mobile: isMobile,\r\n }\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 21.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.profile')\r\n .controller('ProfileModalCtrl', ProfileModalCtrl);\r\n\r\n /** @ngInject */\r\n function ProfileModalCtrl($scope, $uibModalInstance) {\r\n $scope.link = '';\r\n $scope.ok = function () {\r\n $uibModalInstance.close($scope.link);\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.profile')\r\n .controller('ProfilePageCtrl', ProfilePageCtrl)\r\n .controller('CMEProfilePageCtrl', CMEProfilePageCtrl);\r\n\r\n\r\n /** @ngInject */\r\n function CMEProfilePageCtrl($scope, $rootScope, $http, $window, $filter, $uibModal, toastr, toastrConfig) {\r\n $scope.ResetAdaptive = function() {\r\n /*var date = new Date();\r\n var utcdate = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(),\r\n date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n var newdate = new Date(utcdate);\r\n var formatteddate = newdate.formatSQLDateTime();*/\r\n var utcStr = new Date().toUTCString();\r\n var utcDate = new Date(utcStr);\r\n var formatteddate = utcDate.formatSQLDateTime();\r\n //alert(formatteddate);\r\n swal(\r\n {\r\n title: \"Reset adaptive learning data?\",\r\n text: \"This will clear your adaptive learning data.

No scores will be deleted, but your performance before now will no longer be used to curate the questions you see in smart assessments.

There is no undo. Continue?\",\r\n html: true,\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonColor: \"#FF0000\",\r\n confirmButtonText: \"Yes, reset data now.\",\r\n closeOnConfirm: false\r\n },\r\n function() {\r\n $http.post(\"/Execute/SetAdaptiveLearningEffectiveDate\", [$scope.User.UserId,formatteddate]).success(function (data) {\r\n swal\r\n ({\r\n title: \"Adaptive learning reset successfully.\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n }, function () {\r\n $scope.LoadProfile($scope.User)\r\n });\r\n }).error(function(data){\r\n swal\r\n ({\r\n title: \"There was an error processing the request.\",\r\n type: \"error\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n })\r\n }\r\n )\r\n\r\n }\r\n $scope.GetAdaptiveDate = function (user) {\r\n //console.log('go')\r\n $http.post(\"/Execute/GetAdaptiveLearningEffectiveDate\", [user.UserId]).success(function (data) {\r\n $scope.ResetDate = data.RS_0[0]\r\n })\r\n }\r\n \r\n $scope.WaitLoading = false;\r\n $scope.User = $rootScope.User;\r\n $scope.States = Globals.StateProvince;\r\n $scope.Countries = Globals.Countries;\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.Specialties = Globals.Specialties;\r\n $scope.SaveProfile = function () {\r\n $scope.WaitLoading = true;\r\n ////console.log($scope.User)\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n //console.log($scope.User)\r\n $scope.LoadProfile($scope.User.UserName);\r\n $scope.WaitLoading = false;\r\n $window.location.href='/c/claim-cme';\r\n });\r\n }\r\n $scope.LoadProfile = function (username) {\r\n //alert('loadprofile')\r\n //console.log(username)\r\n if (username) {\r\n $http.post(\"/GetUser\", [username]).success(function (data) {\r\n $scope.User = data;\r\n /*if($scope.User.Profile.AdditionalDegree == null) {\r\n $scope.User.Profile.AdditionalDegree = '';\r\n }\r\n if($scope.User.Profile.Specialty2 == null) {\r\n $scope.User.Profile.Specialty2 = '';\r\n }*/\r\n //$scope.User.Profile.AdditionalDegreeArr = $scope.User.Profile.AdditionalDegree.split('|');\r\n //$scope.User.Profile.Specialty2Arr = $scope.User.Profile.Specialty2.split('|');\r\n $scope.User.Profile.AcceptableContactMethodArr = $scope.User.Profile.AcceptableContactMethod.split('|');\r\n $scope.User.Profile.HasRetailInterest = ($scope.User.Profile.HasRetailInterest == \"True\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.User.Profile.HasAcademicInterest == \"True\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.User.Profile.HasCorporateInterest == \"True\");\r\n $scope.User.Profile['Premium AutoRenew Opt-Out'] = ($scope.User.Profile['Premium AutoRenew Opt-Out'] == 'True' ? \"True\":\"False\");\r\n $http.post(\"/Execute/GetUserPremiumRenewalStats\", [$scope.User.UserId]).success(function (rs) {\r\n $scope.User.PremiumInfo = rs.RS_0[0];\r\n $scope.User.PremiumInfo.ExpiryDate = new Date($scope.User.PremiumInfo.ExpiryDate + \" UTC\")\r\n //console.log($scope.User)\r\n });\r\n $scope.ResetDate = []\r\n $scope.GetAdaptiveDate()\r\n ////console.log($scope.User.Profile)\r\n });\r\n }\r\n }\r\n }\r\n function ProfilePageCtrl($scope, $rootScope, $http, $timeout, fileReader, $filter, $uibModal, toastr, toastrConfig) {\r\n $scope.UserEmailOptOutSettings = [];\r\n $scope.ResetAdaptive = function() {\r\n /*var date = new Date();\r\n var utcdate = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(),\r\n date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n var newdate = new Date(utcdate);\r\n var formatteddate = newdate.formatSQLDateTime();*/\r\n var utcStr = new Date().toUTCString();\r\n var utcDate = new Date(utcStr);\r\n var formatteddate = utcDate.formatSQLDateTime();\r\n //alert(formatteddate);\r\n swal(\r\n {\r\n title: \"Are you sure?\",\r\n text: \"This will reset your adaptive learning metadata.

Scores and prescriptions will not be affected. Continue?\",\r\n html: true,\r\n type: \"warning\",\r\n showCancelButton: true,\r\n confirmButtonColor: \"#FF0000\",\r\n confirmButtonText: \"Yes, reset data now.\",\r\n closeOnConfirm: false\r\n },\r\n function() {\r\n $http.post(\"/Execute/SetAdaptiveLearningEffectiveDate\", [$scope.User.UserId,formatteddate]).success(function (data) {\r\n swal\r\n ({\r\n title: \"Adaptive learning reset successfully.\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n },\r\n function () {\r\n $scope.LoadProfile($scope.User)\r\n });\r\n }).error(function(data){\r\n swal\r\n ({\r\n title: \"There was an error processing the request.\",\r\n type: \"error\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n })\r\n }\r\n )\r\n\r\n }\r\n //$scope.passwordForm = {};\r\n $scope.WaitLoading = false;\r\n $scope.PwWaitLoading = false;\r\n $scope.GetAdaptiveDate = function (user) {\r\n //console.log('go')\r\n $http.post(\"/Execute/GetAdaptiveLearningEffectiveDate\", [user.UserId]).success(function (data) {\r\n $scope.ResetDate = data.RS_0[0]\r\n })\r\n }\r\n \r\n\r\n $scope.EditCell = $scope.EditCity = $scope.EditCountry = $scope.EditFax = $scope.EditPostalCode = $scope.EditRegion = $scope.EditStreet = $scope.EditTelephone = $scope.EditUnit = false;\r\n $scope.EditProfile = $scope.EditUsername = false;\r\n $scope.UserRoles = $rootScope.UserRoles;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.User = $rootScope.User;\r\n //console.log($scope.User)\r\n $scope.ChangeTheme = function(theme) {\r\n if(theme == 'default' || theme == 'chall-light') {\r\n $rootScope.UserSettings.AppTheme = theme;\r\n $rootScope.SaveUserSettings();\r\n }\r\n\r\n }\r\n $scope.SaveSettings = function () {\r\n\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n swal\r\n ({\r\n title: \"Profile Settings Saved\",\r\n type: \"success\",\r\n showConfirmButton: true,\r\n closeOnConfirm: true\r\n });\r\n });\r\n };\r\n $scope.$watch('username', function (n, o) {\r\n if ($scope.EditUsername == false) {\r\n $scope.EditCell = $scope.EditCity = $scope.EditCountry = $scope.EditFax = $scope.EditPostalCode = $scope.EditRegion = $scope.EditStreet = $scope.EditTelephone = $scope.EditUnit = false;\r\n $scope.EditProfile = false;\r\n //$scope.Original = {UserName : n.UserName}\r\n $scope.LoadProfile(n);\r\n }\r\n });\r\n $scope.Revert = function () {\r\n $scope.LoadProfile($scope.username)\r\n }\r\n \r\n $scope.Specialties = Globals.Specialties;\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.AdditionalSpecialties = Globals.AdditionalSpecialties;\r\n $scope.AdditionalDegrees = Globals.AdditionalDegrees;\r\n $scope.ClinicianTypes = Globals.ClinicianTypes;\r\n $scope.States = Globals.StateProvince;\r\n $scope.Countries = Globals.Countries;\r\n $scope.AcceptableContactMethods = Globals.AcceptableContactMethods;\r\n $scope.TestingYears = Globals.SpecYears;\r\n $scope.Sortulator = function(year) {\r\n return year === 'Before 2000' ? '0' : year;\r\n }\r\n $scope.Salutations = Globals.Salutations;\r\n $scope.SetDefaultPayment = function (payId) {\r\n $http.post(\"/SetDefaultPayment\", [payId]).success(function (data) {\r\n //console.log(data);\r\n });\r\n }\r\n $scope.DeletePaymentOption = function (payId) {\r\n $http.post(\"/DeletePaymentOption\", [payId]).success(function (data) {\r\n //console.log(data);\r\n $scope.LoadPaymentOptions();\r\n });\r\n }\r\n $scope.LoadPaymentOptions = function () {\r\n $http.post(\"/GetPaymentOptions\", [$scope.User.UserId]).success(function (data) {\r\n angular.forEach(data, function (d) {\r\n d.isDefault = d.isDefault == 'True';\r\n if (d.isDefault == true) {\r\n $scope.DefaultPaymentId = d.id\r\n }\r\n });\r\n $scope.PaymentOptions = data;\r\n });\r\n }\r\n $scope.AddNewPayment = function () {\r\n $scope.NewPayment = { \"Address2\": \"\", \"MakeDefault\": true };\r\n }\r\n $scope.CancelNewPayment = function () {\r\n delete $scope.NewPayment;\r\n }\r\n $scope.SubmitNewPayment = function () {\r\n $scope.wait = true;\r\n //console.log($scope.NewPayment);\r\n $http.post(\"/AddPaymentOption\", $scope.NewPayment).success(function (data) {\r\n //console.log(data);\r\n $scope.wait = false;\r\n if (data != \"All Good\") {\r\n alert(data);\r\n } else {\r\n $scope.LoadPaymentOptions();\r\n delete $scope.NewPayment;\r\n }\r\n }).error(function (err) {\r\n //console.log(err);\r\n $scope.wait = false;\r\n delete $scope.NewPayment;\r\n });\r\n }\r\n $scope.CheckUsername = function (uname) {\r\n if (uname == $scope.Username) {\r\n $scope.UsernameStatus = \"Current\";\r\n } else {\r\n if (uname.length > 4) {\r\n var reg = /^[0-9a-zA-Z\\-]+$/;\r\n if (reg.test(uname) || validateEmail(uname)) {\r\n $http.post(\"Execute/CheckUserExists\", [uname]).success(function (data) {\r\n $scope.UsernameStatus = data.RS_0[0].Status;\r\n if ($scope.UsernameStatus == 'Available') {\r\n $scope.UsernameStatusStyle = { color: 'green' };\r\n } else {\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n });\r\n } else {\r\n $scope.UsernameStatus = \"Invalid Characters\";\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n } else {\r\n $scope.UsernameStatus = \"Too Short\";\r\n $scope.UsernameStatusStyle = { color: 'red' };\r\n }\r\n }\r\n }\r\n $scope.SaveUsername = function () {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.username = $scope.User.UserName;\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Username Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveFirstName = function () {\r\n $scope.User.Profile.FirstName = $scope.User.FirstName;\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"First Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveLastName = function () {\r\n $scope.User.Profile.LastName = $scope.User.LastName;\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Last Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveDisplayName = function () {\r\n $scope.User.Profile.DisplayName = $scope.User.DisplayName;\r\n $http.post(\"/SaveUserInfo\", $scope.Profile).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n alert(\"\", \"Display Name Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.SaveEmail = function () {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n $scope.LoadProfile($scope.username);\r\n //alert(\"\", \"Email Saved\", \"success\", null, 1750, null);\r\n });\r\n return false;\r\n }\r\n $scope.LoadPassword = function () {\r\n $http.post(\"/CurrentUser\").success(function (data) {\r\n //alert('loadUserInfo')\r\n $scope.UserInfo = data;\r\n ////console.log($scope.UserInfo);\r\n });\r\n }\r\n //$scope.NewPassword = '';\r\n //$scope.ConfirmPassword = '';\r\n $scope.NewPassObj = {};\r\n $scope.SavePassword = function () {\r\n if (!$scope.NewPassObj.NewPassword || !$scope.NewPassObj.ConfirmPassword) {\r\n swal( \"Error\", \"Password must not be blank\",\"error\", null, null, null);\r\n } else if ($scope.NewPassObj.ConfirmPassword !== $scope.NewPassObj.NewPassword) {\r\n swal(\"Error\", \"Passwords do not match\", \"error\", null, null, null);\r\n } else if ($scope.NewPassObj.ConfirmPassword.length < 6) {\r\n swal(\"Error\", \"Password must be at least 6 characters long\", \"error\", null, null, null);\r\n } else {\r\n $scope.PwWaitLoading = true;\r\n $http.post(\"/Nosferatu\", [$scope.NewPassObj.NewPassword]).success(function (data) {\r\n $scope.LoadPassword();\r\n $scope.PwWaitLoading = false;\r\n swal(\"Password Saved\", \"\", \"success\", null, 1750, null);\r\n $scope.NewPassObj = {};\r\n $scope.passwordForm.$setPristine();\r\n $scope.passwordForm.$setUntouched();\r\n });\r\n }\r\n }\r\n $scope.User.Profile.OriginalNickname = $scope.User.Profile.Nickname;\r\n $scope.UpdateOptOut = function (d) {\r\n if(d){\r\n var arr = [];\r\n var list = '';\r\n angular.forEach(d,function(i){\r\n //Selected means user wants to opt out\r\n if(i.Selected=='1') {\r\n arr.push(i.Id);\r\n }\r\n\r\n });\r\n list = arr.join(',');\r\n $http.post('/Execute/SaveEmailOptOutSettings', [$scope.User.UserId,list]).success(function(r){\r\n //return true;\r\n\r\n })\r\n }\r\n }\r\n $scope.LoadProfile = function (username) {\r\n //alert('loadprofile')\r\n if (!username) {\r\n username = $scope.User.UserName\r\n }\r\n //console.log('user', username)\r\n if (username) {\r\n $http.post(\"/Execute/GetEmailOptOutSettings\", [$scope.User.UserId]).success(function(data) {\r\n // Selected means user opts out\r\n $scope.UserEmailOptOutSettings = data.RS_0;\r\n })\r\n $http.post(\"/GetUser\", [username]).success(function (data) {\r\n\r\n $scope.EditUsername == false\r\n $scope.EditUsername = false;\r\n $scope.EditFirstName = false;\r\n $scope.EditLastName = false;\r\n $scope.EditEmail = false;\r\n $scope.UsernameStatus = \"Current\";\r\n $scope.UsernameStatusStyle = { display: 'none' };\r\n $scope.User = data;\r\n $scope.User.Profile.OriginalNickname = $scope.User.Profile.Nickname;\r\n /*if($scope.User.Profile.AdditionalDegree == null) {\r\n $scope.User.Profile.AdditionalDegree = '';\r\n }\r\n if($scope.User.Profile.Specialty2 == null) {\r\n $scope.User.Profile.Specialty2 = '';\r\n }*/\r\n //$scope.User.Profile.AdditionalDegreeArr = $scope.User.Profile.AdditionalDegree.split('|');\r\n //$scope.User.Profile.Specialty2Arr = $scope.User.Profile.Specialty2.split('|');\r\n $scope.User.Profile.AcceptableContactMethodArr = $scope.User.Profile.AcceptableContactMethod.split('|');\r\n $scope.User.Profile.HasRetailInterest = ($scope.User.Profile.HasRetailInterest == \"True\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.User.Profile.HasAcademicInterest == \"True\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.User.Profile.HasCorporateInterest == \"True\");\r\n //$scope.User.Profile['Premium AutoRenew Opt-Out'] = ($scope.User.Profile['Premium AutoRenew Opt-Out'] == \"True\");\r\n $http.post(\"/Execute/GetUserPremiumRenewalStats\", [$scope.User.UserId]).success(function (rs) {\r\n $scope.User.PremiumInfo = rs.RS_0[0];\r\n $scope.User.PremiumInfo.ExpiryDate = new Date($scope.User.PremiumInfo.ExpiryDate + \" UTC\")\r\n //console.log($scope.User)\r\n });\r\n $scope.ResetDate = []\r\n $scope.GetAdaptiveDate($scope.User)\r\n ////console.log($scope.User.Profile)\r\n });\r\n }\r\n }\r\n $scope.SaveProfile = function () {\r\n $scope.WaitLoading = true;\r\n //$scope.User.Profile.AdditionalDegree = $scope.User.Profile.AdditionalDegreeArr.join('|');\r\n //$scope.User.Profile.Specialty2 = $scope.User.Profile.Specialty2Arr.join('|');\r\n /*if($scope.User.Profile.AcceptableContactMethod == null) {\r\n $scope.User.Profile.AcceptableContactMethod = '';\r\n }*/\r\n $scope.User.Profile.AcceptableContactMethod = $scope.User.Profile.AcceptableContactMethodArr.join('|');\r\n $scope.User.Profile.HasRetailInterest = ($scope.User.Profile.HasRetailInterest ? \"True\" : \"False\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.User.Profile.HasAcademicInterest ? \"True\" : \"False\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.User.Profile.HasCorporateInterest ? \"True\" : \"False\");\r\n $scope.User.Profile['Premium AutoRenew Opt-Out'] = ($scope.User.Profile['Premium AutoRenew Opt-Out']=='True' ? \"True\" : \"False\");\r\n ////console.log($scope.User)\r\n if($scope.User.Profile.Country == null) {\r\n $scope.User.Profile.Country = \"\";\r\n }\r\n if($scope.User.Profile.Nickname !== $scope.User.Profile.OriginalNickname){\r\n $http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [$scope.User.Profile.Nickname]).success(function (datablap) {\r\n ////console.log(data)\r\n if (datablap.RS_0[\"0\"].Message == \"All Good\") {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n //console.log($scope.User)\r\n $scope.LoadProfile($scope.User.UserName);\r\n $scope.WaitLoading = false;\r\n swal({\r\n title: \"Profile Updated\",\r\n type: \"success\"\r\n });\r\n });\r\n } else {\r\n $scope.WaitLoading = false;\r\n swal({\r\n html: true,\r\n title: \"Gaming Alias Already Exists\",\r\n text: \"The gaming alias \" + $scope.User.Profile.Nickname + \" is associated with an existing account. Please choose a different one.\",\r\n type: \"error\"\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#inputGamingAlias').select();\r\n })\r\n\r\n });\r\n }\r\n });\r\n } else {\r\n $http.post(\"/SaveUserInfo\", $scope.User).success(function (data) {\r\n //console.log($scope.User)\r\n $scope.LoadProfile($scope.User.UserName);\r\n $scope.WaitLoading = false;\r\n swal({\r\n title: \"Profile Updated\",\r\n type: \"success\"\r\n });\r\n });\r\n }\r\n\r\n }\r\n\r\n\r\n $scope.Regions = {\r\n };\r\n $scope.GetRegions = function (Country) {\r\n //console.log($scope.Regions[\"United States\"]);\r\n return $scope.Regions[Country];\r\n };\r\n $scope.OnlyTelChars = /^[0-9\\.\\(\\)\\-\\+\\ ]+$/;\r\n ////console.log(\"bind\")\r\n\r\n }\r\n\r\n})();\r\n\n\r\n(function () {\r\n 'use strict';\r\n /**\r\n * DON'T USE THIS. THIS IS A VESTIGIAL PAGE. USE THE DIRECTIVE 'progmanageusers' INSTEAD\r\n */\r\n angular.module('BlurAdmin.pages.institution')\r\n .controller('progdashManageUsersCtrl', function ($scope, $rootScope, $http, $stateParams, $state, $location, $filter, toastr, toastrConfig) {\r\n $scope.User = $rootScope.User;\r\n angular.extend(toastrConfig,\r\n {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-full-width',\r\n type: 'error',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: true,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n\r\n });\r\n $scope.uploadComplete = function (content, Institution) {\r\n //console.log(content);\r\n angular.forEach(content, function (u) {\r\n var usrExist = false;\r\n angular.forEach($scope.Inst.Users, function (iu) {\r\n if (u.Username == iu.Username) {\r\n usrExist = true;\r\n iu.Email = u.Email;\r\n iu.FirstName = u.FirstName;\r\n iu.LastName = u.LastName;\r\n iu.ClassName = u.ClassName;\r\n }\r\n });\r\n if (!usrExist) {\r\n $scope.Inst.Users.push(u);\r\n }\r\n });\r\n Institution.SavePrompt = true;\r\n }\r\n $scope.CalculteAllocation = function (i,fn) {\r\n if (i.Users && i.Settings) {\r\n $scope.UnAllocatedCount = 0\r\n $scope.StudentCount = 0\r\n $scope.InactiveCount = 0\r\n $scope.FacultyCount = 0\r\n $scope.AdminCount = 0\r\n angular.forEach(i.Users, function (u) {\r\n var al = false;\r\n angular.forEach(i.Settings.StudentClasses, function (sc) {\r\n if (u.ClassName == sc) { $scope.StudentCount += 1; al = true; }\r\n });\r\n angular.forEach(i.Settings.InactiveClasses, function (ia) {\r\n if (u.ClassName == ia) { $scope.InactiveCount += 1; al = true; }\r\n });\r\n if (u.ClassName == i.Settings.FacultyTerm) { $scope.FacultyCount += 1; al = true; }\r\n if (u.ClassName == i.Settings.AdminTerm) { $scope.AdminCount += 1; al = true; }\r\n if (al == false) { $scope.UnAllocatedCount += 1 }\r\n });\r\n var isValid = true;\r\n if ($scope.UnAllocatedCount > 0) {\r\n isValid = false;\r\n toastr['error']('You have ' + $scope.UnAllocatedCount + ' UnAllocated User(s)', '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (($scope.FacultyCount + $scope.AdminCount) > i.FacultySlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.FacultyTerm + '
Limit: ' + i.FacultySlots + '
Allocated: ' + ($scope.FacultyCount + $scope.AdminCount), '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if ($scope.StudentCount > i.StudentSlots) {\r\n isValid = false;\r\n toastr['error']('To Many Users Allocated to ' + i.Settings.LearnerTerm + '
Limit: ' + i.StudentSlots + '
Allocated: ' + $scope.StudentCount, '

Allocation Error

')\r\n i.SavePrompt = false\r\n }\r\n if (fn) { fn(isValid) }\r\n }\r\n }\r\n $scope.LoadAssets = function (i) {\r\n if (!i.Assigned || !i.Available) {\r\n $http.post(\"/Execute/GetInstitutionCourses\", [i.Id]).success(function (data) {\r\n i.Assigned = data.RS_0;\r\n i.Available = data.RS_1;\r\n //console.log(i)\r\n });\r\n }\r\n }\r\n $scope.LoadUsers = function (i) {\r\n $scope.LoadSettings(i, function () {\r\n if (!i.Users) {\r\n i.InactiveUsers = [];\r\n if (!i.Classes) { i.Classes = []; }\r\n $http.post(\"/Execute/GetInstitutionMembers\", [i.Id]).success(function (data) {\r\n if (data.RS_0) {\r\n i.Users = data.RS_0;\r\n }\r\n else {\r\n i.Users = []\r\n }\r\n angular.forEach(i.Users, function (u) {\r\n u.drag = true;\r\n var ClassExists = false;\r\n var cls\r\n angular.forEach(i.Classes, function (c) {\r\n if (c.Name == u.ClassName) {\r\n ClassExists = true;\r\n cls = c;\r\n }\r\n });\r\n if (ClassExists == false) {\r\n cls = { Name: u.ClassName, Members: [] }\r\n i.Classes.push(cls);\r\n }\r\n if (u.ClassName == '') { u.ClassName = 'Unassigned' }\r\n cls.Members.push(u);\r\n $http.get(\"/GetPassword/\" + u.Username).success(function (pass) {\r\n u.Password = pass\r\n });\r\n });\r\n $scope.CalculteAllocation(i);\r\n });\r\n $scope.Inst = i;\r\n }\r\n });\r\n }\r\n\r\n $scope.LoadSettings = function (i, fn) {\r\n if (!i.Settings) {\r\n $scope.FacultyRoles = angular.copy(Globals.InstitutionalFacultyRoles);\r\n $scope.LearnerRoles = angular.copy(Globals.InstitutionalLearnerRoles);\r\n $scope.AdminRoles = angular.copy(Globals.InstitutionalAdminRoles);\r\n if (!i.Settings) {\r\n $http.post(\"/Execute/GetInstitutionSettings\", [i.Id]).success(function (data) {\r\n if (data.RS_0.length > 0) {\r\n i.Settings = JSON.parse(data.RS_0[0].SettingsJSON);\r\n }\r\n else {\r\n i.Settings = {\r\n FacultyTerm: \"Faculty\",\r\n FacultyRoles: [],\r\n LearnerTerm: \"Student\",\r\n LearnerRoles: [],\r\n StudentClasses: [\"PGY1\", \"PGY2\", \"PGY3\"],\r\n InactiveClasses: [\"Graduated\"],\r\n Classes: function () {\r\n var lst = angular.copy(this.StudentClasses);\r\n lst.unshift(this.FacultyTerm)\r\n return lst;\r\n }\r\n }\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n\r\n if (fn) { fn(); }\r\n });\r\n } else {\r\n if (!i.Settings.InactiveClasses) {\r\n i.Settings.InactiveClasses = [\"Graduated\"]\r\n }\r\n angular.forEach($scope.FacultyRoles, function (Role) {\r\n angular.forEach(i.Settings.FacultyRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.AdminRoles, function (Role) {\r\n angular.forEach(i.Settings.AdminRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n angular.forEach($scope.LearnerRoles, function (Role) {\r\n angular.forEach(i.Settings.LearnerRoles, function (sr) {\r\n if (Role.Id == sr.Id) {\r\n Role.Selected = true;\r\n }\r\n });\r\n });\r\n if (fn) { fn(); }\r\n }\r\n } else {\r\n if (fn) { fn(); }\r\n }\r\n }\r\n $scope.SaveUsers = function (i) {\r\n $scope.CalculteAllocation(i, function (isValid) {\r\n if (isValid) {\r\n $http.post(\"/UpdateInstitutionUser/\" + i.Id, i.Users).success(function (d) {\r\n //console.log(d)\r\n toastr['success']('Users Saved', '

Success

');\r\n i.SavePrompt = false;\r\n });\r\n }\r\n });\r\n }\r\n $scope.LoadInstitution = function () {\r\n $http.post(\"/Execute/GetInstitution\", [$scope.User.InstitutionId]).success(function (data) {\r\n var inst = data.RS_0[0];\r\n ////console.log(inst)\r\n inst.ImpersonateEmail = (inst.ImpersonateEmail == \"True\");\r\n inst.Inactive = (inst.Inactive == \"True\");\r\n inst.InactiveT = inst.Inactive;\r\n inst.SavePrompt = false;\r\n $scope.Classifications = data.RS_1;\r\n $scope.LoadUsers(inst);\r\n $scope.LoadAssets(inst);\r\n });\r\n }\r\n })\r\n /** @ngInject */\r\n})();\r\n\r\n\r\n\r\n\n/**\r\n * @author d.lapoint\r\n * created on 27 Jul 2017\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.registration')\r\n .controller('RegistrationPageCtrl1', function ($scope, $rootScope, $http, fileReader, $filter, $uibModal, $state, $window, $location, toastr, toastrConfig, regSvc) {\r\n\r\n if($rootScope.User.UserName) {\r\n $window.location.href='/';\r\n }\r\n $scope.current = $state.current;\r\n $scope.regData = regSvc;\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.Specialties = Globals.Specialties;\r\n $scope.loc = function(p) {\r\n $location.path(p);\r\n }\r\n $scope.TestingYears = Globals.TestingYears;\r\n\r\n $scope.regData.ContactByEmail = true;\r\n $scope.regData.ContactByPhone = true;\r\n $scope.regData.ContactByText = true;\r\n $scope.regData.ContactByMail = false;\r\n $scope.SubmitStep1 = function() {\r\n //alert(\"Process Step 1 Placeholder\");\r\n //$scope.regData.Channel = $scope.Channel;\r\n $scope.loc('/registration/2');\r\n };\r\n\r\n\r\n var searchObj = $location.search();\r\n $scope.regData.Campaign = 'none';\r\n if(searchObj.campaign) {\r\n $scope.regData.Campaign = searchObj.campaign;\r\n }\r\n $scope.regData.Route = 'General Registration';\r\n if(searchObj.route=='fulltrial') {\r\n $scope.regData.Route = 'Full Trial';\r\n $scope.regData.Channel = \"1\";\r\n $scope.SubmitStep1();\r\n } else\r\n if(searchObj.route=='cart') {\r\n $scope.regData.Route = 'Cart Signup';\r\n $scope.regData.Channel = \"1\";\r\n $scope.SubmitStep1();\r\n } else\r\n if(searchObj.route=='checkout') {\r\n $scope.regData.Route = 'Checkout Signup';\r\n $scope.regData.Channel = \"1\";\r\n $scope.SubmitStep1();\r\n } else {\r\n $scope.regData.Channel = \"1\";\r\n $scope.SubmitStep1();\r\n }\r\n })\r\n .controller('RegistrationPageCtrl2', function (\r\n $scope,\r\n $rootScope,\r\n $http,\r\n $cookies, fileReader, $filter, $uibModal, $uibTooltip, $state, $location, $window, $timeout, toastr, toastrConfig, regSvc) {\r\n if($rootScope.User.UserName) {\r\n $window.location.href='/';\r\n }\r\n $scope.newRegSubStep = 0;\r\n $scope.SaveWaiting = false;\r\n $scope.regData = regSvc;\r\n //console.log($scope.regData);\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.Specialties = Globals.Specialties;\r\n $scope.ClinicianTypes = Globals.ClinicianTypes;\r\n $scope.loc = function(p) {\r\n $location.path(p);\r\n }\r\n $scope.TestingYears = Globals.TestingYears;\r\n /*$scope.ContactByEmail = true;\r\n $scope.ContactByPhone = true;\r\n $scope.ContactByText = true;\r\n $scope.ContactByMail = false;*/\r\n $scope.SubmitStep2 = function() {\r\n ////console.log(regD)\r\n $scope.SaveWaiting = true;\r\n if(!$scope.regData.Email) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Email address is required.\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#email').focus();\r\n })\r\n\r\n });\r\n\r\n $scope.SaveWaiting = false;\r\n } else if (!/^\\w+([\\.+-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test($scope.regData.Email)) {\r\n swal({\r\n title: \"Error\",\r\n text: \"That doesn't look like an email address.\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#email').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if (!$scope.regData.Password) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Password can't be blank\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#password').focus();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if (!$scope.regData.Password2) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Please fill in both password fields\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#password2').focus();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if ($scope.regData.Password2 !== $scope.regData.Password) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Passwords don't match\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#password2').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if ($scope.regData.Password2.length < 6) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Password must contain at least 6 characters\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#password').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if (!$scope.regData.FirstName) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Please enter your first name\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#firstname').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if (!$scope.regData.LastName) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Please enter your last name\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#lastname').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else if (!$scope.regData.Specialty) {\r\n swal({\r\n title: \"Error\",\r\n text: \"Please select your specialty\",\r\n type: 'error'\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#specialty').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n } else {\r\n\r\n\r\n $http.post('/Execute/UAP_CheckIfUserNamesExist', [$scope.regData.Email]).success(function(ckunData){\r\n if(ckunData.RS_0[0].Message != 'All Good') {\r\n swal({\r\n html: true,\r\n title: \"User Already Exists\",\r\n text: \"The email address \" + $scope.regData.Email + \" is associated with an existing account. Double check your entry, or contact support for assistance.\",\r\n type: \"error\"\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#email').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n }else{\r\n var CreateUserObj = {\r\n \"UserName\": $scope.regData.Email.toLowerCase(),\r\n \"Password\":$scope.regData.Password2,\r\n \"Email\":$scope.regData.Email,\r\n \"FirstName\":$scope.regData.FirstName,\r\n \"LastName\":$scope.regData.LastName,\r\n \"Channel\":$scope.regData.Channel.toString(),\r\n \"Campaign\":$scope.regData.Campaign.toString(),\r\n \"Degree\":'',\r\n \"Specialty\":$scope.regData.Specialty.toString(),\r\n \"ClinicianType\":'',\r\n \"Route\":$scope.regData.Route\r\n }\r\n $scope.regData.Email = $scope.regData.Email.toLowerCase();\r\n console.log(CreateUserObj)\r\n\r\n\r\n $http.post('/CreateAccount', CreateUserObj).success(function (data) {\r\n if(data.Result == \"Create Account Failed\") {\r\n swal('Registration Failed',data.Message,'error')\r\n $scope.SaveWaiting = false;\r\n }else{\r\n //debugger\r\n //$cookies.putObject('RegTitle',$scope.regData.Title);\r\n $scope.regData.Email = $scope.regData.Email.toLowerCase()\r\n if(data.FullTrial) {\r\n $scope.regData.FullTrial = data.FullTrial;\r\n }\r\n $cookies.putObject('regData',$scope.regData,{'domain':'challengercme.com'});\r\n $scope.SaveWaiting = false;\r\n\r\n //$window.location.href='/registration/3';\r\n if($scope.regData.FullTrial){\r\n $window.location.href='/help/get-started?ft='+$scope.regData.FullTrial;\r\n } else if ($scope.regData.Route == 'Cart Signup') {\r\n $window.location.href = '/cart?reg=1';\r\n } else if ($scope.regData.Route == 'Checkout Signup') {\r\n $window.location.href = '/checkout?reg=1';\r\n } else {\r\n $window.location.href='/help/get-started';\r\n }\r\n }\r\n\r\n }).error(function(data){\r\n //console.log(data);\r\n $scope.SaveWaiting = false;\r\n });\r\n //console.log($scope.regData)\r\n }\r\n });\r\n\r\n\r\n //$window.location.href='/registration/3'\r\n }\r\n //alert(\"Process Step 2 Placeholder\");\r\n\r\n\r\n\r\n };\r\n })\r\n .controller('RegistrationPageCtrl3', function ($rootScope, $scope, $http, $cookies, $timeout, fileReader, $filter, $uibModal, $state, $location, $window, toastr, toastrConfig, regSvc) {\r\n $scope.SaveWaiting = false;\r\n //console.log(Globals);\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n if($scope.UserSettings.completedStep3){\r\n $window.location.href='/';\r\n }\r\n //console.log($rootScope.UserSettings);\r\n\r\n $scope.UserSettings.showSettingsShortCuts = true;\r\n $scope.UserSettings.showSettingsGoal = true;\r\n $scope.UserSettings.showSettingsCount = true;\r\n $scope.UserSettings.showSettingsCMESummary = true;\r\n $scope.UserSettings.showSettingsAssignSummary = true;\r\n $scope.UserSettings.showSettingsAssetsSummary = true;\r\n $scope.UserSettings.showSettingsActivtySummary = true;\r\n $scope.UserSettings.showSettingsQuickQuiz = true;\r\n $scope.UserSettings.showSettingsUpdates = true;\r\n $scope.UserSettings.completedStep3 = true;\r\n $scope.regData = $cookies.getObject('regData');\r\n $scope.regData.AddressType = '';\r\n\r\n $scope.User.Profile.AcceptableContactMethodArr = [\"Email\",\"Phone\",\"Text\"];\r\n $scope.AdditionalDegrees = Globals.AdditionalDegrees;\r\n ////console.log(Globals.AdditionalDegrees);\r\n $scope.AdditionalSpecialties = Globals.AdditionalSpecialties;\r\n $scope.StateProvince = Globals.StateProvince;\r\n $scope.Countries = Globals.Countries;\r\n $scope.Salutations = Globals.Salutations;\r\n $scope.AcceptableContactMethods = Globals.AcceptableContactMethods;\r\n switch($scope.regData.Channel) {\r\n case 1:\r\n $scope.PersonalObjectives = Globals.DemoPersonalNeeds\r\n break;\r\n case 2:\r\n $scope.PersonalObjectives = Globals.DemoAcademicNeeds\r\n break;\r\n case 3:\r\n $scope.PersonalObjectives = Globals.DemoCorporateNeeds\r\n break;\r\n }\r\n $scope.loc = function(p) {\r\n $location.path(p);\r\n }\r\n $scope.TestingYears = Globals.SpecYears;\r\n /*$scope.ContactByEmail = true;\r\n $scope.ContactByPhone = true;\r\n $scope.ContactByText = true;\r\n $scope.ContactByMail = false;*/\r\n $scope.regData.ValidNick = true;\r\n $scope.SubmitStep3 = function() {\r\n $scope.SaveWaiting = true;\r\n //console.log($scope.UserSettings);\r\n\r\n $scope.User.Profile.AcceptableContactMethod = $scope.User.Profile.AcceptableContactMethodArr.join('|');\r\n //step3user.Profile.PreferredCallBackTime = $scope.regData.PreferredCallBackTime;\r\n $scope.User.Profile.HasRetailInterest = ($scope.regData.Channel == 1 ? \"True\":\"False\");\r\n $scope.User.Profile.HasAcademicInterest = ($scope.regData.Channel == 2 ? \"True\":\"False\");\r\n $scope.User.Profile.HasCorporateInterest = ($scope.regData.Channel == 3 ? \"True\":\"False\");\r\n switch($scope.regData.Channel) {\r\n case 1:\r\n $scope.User.Profile.RetailPersonalObjectives = $scope.regData.PersonalObjective\r\n break;\r\n case 2:\r\n $scope.User.Profile.AcademicPersonalObjectives = $scope.regData.PersonalObjective\r\n break;\r\n case 3:\r\n $scope.User.Profile.CorporatePersonalObjectives = $scope.regData.PersonalObjective\r\n break;\r\n }\r\n if($scope.User.Profile.Nickname){\r\n\r\n\r\n $http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [$scope.User.Profile.Nickname]).success(function (datablap) {\r\n ////console.log(data)\r\n if (datablap.RS_0[\"0\"].Message == \"All Good\") {\r\n $http.post('/Execute/SaveUserInfo',$scope.User).success(function(data){\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (dataff) {\r\n $scope.SaveWaiting = false;\r\n $cookies.remove('regData',{'domain':'challengercme.com'});\r\n if($scope.regData.FullTrial){\r\n $window.location.href='/help/get-started?ft='+$scope.regData.FullTrial;\r\n } else {\r\n $window.location.href='/help/get-started';\r\n }\r\n\r\n });\r\n\r\n });\r\n } else {\r\n $scope.SaveWaiting = false;\r\n swal({\r\n html: true,\r\n title: \"Gaming Alias Already Exists\",\r\n text: \"The gaming alias \" + $scope.User.Profile.Nickname + \" is associated with an existing account. Please choose a different one.\",\r\n type: \"error\"\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#gamingalias').select();\r\n })\r\n\r\n });\r\n }\r\n });\r\n\r\n }else{\r\n $http.post('/Execute/SaveUserInfo',$scope.User).success(function(data){\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (dataff) {\r\n $scope.SaveWaiting = false;\r\n $cookies.remove('regData',{'domain':'challengercme.com'});\r\n if($scope.regData.FullTrial){\r\n $window.location.href='/help/get-started?ft='+$scope.regData.FullTrial;\r\n } else {\r\n $window.location.href='/help/get-started';\r\n }\r\n\r\n });\r\n\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n };\r\n })\r\n .controller('QQSignupPageCtrl', function ($rootScope, $scope, $http, $cookies, fileReader, $filter, $timeout, $uibModal, $state, $location, $window, toastr, toastrConfig, regSvc) {\r\n if($rootScope.User.UserName) {\r\n $window.location.href='/';\r\n }\r\n $scope.Degrees = Globals.Degrees;\r\n $scope.ClinicianTypes = Globals.ClinicianTypes;\r\n $scope.Specialties = Globals.Specialties;\r\n $scope.SaveWaiting = false;\r\n $scope.regData = regSvc;\r\n $scope.regData.Channel = 1;\r\n $scope.regData.Campaign = \"qqsignup\";\r\n $scope.regData.Degree = \"\";\r\n $scope.regData.ClinicianType = \"\";\r\n $scope.SubmitReg = function() {\r\n $scope.SaveWaiting = true;\r\n $http.post('/Execute/UAP_CheckIfUserNamesExist', [$scope.regData.Email]).success(function(ckunData){\r\n if(ckunData.RS_0[0].Message != 'All Good') {\r\n swal({\r\n html: true,\r\n title: \"User Already Exists\",\r\n text: \"The email address \" + $scope.regData.Email + \" is associated with an existing account. Double check your entry, or contact support for assistance.\",\r\n type: \"error\",\r\n closeOnConfirm: true\r\n },\r\n function(){\r\n $timeout(function(){\r\n jQuery('#email').select();\r\n })\r\n\r\n });\r\n $scope.SaveWaiting = false;\r\n }else{\r\n var CreateUserObj = {\r\n \"UserName\":$scope.regData.Email.toLowerCase(),\r\n \"Password\":$scope.regData.Password2,\r\n \"Email\":$scope.regData.Email,\r\n \"FirstName\":$scope.regData.FirstName,\r\n \"LastName\":$scope.regData.LastName,\r\n \"Channel\":$scope.regData.Channel.toString(),\r\n \"Campaign\":$scope.regData.Campaign.toString(),\r\n \"Degree\":$scope.regData.Degree.toString(),\r\n \"Specialty\":$scope.regData.Specialty.toString(),\r\n \"ClinicianType\":$scope.regData.ClinicianType.toString(),\r\n \"Route\":\"Quick Quiz\"\r\n }\r\n\r\n //console.log(CreateUserObj)\r\n\r\n\r\n $http.post('/CreateAccount', CreateUserObj).success(function (data) {\r\n if(data.Result == \"Create Account Failed\") {\r\n swal('Registration Failed',data.Message,'error')\r\n $scope.SaveWaiting = false;\r\n }else{\r\n //debugger\r\n //$cookies.putObject('RegTitle',$scope.regData.Title);\r\n $cookies.putObject('regData',$scope.regData,{'domain':'challengercme.com'});\r\n $scope.SaveWaiting = false;\r\n $window.location.href='/qqprocess';\r\n }\r\n\r\n }).error(function(data){\r\n //console.log(data);\r\n $scope.SaveWaiting = false;\r\n });\r\n //console.log($scope.regData)\r\n }\r\n });\r\n }\r\n })\r\n .controller('QQProcess', function ($rootScope, $scope, $http, $cookies, fileReader, $filter, $uibModal, $state, $location, toastr, toastrConfig, regSvc) {\r\n $scope.SaveWaiting = true;\r\n $scope.NicknameTaken = false;\r\n $scope.loc = function(p) {\r\n $location.path(p);\r\n }\r\n $scope.qquser = $rootScope.User;\r\n $scope.User = $rootScope.User;\r\n $scope.regData = $cookies.getObject('regData');\r\n $scope.qquser.Profile.Nickname = $scope.regData.GamingAlias;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.UserSettings.showSettingsShortCuts = true;\r\n $scope.UserSettings.showSettingsGoal = true;\r\n $scope.UserSettings.showSettingsCount = true;\r\n $scope.UserSettings.showSettingsCMESummary = true;\r\n $scope.UserSettings.showSettingsAssignSummary = true;\r\n $scope.UserSettings.showSettingsAssetsSummary = true;\r\n $scope.UserSettings.showSettingsActivtySummary = true;\r\n $scope.UserSettings.showSettingsQuickQuiz = true;\r\n $scope.UserSettings.showSettingsUpdates = true;\r\n $scope.UserSettings.completedStep3 = true;\r\n\r\n $scope.TryNickname = function() {\r\n $scope.SaveWaiting = true;\r\n $http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [$scope.qquser.Profile.Nickname]).success(function (datablap) {\r\n ////console.log(data)\r\n if (datablap.RS_0[\"0\"].Message == \"All Good\") {\r\n $scope.NicknameTaken = false;\r\n $http.post('/SaveUserInfo',$scope.qquser).success(function(data){\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (dataff) {\r\n $scope.SaveWaiting = false;\r\n $state.current.title = \"Registration Complete\";\r\n $cookies.remove('regData',{'domain':'challengercme.com'});\r\n //$scope.loc('/quickquiz');\r\n });\r\n });\r\n } else {\r\n $scope.NicknameTaken = true;\r\n $scope.SaveWaiting = false;\r\n }\r\n });\r\n }\r\n\r\n $scope.TryNickname();\r\n\r\n /*$http.post(\"/Execute/UAP_CheckIfNickNamesExist\", [$scope.qquser.Profile.Nickname]).success(function (datablap) {\r\n ////console.log(data)\r\n if (datablap.RS_0[\"0\"].Message == \"All Good\") {\r\n $scope.NicknameTaken = false;\r\n $http.post('/SaveUserInfo',$scope.qquser).success(function(data){\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (dataff) {\r\n $scope.SaveWaiting = false;\r\n $state.current.title = \"Registration Complete\";\r\n //$scope.loc('/quickquiz');\r\n });\r\n });\r\n } else {\r\n $scope.NicknameTaken = true;\r\n $scope.SaveWaiting = false;\r\n }\r\n });*/\r\n\r\n\r\n })\r\n /** @ngInject */\r\n\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.tables')\r\n .controller('TablesPageCtrl', TablesPageCtrl);\r\n\r\n /** @ngInject */\r\n function TablesPageCtrl($scope, $filter, editableOptions, editableThemes) {\r\n\r\n $scope.smartTablePageSize = 10;\r\n\r\n $scope.smartTableData = [\r\n {\r\n id: 1,\r\n firstName: 'Mark',\r\n lastName: 'Otto',\r\n username: '@mdo',\r\n email: 'mdo@gmail.com',\r\n age: '28'\r\n },\r\n {\r\n id: 2,\r\n firstName: 'Jacob',\r\n lastName: 'Thornton',\r\n username: '@fat',\r\n email: 'fat@yandex.ru',\r\n age: '45'\r\n },\r\n {\r\n id: 3,\r\n firstName: 'Larry',\r\n lastName: 'Bird',\r\n username: '@twitter',\r\n email: 'twitter@outlook.com',\r\n age: '18'\r\n },\r\n {\r\n id: 4,\r\n firstName: 'John',\r\n lastName: 'Snow',\r\n username: '@snow',\r\n email: 'snow@gmail.com',\r\n age: '20'\r\n },\r\n {\r\n id: 5,\r\n firstName: 'Jack',\r\n lastName: 'Sparrow',\r\n username: '@jack',\r\n email: 'jack@yandex.ru',\r\n age: '30'\r\n },\r\n {\r\n id: 6,\r\n firstName: 'Ann',\r\n lastName: 'Smith',\r\n username: '@ann',\r\n email: 'ann@gmail.com',\r\n age: '21'\r\n },\r\n {\r\n id: 7,\r\n firstName: 'Barbara',\r\n lastName: 'Black',\r\n username: '@barbara',\r\n email: 'barbara@yandex.ru',\r\n age: '43'\r\n },\r\n {\r\n id: 8,\r\n firstName: 'Sevan',\r\n lastName: 'Bagrat',\r\n username: '@sevan',\r\n email: 'sevan@outlook.com',\r\n age: '13'\r\n },\r\n {\r\n id: 9,\r\n firstName: 'Ruben',\r\n lastName: 'Vardan',\r\n username: '@ruben',\r\n email: 'ruben@gmail.com',\r\n age: '22'\r\n },\r\n {\r\n id: 10,\r\n firstName: 'Karen',\r\n lastName: 'Sevan',\r\n username: '@karen',\r\n email: 'karen@yandex.ru',\r\n age: '33'\r\n },\r\n {\r\n id: 11,\r\n firstName: 'Mark',\r\n lastName: 'Otto',\r\n username: '@mark',\r\n email: 'mark@gmail.com',\r\n age: '38'\r\n },\r\n {\r\n id: 12,\r\n firstName: 'Jacob',\r\n lastName: 'Thornton',\r\n username: '@jacob',\r\n email: 'jacob@yandex.ru',\r\n age: '48'\r\n },\r\n {\r\n id: 13,\r\n firstName: 'Haik',\r\n lastName: 'Hakob',\r\n username: '@haik',\r\n email: 'haik@outlook.com',\r\n age: '48'\r\n },\r\n {\r\n id: 14,\r\n firstName: 'Garegin',\r\n lastName: 'Jirair',\r\n username: '@garegin',\r\n email: 'garegin@gmail.com',\r\n age: '40'\r\n },\r\n {\r\n id: 15,\r\n firstName: 'Krikor',\r\n lastName: 'Bedros',\r\n username: '@krikor',\r\n email: 'krikor@yandex.ru',\r\n age: '32'\r\n },\r\n {\r\n \"id\": 16,\r\n \"firstName\": \"Francisca\",\r\n \"lastName\": \"Brady\",\r\n \"username\": \"@Gibson\",\r\n \"email\": \"franciscagibson@comtours.com\",\r\n \"age\": 11\r\n },\r\n {\r\n \"id\": 17,\r\n \"firstName\": \"Tillman\",\r\n \"lastName\": \"Figueroa\",\r\n \"username\": \"@Snow\",\r\n \"email\": \"tillmansnow@comtours.com\",\r\n \"age\": 34\r\n },\r\n {\r\n \"id\": 18,\r\n \"firstName\": \"Jimenez\",\r\n \"lastName\": \"Morris\",\r\n \"username\": \"@Bryant\",\r\n \"email\": \"jimenezbryant@comtours.com\",\r\n \"age\": 45\r\n },\r\n {\r\n \"id\": 19,\r\n \"firstName\": \"Sandoval\",\r\n \"lastName\": \"Jacobson\",\r\n \"username\": \"@Mcbride\",\r\n \"email\": \"sandovalmcbride@comtours.com\",\r\n \"age\": 32\r\n },\r\n {\r\n \"id\": 20,\r\n \"firstName\": \"Griffin\",\r\n \"lastName\": \"Torres\",\r\n \"username\": \"@Charles\",\r\n \"email\": \"griffincharles@comtours.com\",\r\n \"age\": 19\r\n },\r\n {\r\n \"id\": 21,\r\n \"firstName\": \"Cora\",\r\n \"lastName\": \"Parker\",\r\n \"username\": \"@Caldwell\",\r\n \"email\": \"coracaldwell@comtours.com\",\r\n \"age\": 27\r\n },\r\n {\r\n \"id\": 22,\r\n \"firstName\": \"Cindy\",\r\n \"lastName\": \"Bond\",\r\n \"username\": \"@Velez\",\r\n \"email\": \"cindyvelez@comtours.com\",\r\n \"age\": 24\r\n },\r\n {\r\n \"id\": 23,\r\n \"firstName\": \"Frieda\",\r\n \"lastName\": \"Tyson\",\r\n \"username\": \"@Craig\",\r\n \"email\": \"friedacraig@comtours.com\",\r\n \"age\": 45\r\n },\r\n {\r\n \"id\": 24,\r\n \"firstName\": \"Cote\",\r\n \"lastName\": \"Holcomb\",\r\n \"username\": \"@Rowe\",\r\n \"email\": \"coterowe@comtours.com\",\r\n \"age\": 20\r\n },\r\n {\r\n \"id\": 25,\r\n \"firstName\": \"Trujillo\",\r\n \"lastName\": \"Mejia\",\r\n \"username\": \"@Valenzuela\",\r\n \"email\": \"trujillovalenzuela@comtours.com\",\r\n \"age\": 16\r\n },\r\n {\r\n \"id\": 26,\r\n \"firstName\": \"Pruitt\",\r\n \"lastName\": \"Shepard\",\r\n \"username\": \"@Sloan\",\r\n \"email\": \"pruittsloan@comtours.com\",\r\n \"age\": 44\r\n },\r\n {\r\n \"id\": 27,\r\n \"firstName\": \"Sutton\",\r\n \"lastName\": \"Ortega\",\r\n \"username\": \"@Black\",\r\n \"email\": \"suttonblack@comtours.com\",\r\n \"age\": 42\r\n },\r\n {\r\n \"id\": 28,\r\n \"firstName\": \"Marion\",\r\n \"lastName\": \"Heath\",\r\n \"username\": \"@Espinoza\",\r\n \"email\": \"marionespinoza@comtours.com\",\r\n \"age\": 47\r\n },\r\n {\r\n \"id\": 29,\r\n \"firstName\": \"Newman\",\r\n \"lastName\": \"Hicks\",\r\n \"username\": \"@Keith\",\r\n \"email\": \"newmankeith@comtours.com\",\r\n \"age\": 15\r\n },\r\n {\r\n \"id\": 30,\r\n \"firstName\": \"Boyle\",\r\n \"lastName\": \"Larson\",\r\n \"username\": \"@Summers\",\r\n \"email\": \"boylesummers@comtours.com\",\r\n \"age\": 32\r\n },\r\n {\r\n \"id\": 31,\r\n \"firstName\": \"Haynes\",\r\n \"lastName\": \"Vinson\",\r\n \"username\": \"@Mckenzie\",\r\n \"email\": \"haynesmckenzie@comtours.com\",\r\n \"age\": 15\r\n },\r\n {\r\n \"id\": 32,\r\n \"firstName\": \"Miller\",\r\n \"lastName\": \"Acosta\",\r\n \"username\": \"@Young\",\r\n \"email\": \"milleryoung@comtours.com\",\r\n \"age\": 55\r\n },\r\n {\r\n \"id\": 33,\r\n \"firstName\": \"Johnston\",\r\n \"lastName\": \"Brown\",\r\n \"username\": \"@Knight\",\r\n \"email\": \"johnstonknight@comtours.com\",\r\n \"age\": 29\r\n },\r\n {\r\n \"id\": 34,\r\n \"firstName\": \"Lena\",\r\n \"lastName\": \"Pitts\",\r\n \"username\": \"@Forbes\",\r\n \"email\": \"lenaforbes@comtours.com\",\r\n \"age\": 25\r\n },\r\n {\r\n \"id\": 35,\r\n \"firstName\": \"Terrie\",\r\n \"lastName\": \"Kennedy\",\r\n \"username\": \"@Branch\",\r\n \"email\": \"terriebranch@comtours.com\",\r\n \"age\": 37\r\n },\r\n {\r\n \"id\": 36,\r\n \"firstName\": \"Louise\",\r\n \"lastName\": \"Aguirre\",\r\n \"username\": \"@Kirby\",\r\n \"email\": \"louisekirby@comtours.com\",\r\n \"age\": 44\r\n },\r\n {\r\n \"id\": 37,\r\n \"firstName\": \"David\",\r\n \"lastName\": \"Patton\",\r\n \"username\": \"@Sanders\",\r\n \"email\": \"davidsanders@comtours.com\",\r\n \"age\": 26\r\n },\r\n {\r\n \"id\": 38,\r\n \"firstName\": \"Holden\",\r\n \"lastName\": \"Barlow\",\r\n \"username\": \"@Mckinney\",\r\n \"email\": \"holdenmckinney@comtours.com\",\r\n \"age\": 11\r\n },\r\n {\r\n \"id\": 39,\r\n \"firstName\": \"Baker\",\r\n \"lastName\": \"Rivera\",\r\n \"username\": \"@Montoya\",\r\n \"email\": \"bakermontoya@comtours.com\",\r\n \"age\": 47\r\n },\r\n {\r\n \"id\": 40,\r\n \"firstName\": \"Belinda\",\r\n \"lastName\": \"Lloyd\",\r\n \"username\": \"@Calderon\",\r\n \"email\": \"belindacalderon@comtours.com\",\r\n \"age\": 21\r\n },\r\n {\r\n \"id\": 41,\r\n \"firstName\": \"Pearson\",\r\n \"lastName\": \"Patrick\",\r\n \"username\": \"@Clements\",\r\n \"email\": \"pearsonclements@comtours.com\",\r\n \"age\": 42\r\n },\r\n {\r\n \"id\": 42,\r\n \"firstName\": \"Alyce\",\r\n \"lastName\": \"Mckee\",\r\n \"username\": \"@Daugherty\",\r\n \"email\": \"alycedaugherty@comtours.com\",\r\n \"age\": 55\r\n },\r\n {\r\n \"id\": 43,\r\n \"firstName\": \"Valencia\",\r\n \"lastName\": \"Spence\",\r\n \"username\": \"@Olsen\",\r\n \"email\": \"valenciaolsen@comtours.com\",\r\n \"age\": 20\r\n },\r\n {\r\n \"id\": 44,\r\n \"firstName\": \"Leach\",\r\n \"lastName\": \"Holcomb\",\r\n \"username\": \"@Humphrey\",\r\n \"email\": \"leachhumphrey@comtours.com\",\r\n \"age\": 28\r\n },\r\n {\r\n \"id\": 45,\r\n \"firstName\": \"Moss\",\r\n \"lastName\": \"Baxter\",\r\n \"username\": \"@Fitzpatrick\",\r\n \"email\": \"mossfitzpatrick@comtours.com\",\r\n \"age\": 51\r\n },\r\n {\r\n \"id\": 46,\r\n \"firstName\": \"Jeanne\",\r\n \"lastName\": \"Cooke\",\r\n \"username\": \"@Ward\",\r\n \"email\": \"jeanneward@comtours.com\",\r\n \"age\": 59\r\n },\r\n {\r\n \"id\": 47,\r\n \"firstName\": \"Wilma\",\r\n \"lastName\": \"Briggs\",\r\n \"username\": \"@Kidd\",\r\n \"email\": \"wilmakidd@comtours.com\",\r\n \"age\": 53\r\n },\r\n {\r\n \"id\": 48,\r\n \"firstName\": \"Beatrice\",\r\n \"lastName\": \"Perry\",\r\n \"username\": \"@Gilbert\",\r\n \"email\": \"beatricegilbert@comtours.com\",\r\n \"age\": 39\r\n },\r\n {\r\n \"id\": 49,\r\n \"firstName\": \"Whitaker\",\r\n \"lastName\": \"Hyde\",\r\n \"username\": \"@Mcdonald\",\r\n \"email\": \"whitakermcdonald@comtours.com\",\r\n \"age\": 35\r\n },\r\n {\r\n \"id\": 50,\r\n \"firstName\": \"Rebekah\",\r\n \"lastName\": \"Duran\",\r\n \"username\": \"@Gross\",\r\n \"email\": \"rebekahgross@comtours.com\",\r\n \"age\": 40\r\n },\r\n {\r\n \"id\": 51,\r\n \"firstName\": \"Earline\",\r\n \"lastName\": \"Mayer\",\r\n \"username\": \"@Woodward\",\r\n \"email\": \"earlinewoodward@comtours.com\",\r\n \"age\": 52\r\n },\r\n {\r\n \"id\": 52,\r\n \"firstName\": \"Moran\",\r\n \"lastName\": \"Baxter\",\r\n \"username\": \"@Johns\",\r\n \"email\": \"moranjohns@comtours.com\",\r\n \"age\": 20\r\n },\r\n {\r\n \"id\": 53,\r\n \"firstName\": \"Nanette\",\r\n \"lastName\": \"Hubbard\",\r\n \"username\": \"@Cooke\",\r\n \"email\": \"nanettecooke@comtours.com\",\r\n \"age\": 55\r\n },\r\n {\r\n \"id\": 54,\r\n \"firstName\": \"Dalton\",\r\n \"lastName\": \"Walker\",\r\n \"username\": \"@Hendricks\",\r\n \"email\": \"daltonhendricks@comtours.com\",\r\n \"age\": 25\r\n },\r\n {\r\n \"id\": 55,\r\n \"firstName\": \"Bennett\",\r\n \"lastName\": \"Blake\",\r\n \"username\": \"@Pena\",\r\n \"email\": \"bennettpena@comtours.com\",\r\n \"age\": 13\r\n },\r\n {\r\n \"id\": 56,\r\n \"firstName\": \"Kellie\",\r\n \"lastName\": \"Horton\",\r\n \"username\": \"@Weiss\",\r\n \"email\": \"kellieweiss@comtours.com\",\r\n \"age\": 48\r\n },\r\n {\r\n \"id\": 57,\r\n \"firstName\": \"Hobbs\",\r\n \"lastName\": \"Talley\",\r\n \"username\": \"@Sanford\",\r\n \"email\": \"hobbssanford@comtours.com\",\r\n \"age\": 28\r\n },\r\n {\r\n \"id\": 58,\r\n \"firstName\": \"Mcguire\",\r\n \"lastName\": \"Donaldson\",\r\n \"username\": \"@Roman\",\r\n \"email\": \"mcguireroman@comtours.com\",\r\n \"age\": 38\r\n },\r\n {\r\n \"id\": 59,\r\n \"firstName\": \"Rodriquez\",\r\n \"lastName\": \"Saunders\",\r\n \"username\": \"@Harper\",\r\n \"email\": \"rodriquezharper@comtours.com\",\r\n \"age\": 20\r\n },\r\n {\r\n \"id\": 60,\r\n \"firstName\": \"Lou\",\r\n \"lastName\": \"Conner\",\r\n \"username\": \"@Sanchez\",\r\n \"email\": \"lousanchez@comtours.com\",\r\n \"age\": 16\r\n }\r\n ];\r\n\r\n $scope.editableTableData = $scope.smartTableData.slice(0, 36);\r\n\r\n $scope.peopleTableData = [\r\n {\r\n id: 1,\r\n firstName: 'Mark',\r\n lastName: 'Otto',\r\n username: '@mdo',\r\n email: 'mdo@gmail.com',\r\n age: '28',\r\n status: 'info'\r\n },\r\n {\r\n id: 2,\r\n firstName: 'Jacob',\r\n lastName: 'Thornton',\r\n username: '@fat',\r\n email: 'fat@yandex.ru',\r\n age: '45',\r\n status: 'primary'\r\n },\r\n {\r\n id: 3,\r\n firstName: 'Larry',\r\n lastName: 'Bird',\r\n username: '@twitter',\r\n email: 'twitter@outlook.com',\r\n age: '18',\r\n status: 'success'\r\n },\r\n {\r\n id: 4,\r\n firstName: 'John',\r\n lastName: 'Snow',\r\n username: '@snow',\r\n email: 'snow@gmail.com',\r\n age: '20',\r\n status: 'danger'\r\n },\r\n {\r\n id: 5,\r\n firstName: 'Jack',\r\n lastName: 'Sparrow',\r\n username: '@jack',\r\n email: 'jack@yandex.ru',\r\n age: '30',\r\n status: 'warning'\r\n }\r\n ];\r\n\r\n $scope.metricsTableData = [\r\n {\r\n image: 'app/browsers/chrome.svg',\r\n browser: 'Google Chrome',\r\n visits: '10,392',\r\n isVisitsUp: true,\r\n purchases: '4,214',\r\n isPurchasesUp: true,\r\n percent: '45%',\r\n isPercentUp: true\r\n },\r\n {\r\n image: 'app/browsers/firefox.svg',\r\n browser: 'Mozilla Firefox',\r\n visits: '7,873',\r\n isVisitsUp: true,\r\n purchases: '3,031',\r\n isPurchasesUp: false,\r\n percent: '28%',\r\n isPercentUp: true\r\n },\r\n {\r\n image: 'app/browsers/ie.svg',\r\n browser: 'Internet Explorer',\r\n visits: '5,890',\r\n isVisitsUp: false,\r\n purchases: '2,102',\r\n isPurchasesUp: false,\r\n percent: '17%',\r\n isPercentUp: false\r\n },\r\n {\r\n image: 'app/browsers/safari.svg',\r\n browser: 'Safari',\r\n visits: '4,001',\r\n isVisitsUp: false,\r\n purchases: '1,001',\r\n isPurchasesUp: false,\r\n percent: '14%',\r\n isPercentUp: true\r\n },\r\n {\r\n image: 'app/browsers/opera.svg',\r\n browser: 'Opera',\r\n visits: '1,833',\r\n isVisitsUp: true,\r\n purchases: '83',\r\n isPurchasesUp: true,\r\n percent: '5%',\r\n isPercentUp: false\r\n }\r\n ];\r\n\r\n $scope.users = [\r\n {\r\n \"id\": 1,\r\n \"name\": \"Esther Vang\",\r\n \"status\": 4,\r\n \"group\": 3\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Leah Freeman\",\r\n \"status\": 3,\r\n \"group\": 1\r\n },\r\n {\r\n \"id\": 3,\r\n \"name\": \"Mathews Simpson\",\r\n \"status\": 3,\r\n \"group\": 2\r\n },\r\n {\r\n \"id\": 4,\r\n \"name\": \"Buckley Hopkins\",\r\n \"group\": 4\r\n },\r\n {\r\n \"id\": 5,\r\n \"name\": \"Buckley Schwartz\",\r\n \"status\": 1,\r\n \"group\": 1\r\n },\r\n {\r\n \"id\": 6,\r\n \"name\": \"Mathews Hopkins\",\r\n \"status\": 4,\r\n \"group\": 2\r\n },\r\n {\r\n \"id\": 7,\r\n \"name\": \"Leah Vang\",\r\n \"status\": 4,\r\n \"group\": 1\r\n },\r\n {\r\n \"id\": 8,\r\n \"name\": \"Vang Schwartz\",\r\n \"status\": 4,\r\n \"group\": 2\r\n },\r\n {\r\n \"id\": 9,\r\n \"name\": \"Hopkin Esther\",\r\n \"status\": 1,\r\n \"group\": 2\r\n },\r\n {\r\n \"id\": 10,\r\n \"name\": \"Mathews Schwartz\",\r\n \"status\": 1,\r\n \"group\": 3\r\n }\r\n ];\r\n\r\n $scope.statuses = [\r\n {value: 1, text: 'Good'},\r\n {value: 2, text: 'Awesome'},\r\n {value: 3, text: 'Excellent'},\r\n ];\r\n\r\n $scope.groups = [\r\n {id: 1, text: 'user'},\r\n {id: 2, text: 'customer'},\r\n {id: 3, text: 'vip'},\r\n {id: 4, text: 'admin'}\r\n ];\r\n\r\n $scope.showGroup = function(user) {\r\n if(user.group && $scope.groups.length) {\r\n var selected = $filter('filter')($scope.groups, {id: user.group});\r\n return selected.length ? selected[0].text : 'Not set';\r\n } else return 'Not set'\r\n };\r\n\r\n $scope.showStatus = function(user) {\r\n var selected = [];\r\n if(user.status) {\r\n selected = $filter('filter')($scope.statuses, {value: user.status});\r\n }\r\n return selected.length ? selected[0].text : 'Not set';\r\n };\r\n\r\n\r\n $scope.removeUser = function(index) {\r\n $scope.users.splice(index, 1);\r\n };\r\n\r\n $scope.addUser = function() {\r\n $scope.inserted = {\r\n id: $scope.users.length+1,\r\n name: '',\r\n status: null,\r\n group: null\r\n };\r\n $scope.users.push($scope.inserted);\r\n };\r\n\r\n editableOptions.theme = 'bs3';\r\n editableThemes['bs3'].submitTpl = '';\r\n editableThemes['bs3'].cancelTpl = '';\r\n\r\n\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 15.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .config(toastrLibConfig);\r\n\r\n /** @ngInject */\r\n function toastrLibConfig(toastrConfig) {\r\n angular.extend(toastrConfig, {\r\n closeButton: true,\r\n closeHtml: '',\r\n timeOut: 5000,\r\n autoDismiss: false,\r\n containerId: 'toast-container',\r\n maxOpened: 0,\r\n newestOnTop: true,\r\n positionClass: 'toast-top-right',\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n target: 'body'\r\n });\r\n }\r\n})();\n/**\r\n * Change top \"Daily Downloads\", \"Active Users\" values with animation effect\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('animatedChange', animatedChange);\r\n\r\n /** @ngInject */\r\n function animatedChange($timeout) {\r\n return {\r\n link: function (scope, element) {\r\n $timeout(function () {\r\n var newValue = element.attr('new-value');\r\n var oldvalue = parseInt(element.html());\r\n\r\n function changeValue(val) {\r\n $timeout(function () {\r\n element.html(val);\r\n }, 30);\r\n }\r\n\r\n if (newValue > oldvalue) {\r\n for (var i = oldvalue; i <= newValue; i++) {\r\n changeValue(i);\r\n }\r\n } else {\r\n for (var j = oldvalue; j >= newValue; j--) {\r\n changeValue(j);\r\n }\r\n }\r\n $timeout(function () {\r\n element.next().find('i').addClass('show-arr');\r\n }, 500);\r\n }, 3500);\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * Auto expand textarea field\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('autoExpand', autoExpand);\r\n\r\n /** @ngInject */\r\n function autoExpand() {\r\n return {\r\n restrict: 'A',\r\n link: function ($scope, elem) {\r\n elem.bind('keydown', function ($event) {\r\n var element = $event.target;\r\n $(element).height(0);\r\n var height = $(element)[0].scrollHeight;\r\n height = (height < 16) ? 16 : height;\r\n $(element).height(height);\r\n });\r\n\r\n // Expand the textarea as soon as it is added to the DOM\r\n setTimeout(function () {\r\n var element = elem;\r\n $(element).height(0);\r\n var height = $(element)[0].scrollHeight;\r\n height = (height < 16) ? 16 : height;\r\n $(element).height(height);\r\n }, 0)\r\n }\r\n };\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('autoFocus', autoFocus);\r\n\r\n /** @ngInject */\r\n function autoFocus($timeout, $parse) {\r\n return {\r\n link: function (scope, element, attrs) {\r\n var model = $parse(attrs.autoFocus);\r\n scope.$watch(model, function (value) {\r\n if (value === true) {\r\n $timeout(function () {\r\n element[0].focus();\r\n element[0].select();\r\n });\r\n }\r\n });\r\n element.bind('blur', function () {\r\n scope.$apply(model.assign(scope, false));\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('includeWithScope', includeWithScope);\r\n\r\n /** @ngInject */\r\n function includeWithScope() {\r\n return {\r\n restrict: 'AE',\r\n templateUrl: function(ele, attrs) {\r\n return attrs.includeWithScope;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 22.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('ionSlider', ionSlider);\r\n\r\n /** @ngInject */\r\n function ionSlider($timeout) {\r\n return {\r\n restrict: 'EA',\r\n template: '
',\r\n replace: true,\r\n scope: {\r\n min: '=',\r\n max: '=',\r\n type: '@',\r\n prefix: '@',\r\n maxPostfix: '@',\r\n prettify: '=',\r\n prettifySeparator: '@',\r\n grid: '=',\r\n gridMargin: '@',\r\n postfix: '@',\r\n step: '@',\r\n hideMinMax: '@',\r\n hideFromTo: '@',\r\n from: '=',\r\n to: '=',\r\n disable: '=',\r\n onChange: '=',\r\n onFinish: '=',\r\n values: '=',\r\n timeout: '@'\r\n },\r\n link: function ($scope, $element) {\r\n $element.ionRangeSlider({\r\n min: $scope.min,\r\n max: $scope.max,\r\n type: $scope.type,\r\n prefix: $scope.prefix,\r\n maxPostfix: $scope.maxPostfix,\r\n prettify_enabled: $scope.prettify,\r\n prettify_separator: $scope.prettifySeparator,\r\n grid: $scope.grid,\r\n gridMargin: $scope.gridMargin,\r\n postfix: $scope.postfix,\r\n step: $scope.step,\r\n hideMinMax: $scope.hideMinMax,\r\n hideFromTo: $scope.hideFromTo,\r\n from: $scope.from,\r\n to: $scope.to,\r\n disable: $scope.disable,\r\n onChange: $scope.onChange,\r\n onFinish: $scope.onFinish,\r\n values: $scope.values\r\n });\r\n\r\n $scope.$watch('min', function (value) {\r\n $timeout(function () {\r\n $element.data(\"ionRangeSlider\").update({min: value});\r\n });\r\n }, true);\r\n $scope.$watch('max', function (value) {\r\n $timeout(function () {\r\n $element.data(\"ionRangeSlider\").update({max: value});\r\n });\r\n });\r\n $scope.$watch('from', function (value) {\r\n $timeout(function () {\r\n $element.data(\"ionRangeSlider\").update({from: value});\r\n });\r\n });\r\n $scope.$watch('to', function (value) {\r\n $timeout(function () {\r\n $element.data(\"ionRangeSlider\").update({to: value});\r\n });\r\n });\r\n $scope.$watch('disable', function (value) {\r\n $timeout(function () {\r\n $element.data(\"ionRangeSlider\").update({disable: value});\r\n });\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('ngFileSelect', ngFileSelect);\r\n\r\n /** @ngInject */\r\n function ngFileSelect() {\r\n return {\r\n link: function ($scope, el) {\r\n el.bind('change', function (e) {\r\n $scope.file = (e.srcElement || e.target).files[0];\r\n $scope.getFile();\r\n })\r\n }\r\n }\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('scrollPosition', scrollPosition);\r\n\r\n /** @ngInject */\r\n function scrollPosition() {\r\n return {\r\n scope: {\r\n scrollPosition: '=',\r\n maxHeight: '='\r\n },\r\n link: function (scope) {\r\n $(window).on('scroll', function() {\r\n var scrollTop = $(window).scrollTop() > scope.maxHeight;\r\n if (scrollTop !== scope.prevScrollTop) {\r\n scope.$apply(function() {\r\n scope.scrollPosition = scrollTop;\r\n });\r\n }\r\n scope.prevScrollTop = scrollTop;\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('trackWidth', trackWidth);\r\n\r\n /** @ngInject */\r\n function trackWidth() {\r\n return {\r\n scope: {\r\n trackWidth: '=',\r\n minWidth: '=',\r\n },\r\n link: function (scope, element) {\r\n scope.trackWidth = $(element).width() < scope.minWidth;\r\n scope.prevTrackWidth = scope.trackWidth;\r\n\r\n $(window).resize(function() {\r\n var trackWidth = $(element).width() < scope.minWidth;\r\n if (trackWidth !== scope.prevTrackWidth) {\r\n scope.$apply(function() {\r\n scope.trackWidth = trackWidth;\r\n });\r\n }\r\n scope.prevTrackWidth = trackWidth;\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * Animated load block\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('zoomIn', zoomIn);\r\n\r\n /** @ngInject */\r\n function zoomIn($timeout, $rootScope) {\r\n return {\r\n restrict: 'A',\r\n link: function ($scope, elem) {\r\n var delay = 1000;\r\n\r\n if ($rootScope.$pageFinishedLoading) {\r\n delay = 100;\r\n }\r\n\r\n $timeout(function () {\r\n elem.removeClass('full-invisible');\r\n elem.addClass('animated zoomIn');\r\n }, delay);\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 03.05.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('baUtil', baUtil);\r\n\r\n /** @ngInject */\r\n function baUtil() {\r\n\r\n this.isDescendant = function(parent, child) {\r\n var node = child.parentNode;\r\n while (node != null) {\r\n if (node == parent) {\r\n return true;\r\n }\r\n node = node.parentNode;\r\n }\r\n return false;\r\n };\r\n\r\n this.hexToRGB = function(hex, alpha) {\r\n var r = parseInt( hex.slice(1,3), 16 );\r\n var g = parseInt( hex.slice(3,5), 16 );\r\n var b = parseInt( hex.slice(5,7), 16 );\r\n return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('fileReader', fileReader);\r\n\r\n /** @ngInject */\r\n function fileReader($q) {\r\n var onLoad = function(reader, deferred, scope) {\r\n return function () {\r\n scope.$apply(function () {\r\n deferred.resolve(reader.result);\r\n });\r\n };\r\n };\r\n\r\n var onError = function (reader, deferred, scope) {\r\n return function () {\r\n scope.$apply(function () {\r\n deferred.reject(reader.result);\r\n });\r\n };\r\n };\r\n\r\n var onProgress = function(reader, scope) {\r\n return function (event) {\r\n scope.$broadcast('fileProgress',\r\n {\r\n total: event.total,\r\n loaded: event.loaded\r\n });\r\n };\r\n };\r\n\r\n var getReader = function(deferred, scope) {\r\n var reader = new FileReader();\r\n reader.onload = onLoad(reader, deferred, scope);\r\n reader.onerror = onError(reader, deferred, scope);\r\n reader.onprogress = onProgress(reader, scope);\r\n return reader;\r\n };\r\n\r\n var readAsDataURL = function (file, scope) {\r\n var deferred = $q.defer();\r\n\r\n var reader = getReader(deferred, scope);\r\n reader.readAsDataURL(file);\r\n\r\n return deferred.promise;\r\n };\r\n\r\n return {\r\n readAsDataUrl: readAsDataURL\r\n };\r\n }\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 3/1/16\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('preloader', preloader);\r\n\r\n /** @ngInject */\r\n function preloader($q) {\r\n return {\r\n loadImg: function (src) {\r\n var d = $q.defer();\r\n var img = new Image();\r\n img.src = src;\r\n img.onload = function(){\r\n d.resolve();\r\n };\r\n return d.promise;\r\n },\r\n loadAmCharts : function(){\r\n var d = $q.defer();\r\n AmCharts.ready(function(){\r\n d.resolve();\r\n });\r\n return d.promise;\r\n }\r\n }\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/21/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('stopableInterval', stopableInterval);\r\n\r\n /** @ngInject */\r\n function stopableInterval($window) {\r\n return {\r\n start: function (interval, calback, time) {\r\n function startInterval() {\r\n return interval(calback, time);\r\n }\r\n\r\n var i = startInterval();\r\n\r\n angular.element($window).bind('focus', function () {\r\n if (i) interval.cancel(i);\r\n i = startInterval();\r\n });\r\n\r\n angular.element($window).bind('blur', function () {\r\n if (i) interval.cancel(i);\r\n });\r\n }\r\n }\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.assign')\r\n .controller('AssignChartCtrl', AssignChartCtrl);\r\n\r\n /** @ngInject */\r\n function AssignChartCtrl($scope, baConfig, $element, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var barChart = AmCharts.makeChart(id, {\r\n \"type\": \"serial\",\r\n \"categoryField\": \"Learner\",\r\n \"columnSpacing\": 1,\r\n \"columnWidth\": 0.43,\r\n \"rotate\": true,\r\n \"startDuration\": 0.25,\r\n \"startEffect\": \"easeInSine\",\r\n \"theme\": \"blur\",\r\n \"categoryAxis\": {\r\n \"gridPosition\": \"start\",\r\n \"titleColor\": \"#FFFFFF\"\r\n },\r\n \"chartCursor\": {\r\n \"enabled\": true\r\n },\r\n \"trendLines\": [],\r\n \"graphs\": [\r\n {\r\n \"fillAlphas\": 1,\r\n \"fillColors\": \"#4c8fcc\",\r\n \"id\": \"AmGraph-1\",\r\n \"title\": \"graph 1\",\r\n \"type\": \"column\",\r\n \"valueField\": \"Score\"\r\n }\r\n ],\r\n \"guides\": [\r\n {\r\n \"above\": true,\r\n \"boldLabel\": true,\r\n \"color\": \"#0F0\",\r\n \"dashLength\": 2,\r\n \"id\": \"Guide-1\",\r\n \"inside\": false,\r\n \"label\": \"MEAN\",\r\n \"labelRotation\": 90,\r\n \"lineAlpha\": 1,\r\n \"lineColor\": \"#0f0\",\r\n \"lineThickness\": 1,\r\n \"position\": \"top\",\r\n \"value\": 87.1\r\n },\r\n {\r\n \"above\": true,\r\n \"boldLabel\": true,\r\n \"color\": \"#f00\",\r\n \"dashLength\": 2,\r\n \"id\": \"Guide-1\",\r\n \"inside\": false,\r\n \"label\": \"MEDIAN\",\r\n \"labelRotation\": 90,\r\n \"lineAlpha\": 1,\r\n \"lineColor\": \"#f00\",\r\n \"lineThickness\": 1,\r\n \"position\": \"bottom\",\r\n \"value\": 89\r\n }\r\n ],\r\n \"valueAxes\": [\r\n {\r\n \"id\": \"ValueAxis-1\",\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"title\": \"Best Score\"\r\n }\r\n ],\r\n \"allLabels\": [],\r\n \"balloon\": {},\r\n \"titles\": [\r\n {\r\n \"id\": \"Title-1\",\r\n \"size\": 15,\r\n \"text\": \"Rolling Assessment Score Avg\"\r\n }\r\n ],\r\n \"dataProvider\": [\r\n {\r\n \"Score\": \"100\",\r\n \"Learner\": \"A Alaska\"\r\n },\r\n {\r\n \"Score\": \"98\",\r\n \"Learner\": \"D Detroit\"\r\n },\r\n {\r\n \"Score\": \"92\",\r\n \"Learner\": \"B Beta\"\r\n },\r\n {\r\n \"Score\": \"89\",\r\n \"Learner\": \"Y Yosemite\"\r\n },\r\n {\r\n \"Score\": \"89\",\r\n \"Learner\": \"W Washington\"\r\n },\r\n {\r\n \"Score\": \"89\",\r\n \"Learner\": \"R Reno\"\r\n },\r\n {\r\n \"Score\": \"89\",\r\n \"Learner\": \"S Sacramento\"\r\n },\r\n {\r\n \"Score\": \"89\",\r\n \"Learner\": \"V Vale\"\r\n },\r\n {\r\n \"Score\": \"85\",\r\n \"Learner\": \"F Franscisco\"\r\n },\r\n {\r\n \"Score\": \"82\",\r\n \"Learner\": \"G Goober\"\r\n },\r\n {\r\n \"Score\": \"77\",\r\n \"Learner\": \"J Jackson\"\r\n }\r\n ]\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartJs')\r\n .controller('chartJs1DCtrl', chartJs1DCtrl);\r\n\r\n /** @ngInject */\r\n function chartJs1DCtrl($scope) {\r\n\r\n $scope.labels =[\"Sleeping\", \"Designing\", \"Coding\", \"Cycling\"];\r\n $scope.data = [20, 40, 5, 35];\r\n $scope.options = {\r\n segmentShowStroke : false\r\n };\r\n\r\n $scope.polarOptions = {\r\n scaleShowLabelBackdrop : false,\r\n segmentShowStroke : false\r\n };\r\n\r\n $scope.changeData = function () {\r\n $scope.data = shuffle($scope.data);\r\n };\r\n\r\n function shuffle(o){\r\n for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x){}\r\n return o;\r\n }\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartJs')\r\n .controller('chartJs2DCtrl', chartJs2DCtrl);\r\n\r\n /** @ngInject */\r\n function chartJs2DCtrl($scope) {\r\n $scope.labels =[\"May\", \"June\", \"Jule\", \"August\", \"September\", \"October\", \"November\"];\r\n $scope.data = [\r\n [65, 59, 90, 81, 56, 55, 40],\r\n [28, 48, 40, 19, 88, 27, 45]\r\n ];\r\n $scope.series = ['Product A', 'Product B'];\r\n\r\n\r\n $scope.changeData = function () {\r\n $scope.data[0] = shuffle($scope.data[0]);\r\n $scope.data[1] = shuffle($scope.data[1]);\r\n };\r\n\r\n function shuffle(o){\r\n for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x){}\r\n return o;\r\n }\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartJs')\r\n .controller('chartJsWaveCtrl', chartJsWaveCtrl);\r\n\r\n /** @ngInject */\r\n function chartJsWaveCtrl($scope, $interval, stopableInterval) {\r\n $scope.labels =[\"April\", \"May\", \"June\", \"Jule\", \"August\", \"September\", \"October\", \"November\", \"December\"];\r\n $scope.data = [[1, 9, 3, 4, 5, 6, 7, 8, 2].map(function(e){\r\n return Math.sin(e) * 25 +25;\r\n })];\r\n\r\n stopableInterval.start($interval, function(){\r\n $scope.data[0].unshift($scope.data[0].pop());\r\n }, 300)\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.chartist')\r\n .controller('chartistCtrl', chartistCtrl);\r\n\r\n /** @ngInject */\r\n function chartistCtrl($scope, $timeout, baConfig) {\r\n\r\n $scope.simpleLineOptions = {\r\n color: baConfig.colors.defaultText,\r\n fullWidth: true,\r\n height: \"300px\",\r\n chartPadding: {\r\n right: 40\r\n }\r\n };\r\n\r\n $scope.simpleLineData = {\r\n labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],\r\n series: [\r\n [20, 20, 12, 45, 50],\r\n [10, 45, 30, 14, 12],\r\n [34, 12, 12, 40, 50],\r\n [10, 43, 25, 22, 16],\r\n [3, 6, 30, 33, 43]\r\n ]\r\n };\r\n\r\n $scope.areaLineData = {\r\n labels: [1, 2, 3, 4, 5, 6, 7, 8],\r\n series: [\r\n [5, 9, 7, 8, 5, 3, 5, 4]\r\n ]\r\n };\r\n\r\n $scope.areaLineOptions = {\r\n fullWidth: true,\r\n height: \"300px\",\r\n low: 0,\r\n showArea: true\r\n };\r\n\r\n $scope.biLineData = {\r\n labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\r\n series: [\r\n [1, 2, 3, 1, -2, 0, 1],\r\n [-2, -1, -2, -1, -2.5, -1, -2],\r\n [0, 0, 0, 1, 2, 2.5, 2],\r\n [2.5, 2, 1, 0.5, 1, 0.5, -1]\r\n ]\r\n };\r\n\r\n $scope.biLineOptions = {\r\n height: \"300px\",\r\n high: 3,\r\n low: -3,\r\n showArea: true,\r\n showLine: false,\r\n showPoint: false,\r\n fullWidth: true,\r\n axisX: {\r\n showGrid: false\r\n }\r\n };\r\n\r\n $scope.simpleBarData = {\r\n labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\r\n series: [\r\n [15, 24, 43, 27, 5, 10, 23, 44, 68, 50, 26, 8],\r\n [13, 22, 49, 22, 4, 6, 24, 46, 57, 48, 22, 4]\r\n ]\r\n };\r\n\r\n $scope.simpleBarOptions = {\r\n fullWidth: true,\r\n height: \"300px\"\r\n };\r\n\r\n $scope.multiBarData = {\r\n labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],\r\n series: [\r\n [5, 4, 3, 7],\r\n [3, 2, 9, 5],\r\n [1, 5, 8, 4],\r\n [2, 3, 4, 6],\r\n [4, 1, 2, 1]\r\n ]\r\n };\r\n\r\n $scope.multiBarOptions = {\r\n fullWidth: true,\r\n height: \"300px\",\r\n stackBars: true,\r\n axisX: {\r\n labelInterpolationFnc: function (value) {\r\n return value.split(/\\s+/).map(function (word) {\r\n return word[0];\r\n }).join('');\r\n }\r\n },\r\n axisY: {\r\n offset: 20\r\n }\r\n };\r\n\r\n $scope.multiBarResponsive = [\r\n ['screen and (min-width: 400px)', {\r\n reverseData: true,\r\n horizontalBars: true,\r\n axisX: {\r\n labelInterpolationFnc: Chartist.noop\r\n },\r\n axisY: {\r\n offset: 60\r\n }\r\n }],\r\n ['screen and (min-width: 700px)', {\r\n stackBars: false,\r\n reverseData: false,\r\n horizontalBars: false,\r\n seriesBarDistance: 15\r\n }]\r\n ];\r\n\r\n $scope.stackedBarData = {\r\n labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],\r\n series: [\r\n [800000, 1200000, 1400000, 1300000],\r\n [200000, 400000, 500000, 300000],\r\n [100000, 200000, 400000, 600000]\r\n ]\r\n };\r\n\r\n $scope.stackedBarOptions = {\r\n fullWidth: true,\r\n height: \"300px\",\r\n stackBars: true,\r\n axisY: {\r\n labelInterpolationFnc: function (value) {\r\n return (value / 1000) + 'k';\r\n }\r\n }\r\n };\r\n\r\n $scope.simplePieData = {\r\n series: [5, 3, 4]\r\n };\r\n\r\n $scope.simplePieOptions = {\r\n fullWidth: true,\r\n height: \"300px\",\r\n weight: \"300px\",\r\n labelInterpolationFnc: function (value) {\r\n return Math.round(value / 12 * 100) + '%';\r\n }\r\n };\r\n\r\n $scope.labelsPieData = {\r\n labels: ['Bananas', 'Apples', 'Grapes'],\r\n series: [20, 15, 40]\r\n };\r\n\r\n $scope.labelsPieOptions = {\r\n fullWidth: true,\r\n height: \"300px\",\r\n weight: \"300px\",\r\n labelDirection: 'explode',\r\n labelInterpolationFnc: function (value) {\r\n return value[0];\r\n }\r\n };\r\n\r\n $scope.simpleDonutData = {\r\n labels: ['Bananas', 'Apples', 'Grapes'],\r\n series: [20, 15, 40]\r\n };\r\n\r\n $scope.simpleDonutOptions = {\r\n fullWidth: true,\r\n donut: true,\r\n height: \"300px\",\r\n weight: \"300px\",\r\n labelDirection: 'explode',\r\n labelInterpolationFnc: function (value) {\r\n return value[0];\r\n }\r\n };\r\n\r\n $scope.donutResponsive = getResponsive(5, 40);\r\n\r\n $scope.pieResponsive = getResponsive(20, 80);\r\n\r\n function getResponsive(padding, offset){\r\n return [\r\n ['screen and (min-width: 1550px)', {\r\n chartPadding: padding,\r\n labelOffset: offset,\r\n labelDirection: 'explode',\r\n labelInterpolationFnc: function (value) {\r\n return value;\r\n }\r\n }],\r\n ['screen and (max-width: 1200px)', {\r\n chartPadding: padding,\r\n labelOffset: offset,\r\n labelDirection: 'explode',\r\n labelInterpolationFnc: function (value) {\r\n return value;\r\n }\r\n }],\r\n ['screen and (max-width: 600px)', {\r\n chartPadding: 0,\r\n labelOffset: 0,\r\n labelInterpolationFnc: function (value) {\r\n return value[0];\r\n }\r\n }]\r\n ];\r\n }\r\n\r\n $timeout(function(){\r\n new Chartist.Line('#line-chart', $scope.simpleLineData, $scope.simpleLineOptions);\r\n new Chartist.Line('#area-chart', $scope.areaLineData, $scope.areaLineOptions);\r\n new Chartist.Line('#bi-chart', $scope.biLineData, $scope.biLineOptions);\r\n\r\n new Chartist.Bar('#simple-bar', $scope.simpleBarData, $scope.simpleBarOptions);\r\n new Chartist.Bar('#multi-bar', $scope.multiBarData, $scope.multiBarOptions, $scope.multiBarResponsive);\r\n new Chartist.Bar('#stacked-bar', $scope.stackedBarData, $scope.stackedBarOptions);\r\n\r\n new Chartist.Pie('#simple-pie', $scope.simplePieData, $scope.simplePieOptions, $scope.pieResponsive);\r\n new Chartist.Pie('#label-pie', $scope.labelsPieData, $scope.labelsPieOptions);\r\n new Chartist.Pie('#donut', $scope.simpleDonutData, $scope.simpleDonutOptions, $scope.donutResponsive);\r\n });\r\n }\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/16/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.morris')\r\n .controller('morrisCtrl', morrisCtrl);\r\n\r\n /** @ngInject */\r\n function morrisCtrl($scope, $window, baConfig) {\r\n var layoutColors = baConfig.colors;\r\n $scope.colors = [layoutColors.primary, layoutColors.warning, layoutColors.danger, layoutColors.info, layoutColors.success, layoutColors.primaryDark];\r\n $scope.lineData = [\r\n {y: \"2006\", a: 100, b: 90},\r\n {y: \"2007\", a: 75, b: 65},\r\n {y: \"2008\", a: 50, b: 40},\r\n {y: \"2009\", a: 75, b: 65},\r\n {y: \"2010\", a: 50, b: 40},\r\n {y: \"2011\", a: 75, b: 65},\r\n {y: \"2012\", a: 100, b: 90}\r\n ];\r\n $scope.areaData = [\r\n {y: \"2006\", a: 100, b: 90},\r\n {y: \"2007\", a: 75, b: 65},\r\n {y: \"2008\", a: 50, b: 40},\r\n {y: \"2009\", a: 75, b: 65},\r\n {y: \"2010\", a: 50, b: 40},\r\n {y: \"2011\", a: 75, b: 65},\r\n {y: \"2012\", a: 100, b: 90}\r\n ];\r\n $scope.barData = [\r\n {y: \"2006\", a: 100, b: 90},\r\n {y: \"2007\", a: 75, b: 65},\r\n {y: \"2008\", a: 50, b: 40},\r\n {y: \"2009\", a: 75, b: 65},\r\n {y: \"2010\", a: 50, b: 40},\r\n {y: \"2011\", a: 75, b: 65},\r\n {y: \"2012\", a: 100, b: 90}\r\n ];\r\n $scope.donutData = [\r\n {label: \"Download Sales\", value: 12},\r\n {label: \"In-Store Sales\", value: 30},\r\n {label: \"Mail-Order Sales\", value: 20}\r\n ];\r\n\r\n angular.element($window).bind('resize', function () {\r\n //$window.Morris.Grid.prototype.redraw();\r\n });\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .controller('MailTabCtrl', MailTabCtrl);\r\n\r\n /** @ngInject */\r\n function MailTabCtrl(composeModal, mailMessages) {\r\n\r\n var vm = this;\r\n vm.navigationCollapsed = true;\r\n vm.showCompose = function(subject, to , text){\r\n composeModal.open({\r\n subject : subject,\r\n to: to,\r\n text: text\r\n })\r\n };\r\n\r\n vm.tabs = mailMessages.getTabs();\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 12/29/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .service('mailMessages', mailMessages);\r\n\r\n /** @ngInject */\r\n function mailMessages($sce) {\r\n var messages = [\r\n {\r\n \"id\": \"4563faass\",\r\n \"name\": \"Nasta Linnie\",\r\n \"subject\": \"Great text\",\r\n \"date\": \"2015-08-28T07:57:09\",\r\n \"body\": $sce.trustAsHtml(\"

Hey John,

Check out this cool text.

\"),\r\n \"pic\": \"img/Nasta.png\",\r\n \"email\": \"petraramsey@mail.com\",\r\n \"attachment\": \"poem.txt\",\r\n \"position\": \"Great Employee\",\r\n \"tag\": \"friend\",\r\n \"labels\": ['inbox']\r\n },\r\n {\r\n \"id\": \"4563fdfvd\",\r\n \"name\": \"Nasta Linnie\",\r\n \"subject\": \"Lores ipsum\",\r\n \"date\": \"2015-11-19T03:30:45\",\r\n \"important\": false,\r\n \"body\": $sce.trustAsHtml(\"

Hey John,


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ex mauris, ultrices vel lectus quis, scelerisque hendrerit ipsum. Suspendisse ullamcorper turpis neque, eget dapibus magna placerat ac. Suspendisse rhoncus ligula ac mi tempus varius ut sed lacus. Sed et commodo nulla, et placerat leo. Nam rhoncus vulputate sem non pharetra. Praesent fringilla massa in laoreet convallis. Aliquam lobortis dui a congue facilisis. Aenean dapibus semper semper. Quisque aliquam, nibh dapibus interdum condimentum, ex velit tempor tortor, at vestibulum magna leo quis leo. Morbi pulvinar varius erat ac rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In hac habitasse platea dictumst.

\" +\r\n \"

Cras rhoncus quam ipsum, vel dignissim nisl egestas sed. Aliquam erat volutpat. Integer eu nisl elit. Donec malesuada diam vitae tellus luctus tincidunt. Donec tempus blandit neque, rutrum egestas ipsum sagittis tempor. Curabitur volutpat ligula enim, nec vehicula purus molestie at. Sed a facilisis enim, nec molestie magna. Donec in augue non est viverra dapibus vel tempus risus. Nam porttitor purus sit amet hendrerit ullamcorper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

\"),\r\n \"pic\": \"img/Nasta.png\",\r\n \"email\": \"petraramsey@mail.com\",\r\n \"position\": \"Great Employee\",\r\n \"tag\": \"study\",\r\n \"labels\": ['inbox']\r\n },\r\n {\r\n \"id\": \"4563zxcss\",\r\n \"name\": \"Nasta Linnie\",\r\n \"subject\": \"Lores ipsum\",\r\n \"date\": \"2015-10-19T03:30:45\",\r\n \"important\": false,\r\n \"body\": $sce.trustAsHtml(\"

Hey Nasta,

Lorem ipsum dolor sit amet, consectetur adipiscing elit

\"),\r\n \"pic\": \"img/Nasta.png\",\r\n \"email\": \"petraramsey@mail.com\",\r\n \"position\": \"Great Employee\",\r\n \"tag\": \"work\",\r\n \"labels\": ['sent', 'important']\r\n },\r\n {\r\n \"id\": \"8955sddf\",\r\n \"name\": \"Nick Cat\",\r\n \"subject\": \"New Design\",\r\n \"date\": \"2015-05-05T12:59:45\",\r\n \"body\": $sce.trustAsHtml(\"

Hey John, Consectetur adipiscing elit


\" +\r\n \"

Cras rhoncus quam ipsum, vel dignissim nisl egestas sed. Aliquam erat volutpat. Integer eu nisl elit. Donec malesuada diam vitae tellus luctus tincidunt. Donec tempus blandit neque, rutrum egestas ipsum sagittis tempor. Curabitur volutpat ligula enim, nec vehicula purus molestie at. Sed a facilisis enim, nec molestie magna. Donec in augue non est viverra dapibus vel tempus risus. Nam porttitor purus sit amet hendrerit ullamcorper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

\"),\r\n \"pic\": \"img/Nick.png\",\r\n \"email\": \"barlowshort@mail.com\",\r\n \"position\": \"Graphical designer\",\r\n \"attachment\": \"design.psd\",\r\n \"tag\": \"work\",\r\n \"labels\": ['inbox']\r\n },\r\n {\r\n \"id\": \"8955sdfcc\",\r\n \"name\": \"Nick Cat\",\r\n \"subject\": \"Gift card\",\r\n \"date\": \"2015-07-18T10:19:01\",\r\n \"body\": $sce.trustAsHtml(\"

Hey John,


Consectetur adipiscing elit, Lorem ipsum dolor sit amet

\"),\r\n \"pic\": \"img/Nick.png\",\r\n \"email\": \"barlowshort@mail.com\",\r\n \"position\": \"Graphical designer\",\r\n \"tag\": \"study\",\r\n \"labels\": ['inbox']\r\n },\r\n {\r\n \"id\": \"8955asewf\",\r\n \"name\": \"Nick Cat\",\r\n \"subject\": \"Some news\",\r\n \"date\": \"2015-09-23T03:04:10\",\r\n \"body\": $sce.trustAsHtml(\"

Hey John,


Integer eu nisl elit. Donec malesuada diam vitae tellus luctus tincidunt. Donec tempus blandit neque, rutrum egestas ipsum sagittis tempor. Curabitur volutpat ligula enim, nec vehicula purus molestie at. Sed a facilisis enim, nec molestie magna. Donec in augue non est viverra dapibus vel tempus risus. Nam porttitor purus sit amet hendrerit ullamcorper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

\"),\r\n \"pic\": \"img/Nick.png\",\r\n \"email\": \"barlowshort@mail.com\",\r\n \"position\": \"Graphical designer\",\r\n \"tag\": \"work\",\r\n \"labels\": ['inbox', 'important']\r\n },\r\n {\r\n \"id\": \"2334uudsa\",\r\n \"name\": \"Kostya Danovsky\",\r\n \"subject\": \"Street Art\",\r\n \"date\": \"2015-11-22T10:05:09\",\r\n \"body\": $sce.trustAsHtml(\"

Hey John,

Aliquam eu facilisis eros, quis varius est.

\" +\r\n \"

Consectetur adipiscing elit. Aliquam sodales sem in nibh pellentesque, ac dignissim mi dapibus.

\" +\r\n \"

Lorem ipsum dolor sit amet! Nullam imperdiet justo a ipsum laoreet euismod.

\" +\r\n \"

Cras tincidunt fermentum lectus, quis scelerisque lorem volutpat sed.\" +\r\n \"Sed quis orci sed nisl sagittis viverra id at mauris. Nam venenatis mi nibh. Sed fringilla mattis vehic

\"),\r\n \"pic\": \"img/Kostya.png\",\r\n \"email\": \"schwart@mail.com\",\r\n \"position\": \"Technical Chef\",\r\n \"attachment\": \"file.doc\",\r\n \"tag\": \"family\",\r\n \"labels\": ['inbox', 'important']\r\n },\r\n {\r\n \"id\": \"2334aefvv\",\r\n \"name\": \"Kostya Danovsky\",\r\n \"subject\": \"New product\",\r\n \"date\": \"2015-06-22T06:26:10\",\r\n \"body\": $sce.trustAsHtml(\"

Hello John,

\u0003Lorem ipsum dolor sit amet!

\" +\r\n \"

Consectetur adipiscing elit. Aliquam sodales sem in nibh pellentesque, ac dignissim mi dapibus.

\" +\r\n \"

Aliquam eu facilisis eros, quis varius est. Nullam imperdiet justo a ipsum laoreet euismod.

\" +\r\n \"

Nulla facilisi. Nulla congue, arcu eget blandit lacinia, leo ante ullamcorper lectus, vel pulvinar justo ipsum vitae justo.\" +\r\n \"Cras tincidunt fermentum lectus, quis scelerisque lorem volutpat sed. Sed quis orci sed nisl sagittis viverra id at mauris. Nam venenatis mi nibh. Sed fringilla mattis vehic

\"),\r\n \"pic\": \"img/Kostya.png\",\r\n \"email\": \"schwart@mail.com\",\r\n \"position\": \"Technical Chef\",\r\n \"tag\": \"family\",\r\n \"labels\": ['inbox', 'important']\r\n },\r\n {\r\n \"id\": \"2334cvdss\",\r\n \"name\": \"Kostya Danovsky\",\r\n \"subject\": \"Old product\",\r\n \"date\": \"2015-06-22T06:26:10\",\r\n \"body\": $sce.trustAsHtml(\"

Hello John,

\" +\r\n \"

Consectetur adipiscing elit. Aliquam sodales sem in nibh pellentesque, ac dignissim mi dapibus.

\" +\r\n \"
\"+\r\n \"

Cras tincidunt fermentum lectus, quis scelerisque lorem volutpat sed. Sed quis orci sed nisl sagittis viverra id at mauris. Nam venenatis mi nibh. Sed fringilla mattis vehic

\"),\r\n \"pic\": \"img/Kostya.png\",\r\n \"email\": \"schwart@mail.com\",\r\n \"position\": \"Technical Chef\",\r\n \"tag\": \"study\",\r\n \"labels\": ['trash']\r\n },\r\n {\r\n \"id\": \"8223xzxfn\",\r\n \"name\": \"Andrey Hrabouski\",\r\n \"subject\": \"Skype moji\",\r\n \"date\": \"2015-07-16T06:47:53\",\r\n \"body\": $sce.trustAsHtml(\"

Hello John,

Aliquam sodales sem in nibh pellentesque

\" +\r\n \"

Lorem ipsum dolor I find moji in skype sit amet!.

\"),\r\n \"pic\": \"img/Andrey.png\",\r\n \"email\": \"lakeishaphillips@mail.com\",\r\n \"position\": \"Mobile Developer\",\r\n \"tag\": 'family',\r\n \"labels\": ['trash']\r\n },\r\n {\r\n \"id\": \"8223sdffn\",\r\n \"name\": \"Andrey Hrabouski\",\r\n \"subject\": \"My App\",\r\n \"date\": \"2015-06-20T07:05:02\",\r\n \"body\": $sce.trustAsHtml(\"

Hey Vlad.

\u0003Lorem ipsum dolor sit amet!

\" +\r\n \"

Consectetur My Falasson App elit. Aliquam sodales sem in nibh pellentesque, ac dignissim mi dapibus.

\"),\r\n \"pic\": \"img/Andrey.png\",\r\n \"email\": \"lakeishaphillips@mail.com\",\r\n \"position\": \"Mobile Developer\",\r\n \"tag\": 'family',\r\n \"labels\": ['spam']\r\n },\r\n {\r\n \"id\": \"9391xdsff\",\r\n \"name\": \"Vlad Lugovsky\",\r\n \"subject\": \"Cool\",\r\n \"date\": \"2015-03-31T11:52:58\",\r\n \"body\": $sce.trustAsHtml(\"

Hey Vlad.

Aliquam sodales sem in nibh pellentesque

\" +\r\n \"

Cras tincidunt fermentum lectus, quis scelerisque lorem volutpat sed.

\"),\r\n \"pic\": \"img/Vlad.png\",\r\n \"email\": \"carlsongoodman@mail.com\",\r\n \"position\": \"Fullstack man\",\r\n \"tag\": \"study\",\r\n \"labels\": ['draft']\r\n },\r\n {\r\n \"id\": \"8223xsdaa\",\r\n \"name\": \"Andrey Hrabouski\",\r\n \"subject\": \"Car rent\",\r\n \"date\": \"2015-02-25T10:58:58\",\r\n \"body\": $sce.trustAsHtml(\"

Hey Andrey.

\" +\r\n \"

Cras tincidunt fermentum lectus, quis scelerisque lorem volutpat sed. Sed quis orci sed nisl sagittis viverra id at mauris. Nam venenatis mi nibh. Sed fringilla mattis vehic

\"),\r\n \"pic\": \"img/Andrey.png\",\r\n \"email\": \"lakeishaphillips@mail.com\",\r\n \"position\": \"Mobile Developer\",\r\n \"tag\": \"family\",\r\n \"labels\": ['draft']\r\n },\r\n {\r\n \"id\": \"9391xdsff\",\r\n \"name\": \"Vlad Lugovsky\",\r\n \"subject\": \"What next\",\r\n \"date\": \"2015-03-31T11:52:58\",\r\n \"body\": $sce.trustAsHtml(\"

Hey Vlad.

\u0003Lorem ipsum dolor sit amet!

\" +\r\n \"

Esse esse labore tempor ullamco ullamco. Id veniam laborum c.

\"),\r\n \"pic\": \"img/Vlad.png\",\r\n \"email\": \"carlsongoodman@mail.com\",\r\n \"position\": \"Fullstack man\",\r\n \"tag\": \"study\",\r\n \"labels\": ['sent']\r\n }\r\n ].sort(function (a, b) {\r\n if (a.date > b.date) return 1;\r\n if (a.date < b.date) return -1;\r\n }).reverse();\r\n var tabs = [{\r\n label: 'inbox',\r\n name: 'Inbox',\r\n newMails: 7\r\n }, {\r\n label: 'sent',\r\n name: 'Sent Mail'\r\n }, {\r\n label: 'important',\r\n name: 'Important'\r\n }, {\r\n label: 'draft',\r\n name: 'Draft',\r\n newMails: 2\r\n }, {\r\n label: 'spam',\r\n name: 'Spam'\r\n }, {\r\n label: 'trash',\r\n name: 'Trash'\r\n }];\r\n\r\n return{\r\n getTabs : function(){\r\n return tabs\r\n },\r\n getMessagesByLabel : function(label){\r\n return messages.filter(function(m){\r\n return m.labels.indexOf(label) != -1;\r\n });\r\n },\r\n getMessageById : function(id){\r\n return messages.filter(function(m){\r\n return m.id == id;\r\n })[0];\r\n }\r\n }\r\n\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.timeline')\r\n .controller('TimelineCtrl', TimelineCtrl);\r\n\r\n /** @ngInject */\r\n function TimelineCtrl() {\r\n var timelineBlocks = $('.cd-timeline-block'),\r\n offset = 0.8;\r\n\r\n //hide timeline blocks which are outside the viewport\r\n hideBlocks(timelineBlocks, offset);\r\n\r\n //on scolling, show/animate timeline blocks when enter the viewport\r\n $(window).on('scroll', function () {\r\n if (!window.requestAnimationFrame) {\r\n setTimeout(function () {\r\n showBlocks(timelineBlocks, offset);\r\n }, 100);\r\n } else {\r\n window.requestAnimationFrame(function () {\r\n showBlocks(timelineBlocks, offset);\r\n });\r\n }\r\n });\r\n\r\n function hideBlocks(blocks, offset) {\r\n blocks.each(function () {\r\n ( $(this).offset().top > $(window).scrollTop() + $(window).height() * offset ) && $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden');\r\n });\r\n }\r\n\r\n function showBlocks(blocks, offset) {\r\n blocks.each(function () {\r\n ( $(this).offset().top <= $(window).scrollTop() + $(window).height() * offset && $(this).find('.cd-timeline-img').hasClass('is-hidden') ) && $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');\r\n });\r\n }\r\n }\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/21/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.tree')\r\n .controller('treeCtrl', treeCtrl);\r\n\r\n /** @ngInject */\r\n function treeCtrl($scope, $timeout) {\r\n\r\n $scope.ignoreChanges = false;\r\n var newId = 0;\r\n $scope.ignoreChanges = false;\r\n $scope.newNode = {};\r\n\r\n $scope.basicConfig = {\r\n core: {\r\n multiple: false,\r\n check_callback: true,\r\n worker: true\r\n },\r\n 'types': {\r\n 'folder': {\r\n 'icon': 'ion-ios-folder'\r\n },\r\n 'default': {\r\n 'icon': 'ion-document-text'\r\n }\r\n },\r\n 'plugins': ['types'],\r\n 'version': 1\r\n };\r\n\r\n $scope.dragConfig = {\r\n 'core': {\r\n 'check_callback': true,\r\n 'themes': {\r\n 'responsive': false\r\n }\r\n },\r\n 'types': {\r\n 'folder': {\r\n 'icon': 'ion-ios-folder'\r\n },\r\n 'default': {\r\n 'icon': 'ion-document-text'\r\n }\r\n },\r\n \"plugins\": [\"dnd\", 'types']\r\n };\r\n\r\n $scope.addNewNode = function () {\r\n $scope.ignoreChanges = true;\r\n var selected = this.basicTree.jstree(true).get_selected()[0];\r\n if (selected)\r\n $scope.treeData.push({\r\n id: (newId++).toString(),\r\n parent: selected,\r\n text: \"New node \" + newId,\r\n state: {opened: true}\r\n });\r\n $scope.basicConfig.version++;\r\n };\r\n\r\n\r\n $scope.refresh = function () {\r\n $scope.ignoreChanges = true;\r\n newId = 0;\r\n $scope.treeData = getDefaultData();\r\n $scope.basicConfig.version++;\r\n };\r\n\r\n $scope.expand = function () {\r\n $scope.ignoreChanges = true;\r\n $scope.treeData.forEach(function (n) {\r\n n.state.opened = true;\r\n });\r\n $scope.basicConfig.version++;\r\n };\r\n\r\n $scope.collapse = function () {\r\n $scope.ignoreChanges = true;\r\n $scope.treeData.forEach(function (n) {\r\n n.state.opened = false;\r\n });\r\n $scope.basicConfig.version++;\r\n };\r\n\r\n $scope.readyCB = function() {\r\n $timeout(function() {\r\n $scope.ignoreChanges = false;\r\n });\r\n };\r\n\r\n\r\n $scope.applyModelChanges = function() {\r\n return !$scope.ignoreChanges;\r\n };\r\n\r\n $scope.treeData = getDefaultData();\r\n $scope.dragData = [\r\n {\r\n \"id\": \"nd1\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd2\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd3\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd4\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 4\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd5\",\r\n \"parent\": \"nd1\",\r\n \"text\": \"Node 1.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd6\",\r\n \"parent\": \"nd1\",\r\n \"text\": \"Node 1.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd7\",\r\n \"parent\": \"nd1\",\r\n \"text\": \"Node 1.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd8\",\r\n \"parent\": \"nd2\",\r\n \"text\": \"Node 2.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd9\",\r\n \"parent\": \"nd2\",\r\n \"text\": \"Node 2.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd10\",\r\n \"parent\": \"nd2\",\r\n \"text\": \"Node 2.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd11\",\r\n \"parent\": \"nd3\",\r\n \"text\": \"Node 3.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd12\",\r\n \"parent\": \"nd3\",\r\n \"text\": \"Node 3.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd13\",\r\n \"parent\": \"nd3\",\r\n \"text\": \"Node 3.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd14\",\r\n \"parent\": \"nd4\",\r\n \"text\": \"Node 4.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd15\",\r\n \"parent\": \"nd4\",\r\n \"text\": \"Node 4.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"nd16\",\r\n \"parent\": \"nd4\",\r\n \"text\": \"Node 4.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n }\r\n ];\r\n\r\n function getDefaultData() {\r\n return [\r\n {\r\n \"id\": \"n1\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n2\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n3\",\r\n \"parent\": \"#\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n5\",\r\n \"parent\": \"n1\",\r\n \"text\": \"Node 1.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n6\",\r\n \"parent\": \"n1\",\r\n \"text\": \"Node 1.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n7\",\r\n \"parent\": \"n1\",\r\n \"text\": \"Node 1.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n8\",\r\n \"parent\": \"n1\",\r\n \"text\": \"Node 1.4\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n9\",\r\n \"parent\": \"n2\",\r\n \"text\": \"Node 2.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n10\",\r\n \"parent\": \"n2\",\r\n \"text\": \"Node 2.2 (Custom icon)\",\r\n \"icon\": \"ion-help-buoy\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n12\",\r\n \"parent\": \"n3\",\r\n \"text\": \"Node 3.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n13\",\r\n \"parent\": \"n3\",\r\n \"type\": \"folder\",\r\n \"text\": \"Node 3.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n14\",\r\n \"parent\": \"n13\",\r\n \"text\": \"Node 3.2.1\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n15\",\r\n \"parent\": \"n13\",\r\n \"text\": \"Node 3.2.2\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n16\",\r\n \"parent\": \"n3\",\r\n \"text\": \"Node 3.3\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n17\",\r\n \"parent\": \"n3\",\r\n \"text\": \"Node 3.4\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n18\",\r\n \"parent\": \"n3\",\r\n \"text\": \"Node 3.5\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n },\r\n {\r\n \"id\": \"n19\",\r\n \"parent\": \"n3\",\r\n \"text\": \"Node 3.6\",\r\n \"state\": {\r\n \"opened\": true\r\n }\r\n }\r\n ]\r\n }\r\n\r\n\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('BlurFeedCtrl', BlurFeedCtrl);\r\n\r\n /** @ngInject */\r\n function BlurFeedCtrl($scope) {\r\n $scope.feed = [\r\n {\r\n type: 'text-message',\r\n author: 'Kostya',\r\n surname: 'Danovsky',\r\n header: 'Posted new message',\r\n text: 'Guys, check this out: \\nA police officer found a perfect hiding place for watching for speeding motorists. One day, the officer was amazed when everyone was under the speed limit, so he investigated and found the problem. A 10 years old boy was standing on the side of the road with a huge hand painted sign which said \"Radar Trap Ahead.\" A little more investigative work led the officer to the boy\\'s accomplice: another boy about 100 yards beyond the radar trap with a sign reading \"TIPS\" and a bucket at his feet full of change.',\r\n time: 'Today 11:55 pm',\r\n ago: '25 minutes ago',\r\n expanded: false,\r\n }, {\r\n type: 'video-message',\r\n author: 'Andrey',\r\n surname: 'Hrabouski',\r\n header: 'Added new video',\r\n text: '\"Vader and Me\"',\r\n preview: 'app/feed/vader-and-me-preview.png',\r\n link: 'https://www.youtube.com/watch?v=IfcpzBbbamk',\r\n time: 'Today 9:30 pm',\r\n ago: '3 hrs ago',\r\n expanded: false,\r\n }, {\r\n type: 'image-message',\r\n author: 'Vlad',\r\n surname: 'Lugovsky',\r\n header: 'Added new image',\r\n text: '\"My little kitten\"',\r\n preview: 'app/feed/my-little-kitten.png',\r\n link: 'http://api.ning.com/files/DtcI2O2Ry7A7VhVxeiWfGU9WkHcMy4WSTWZ79oxJq*h0iXvVGndfD7CIYy-Ax-UAFCBCdqXI4GCBw3FOLKTTjQc*2cmpdOXJ/1082127884.jpeg',\r\n time: 'Today 2:20 pm',\r\n ago: '10 hrs ago',\r\n expanded: false,\r\n }, {\r\n type: 'text-message',\r\n author: 'Nasta',\r\n surname: 'Linnie',\r\n header: 'Posted new message',\r\n text: 'Haha lol',\r\n time: '11.11.2015',\r\n ago: '2 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'geo-message',\r\n author: 'Nick',\r\n surname: 'Cat',\r\n header: 'Posted location',\r\n text: '\"New York, USA\"',\r\n preview: 'app/feed/new-york-location.png',\r\n link: 'https://www.google.by/maps/place/New+York,+NY,+USA/@40.7201111,-73.9893872,14z',\r\n time: '11.11.2015',\r\n ago: '2 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'text-message',\r\n author: 'Vlad',\r\n surname: 'Lugovsky',\r\n header: 'Posted new message',\r\n text: \"First snake: I hope I'm not poisonous. Second snake: Why? First snake: Because I bit my lip!\",\r\n time: '12.11.2015',\r\n ago: '3 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'text-message',\r\n author: 'Andrey',\r\n surname: 'Hrabouski',\r\n header: 'Posted new message',\r\n text: 'How do you smuggle an elephant across the border? Put a slice of bread on each side, and call him \"lunch\".',\r\n time: '14.11.2015',\r\n ago: '5 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'text-message',\r\n author: 'Nasta',\r\n surname: 'Linnie',\r\n header: 'Posted new message',\r\n text: 'When your hammer is C++, everything begins to look like a thumb.',\r\n time: '14.11.2015',\r\n ago: '5 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'text-message',\r\n author: 'Alexander',\r\n surname: 'Demeshko',\r\n header: 'Posted new message',\r\n text: '“I mean, they say you die twice. One time when you stop breathing and a second time, a bit later on, when somebody says your name for the last time.\" ©',\r\n time: '15.11.2015',\r\n ago: '6 days ago',\r\n expanded: false,\r\n }, {\r\n type: 'image-message',\r\n author: 'Nick',\r\n surname: 'Cat',\r\n header: 'Posted photo',\r\n text: '\"Protein Heroes\"',\r\n preview: 'app/feed/genom.png',\r\n link: 'https://dribbble.com/shots/2504810-Protein-Heroes',\r\n time: '16.11.2015',\r\n ago: '7 days ago',\r\n expanded: false,\r\n },\r\n {\r\n type: 'text-message',\r\n author: 'Kostya',\r\n surname: 'Danovsky',\r\n header: 'Posted new message',\r\n text: 'Why did the CoffeeScript developer keep getting lost? Because he couldn\\'t find his source without a map',\r\n time: '18.11.2015',\r\n ago: '9 days ago',\r\n expanded: false,\r\n }\r\n ];\r\n\r\n $scope.expandMessage = function(message){\r\n message.expanded = !message.expanded;\r\n }\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('blurFeed', blurFeed);\r\n\r\n /** @ngInject */\r\n function blurFeed() {\r\n return {\r\n restrict: 'E',\r\n controller: 'BlurFeedCtrl',\r\n templateUrl: 'app/pages/dashboard/blurFeed/blurFeed.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .service('assignCalendar', assignCalendar);\r\n\r\n /** @ngInject */\r\n function assignCalendar() {\r\n return {\r\n restrict: 'E',\r\n controller: 'assignCalendar',\r\n templateUrl: 'app/tpls/assignCalendar.htm'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .service('dashboardCalendar', dashboardCalendar);\r\n\r\n /** @ngInject */\r\n function dashboardCalendar() {\r\n\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('DashboardCalendarCtrl', DashboardCalendarCtrl);\r\n\r\n /** @ngInject */\r\n function DashboardCalendarCtrl(baConfig) {\r\n var dashboardColors = baConfig.colors.dashboard;\r\n var $element = $('#calendar').fullCalendar({\r\n //height: 335,\r\n header: {\r\n left: 'prev,next today',\r\n center: 'title',\r\n right: 'month,agendaWeek,agendaDay'\r\n },\r\n defaultDate: '2016-03-08',\r\n selectable: true,\r\n selectHelper: true,\r\n select: function (start, end) {\r\n var title = prompt('Event Title:');\r\n var eventData;\r\n if (title) {\r\n eventData = {\r\n title: title,\r\n start: start,\r\n end: end\r\n };\r\n $element.fullCalendar('renderEvent', eventData, true); // stick? = true\r\n }\r\n $element.fullCalendar('unselect');\r\n },\r\n editable: true,\r\n eventLimit: true, // allow \"more\" link when too many events\r\n events: [\r\n {\r\n title: 'All Day Event',\r\n start: '2016-03-01',\r\n color: dashboardColors.silverTree\r\n },\r\n {\r\n title: 'Long Event',\r\n start: '2016-03-07',\r\n end: '2016-03-10',\r\n color: dashboardColors.blueStone\r\n },\r\n {\r\n title: 'Dinner',\r\n start: '2016-03-14T20:00:00',\r\n color: dashboardColors.surfieGreen\r\n },\r\n {\r\n title: 'Birthday Party',\r\n start: '2016-04-01T07:00:00',\r\n color: dashboardColors.gossipDark\r\n }\r\n ]\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('dashboardCalendar', dashboardCalendar);\r\n\r\n /** @ngInject */\r\n function dashboardCalendar() {\r\n return {\r\n restrict: 'E',\r\n controller: 'DashboardCalendarCtrl',\r\n templateUrl: 'app/pages/dashboard/dashboardCalendar/dashboardCalendar.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('DashboardLineChartCtrl', DashboardLineChartCtrl);\r\n\r\n /** @ngInject */\r\n function DashboardLineChartCtrl(baConfig, layoutPaths, baUtil) {\r\n var layoutColors = baConfig.colors;\r\n var graphColor = baConfig.theme.blur ? '#000000' : layoutColors.primary;\r\n var chartData = [\r\n { date: new Date(2012, 11), value: 0, value0: 0 },\r\n { date: new Date(2013, 0), value: 15000, value0: 19000},\r\n { date: new Date(2013, 1), value: 30000, value0: 20000},\r\n\r\n { date: new Date(2013, 2), value: 25000, value0: 22000},\r\n { date: new Date(2013, 3), value: 21000, value0: 25000},\r\n { date: new Date(2013, 4), value: 24000, value0: 29000},\r\n { date: new Date(2013, 5), value: 31000, value0: 26000},\r\n { date: new Date(2013, 6), value: 40000, value0: 25000},\r\n { date: new Date(2013, 7), value: 37000, value0: 20000},\r\n { date: new Date(2013, 8), value: 18000, value0: 22000},\r\n { date: new Date(2013, 9), value: 5000, value0: 26000},\r\n { date: new Date(2013, 10), value: 40000, value0: 30000},\r\n { date: new Date(2013, 11), value: 20000, value0: 25000},\r\n { date: new Date(2014, 0), value: 5000, value0: 13000},\r\n\r\n { date: new Date(2014, 1), value: 3000, value0: 13000},\r\n { date: new Date(2014, 2), value: 1800, value0: 13000},\r\n { date: new Date(2014, 3), value: 10400, value0: 13000},\r\n { date: new Date(2014, 4), value: 25500, value0: 13000},\r\n { date: new Date(2014, 5), value: 2100, value0: 13000},\r\n { date: new Date(2014, 6), value: 6500, value0: 13000},\r\n { date: new Date(2014, 7), value: 1100, value0: 13000},\r\n { date: new Date(2014, 8), value: 17200, value0: 13000},\r\n { date: new Date(2014, 9), value: 26900, value0: 13000},\r\n { date: new Date(2014, 10), value: 14100, value0: 13000},\r\n { date: new Date(2014, 11), value: 35300, value0: 13000},\r\n { date: new Date(2015, 0), value: 54800, value0: 13000},\r\n { date: new Date(2015, 1), value: 49800, value0: 13000}\r\n ];\r\n\r\n var chart = AmCharts.makeChart('amchart', {\r\n type: 'serial',\r\n theme: 'blur',\r\n marginTop: 15,\r\n marginRight: 15,\r\n dataProvider: chartData,\r\n categoryField: 'date',\r\n categoryAxis: {\r\n parseDates: true,\r\n gridAlpha: 0,\r\n color: layoutColors.defaultText,\r\n axisColor: layoutColors.defaultText\r\n },\r\n valueAxes: [\r\n {\r\n minVerticalGap: 50,\r\n gridAlpha: 0,\r\n color: layoutColors.defaultText,\r\n axisColor: layoutColors.defaultText\r\n }\r\n ],\r\n graphs: [\r\n {\r\n id: 'g0',\r\n bullet: 'none',\r\n useLineColorForBulletBorder: true,\r\n lineColor: baUtil.hexToRGB(graphColor, 0.3),\r\n lineThickness: 1,\r\n negativeLineColor: layoutColors.danger,\r\n type: 'smoothedLine',\r\n valueField: 'value0',\r\n fillAlphas: 1,\r\n fillColorsField: 'lineColor'\r\n },\r\n {\r\n id: 'g1',\r\n bullet: 'none',\r\n useLineColorForBulletBorder: true,\r\n lineColor: baUtil.hexToRGB(graphColor, 0.5),\r\n lineThickness: 1,\r\n negativeLineColor: layoutColors.danger,\r\n type: 'smoothedLine',\r\n valueField: 'value',\r\n fillAlphas: 1,\r\n fillColorsField: 'lineColor'\r\n }\r\n ],\r\n chartCursor: {\r\n categoryBalloonDateFormat: 'MM YYYY',\r\n categoryBalloonColor: '#4285F4',\r\n categoryBalloonAlpha: 0.7,\r\n cursorAlpha: 0,\r\n valueLineEnabled: true,\r\n valueLineBalloonEnabled: true,\r\n valueLineAlpha: 0.5\r\n },\r\n dataDateFormat: 'MM YYYY',\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-right',\r\n zoomOutButton: {\r\n backgroundColor: '#fff',\r\n backgroundAlpha: 0\r\n },\r\n zoomOutText: '',\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n\r\n function zoomChart() {\r\n chart.zoomToDates(new Date(2013, 3), new Date(2014, 0));\r\n }\r\n\r\n chart.addListener('rendered', zoomChart);\r\n zoomChart();\r\n if (chart.zoomChart) {\r\n chart.zoomChart();\r\n }\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('dashboardLineChart', dashboardLineChart);\r\n\r\n /** @ngInject */\r\n function dashboardLineChart() {\r\n return {\r\n restrict: 'E',\r\n controller: 'DashboardLineChartCtrl',\r\n templateUrl: 'app/pages/dashboard/dashboardLineChart/dashboardLineChart.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('DashboardMapCtrl', DashboardMapCtrl);\r\n\r\n /** @ngInject */\r\n function DashboardMapCtrl(baConfig, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var map = AmCharts.makeChart('amChartMap', {\r\n type: 'map',\r\n theme: 'blur',\r\n zoomControl: { zoomControlEnabled: false, panControlEnabled: false },\r\n\r\n dataProvider: {\r\n map: 'worldLow',\r\n zoomLevel: 3.5,\r\n zoomLongitude: 10,\r\n zoomLatitude: 52,\r\n areas: [\r\n { title: 'Austria', id: 'AT', color: layoutColors.primary, customData: '1 244', groupId: '1'},\r\n { title: 'Ireland', id: 'IE', color: layoutColors.primary, customData: '1 342', groupId: '1'},\r\n { title: 'Denmark', id: 'DK', color: layoutColors.primary, customData: '1 973', groupId: '1'},\r\n { title: 'Finland', id: 'FI', color: layoutColors.primary, customData: '1 573', groupId: '1'},\r\n { title: 'Sweden', id: 'SE', color: layoutColors.primary, customData: '1 084', groupId: '1'},\r\n { title: 'Great Britain', id: 'GB', color: layoutColors.primary, customData: '1 452', groupId: '1'},\r\n { title: 'Italy', id: 'IT', color: layoutColors.primary, customData: '1 321', groupId: '1'},\r\n { title: 'France', id: 'FR', color: layoutColors.primary, customData: '1 112', groupId: '1'},\r\n { title: 'Spain', id: 'ES', color: layoutColors.primary, customData: '1 865', groupId: '1'},\r\n { title: 'Greece', id: 'GR', color: layoutColors.primary, customData: '1 453', groupId: '1'},\r\n { title: 'Germany', id: 'DE', color: layoutColors.primary, customData: '1 957', groupId: '1'},\r\n { title: 'Belgium', id: 'BE', color: layoutColors.primary, customData: '1 011', groupId: '1'},\r\n { title: 'Luxembourg', id: 'LU', color: layoutColors.primary, customData: '1 011', groupId: '1'},\r\n { title: 'Netherlands', id: 'NL', color: layoutColors.primary, customData: '1 213', groupId: '1'},\r\n { title: 'Portugal', id: 'PT', color: layoutColors.primary, customData: '1 291', groupId: '1'},\r\n { title: 'Lithuania', id: 'LT', color: layoutColors.successLight, customData: '567', groupId: '2'},\r\n { title: 'Latvia', id: 'LV', color: layoutColors.successLight, customData: '589', groupId: '2'},\r\n { title: 'Czech Republic ', id: 'CZ', color: layoutColors.successLight, customData: '785', groupId: '2'},\r\n { title: 'Slovakia', id: 'SK', color: layoutColors.successLight, customData: '965', groupId: '2'},\r\n { title: 'Estonia', id: 'EE', color: layoutColors.successLight, customData: '685', groupId: '2'},\r\n { title: 'Hungary', id: 'HU', color: layoutColors.successLight, customData: '854', groupId: '2'},\r\n { title: 'Cyprus', id: 'CY', color: layoutColors.successLight, customData: '754', groupId: '2'},\r\n { title: 'Malta', id: 'MT', color: layoutColors.successLight, customData: '867', groupId: '2'},\r\n { title: 'Poland', id: 'PL', color: layoutColors.successLight, customData: '759', groupId: '2'},\r\n { title: 'Romania', id: 'RO', color: layoutColors.success, customData: '302', groupId: '3'},\r\n { title: 'Bulgaria', id: 'BG', color: layoutColors.success, customData: '102', groupId: '3'},\r\n { title: 'Slovenia', id: 'SI', color: layoutColors.danger, customData: '23', groupId: '4'},\r\n { title: 'Croatia', id: 'HR', color: layoutColors.danger, customData: '96', groupId: '4'}\r\n ]\r\n },\r\n\r\n areasSettings: {\r\n rollOverOutlineColor: layoutColors.border,\r\n rollOverColor: layoutColors.primaryDark,\r\n alpha: 0.8,\r\n unlistedAreasAlpha: 0.2,\r\n unlistedAreasColor: layoutColors.defaultText,\r\n balloonText: '[[title]]: [[customData]] users'\r\n },\r\n\r\n\r\n legend: {\r\n width: '100%',\r\n marginRight: 27,\r\n marginLeft: 27,\r\n equalWidths: false,\r\n backgroundAlpha: 0.3,\r\n backgroundColor: layoutColors.border,\r\n borderColor: layoutColors.border,\r\n borderAlpha: 1,\r\n top: 362,\r\n left: 0,\r\n horizontalGap: 10,\r\n data: [\r\n {\r\n title: 'over 1 000 users',\r\n color: layoutColors.primary\r\n },\r\n {\r\n title: '500 - 1 000 users',\r\n color: layoutColors.successLight\r\n },\r\n {\r\n title: '100 - 500 users',\r\n color: layoutColors.success\r\n },\r\n {\r\n title: '0 - 100 users',\r\n color: layoutColors.danger\r\n }\r\n ]\r\n },\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-right',\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('dashboardMap', dashboardMap);\r\n\r\n /** @ngInject */\r\n function dashboardMap() {\r\n return {\r\n restrict: 'E',\r\n controller: 'DashboardMapCtrl',\r\n templateUrl: 'app/pages/dashboard/dashboardMap/dashboardMap.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('DashboardPieChartCtrl', DashboardPieChartCtrl);\r\n\r\n /** @ngInject */\r\n function DashboardPieChartCtrl($scope, $timeout, baConfig, baUtil) {\r\n var pieColor = baUtil.hexToRGB(baConfig.colors.defaultText, 0.2);\r\n $scope.charts = [{\r\n color: pieColor,\r\n description: 'New Visits',\r\n stats: '57,820',\r\n icon: 'person',\r\n }, {\r\n color: pieColor,\r\n description: 'Purchases',\r\n stats: '$ 89,745',\r\n icon: 'money',\r\n }, {\r\n color: pieColor,\r\n description: 'Active Users',\r\n stats: '178,391',\r\n icon: 'face',\r\n }, {\r\n color: pieColor,\r\n description: 'Returned',\r\n stats: '32,592',\r\n icon: 'refresh',\r\n }\r\n ];\r\n\r\n function getRandomArbitrary(min, max) {\r\n return Math.random() * (max - min) + min;\r\n }\r\n\r\n function loadPieCharts() {\r\n $('.chart').each(function () {\r\n var chart = $(this);\r\n chart.easyPieChart({\r\n easing: 'easeOutBounce',\r\n onStep: function (from, to, percent) {\r\n $(this.el).find('.percent').text(Math.round(percent));\r\n },\r\n barColor: chart.attr('rel'),\r\n trackColor: 'rgba(0,0,0,0)',\r\n size: 84,\r\n scaleLength: 0,\r\n animation: 2000,\r\n lineWidth: 9,\r\n lineCap: 'round',\r\n });\r\n });\r\n\r\n $('.refresh-data').on('click', function () {\r\n updatePieCharts();\r\n });\r\n }\r\n\r\n function updatePieCharts() {\r\n $('.pie-charts .chart').each(function(index, chart) {\r\n $(chart).data('easyPieChart').update(getRandomArbitrary(55, 90));\r\n });\r\n }\r\n\r\n $timeout(function () {\r\n loadPieCharts();\r\n updatePieCharts();\r\n }, 1000);\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('dashboardPieChart', dashboardPieChart);\r\n\r\n /** @ngInject */\r\n function dashboardPieChart() {\r\n return {\r\n restrict: 'E',\r\n controller: 'DashboardPieChartCtrl',\r\n templateUrl: 'app/pages/dashboard/dashboardPieChart/dashboardPieChart.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('DashboardTodoCtrl', DashboardTodoCtrl);\r\n\r\n /** @ngInject */\r\n function DashboardTodoCtrl($scope, baConfig) {\r\n\r\n $scope.transparent = baConfig.theme.blur;\r\n var dashboardColors = baConfig.colors.dashboard;\r\n var colors = [];\r\n for (var key in dashboardColors) {\r\n colors.push(dashboardColors[key]);\r\n }\r\n\r\n function getRandomColor() {\r\n var i = Math.floor(Math.random() * (colors.length - 1));\r\n return colors[i];\r\n }\r\n\r\n $scope.todoList = [\r\n { text: 'Check me out' },\r\n { text: 'Lorem ipsum dolor sit amet, possit denique oportere at his, etiam corpora deseruisse te pro' },\r\n { text: 'Ex has semper alterum, expetenda dignissim' },\r\n { text: 'Vim an eius ocurreret abhorreant, id nam aeque persius ornatus.' },\r\n { text: 'Simul erroribus ad usu' },\r\n { text: 'Ei cum solet appareat, ex est graeci mediocritatem' },\r\n { text: 'Get in touch with akveo team' },\r\n { text: 'Write email to business cat' },\r\n { text: 'Have fun with blur admin' },\r\n { text: 'What do you think?' },\r\n ];\r\n\r\n $scope.todoList.forEach(function(item) {\r\n item.color = getRandomColor();\r\n });\r\n\r\n $scope.newTodoText = '';\r\n\r\n $scope.addToDoItem = function (event, clickPlus) {\r\n if (clickPlus || event.which === 13) {\r\n $scope.todoList.unshift({\r\n text: $scope.newTodoText,\r\n color: getRandomColor(),\r\n });\r\n $scope.newTodoText = '';\r\n }\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('dashboardTodo', dashboardTodo);\r\n\r\n /** @ngInject */\r\n function dashboardTodo() {\r\n return {\r\n restrict: 'EA',\r\n controller: 'DashboardTodoCtrl',\r\n templateUrl: 'app/pages/dashboard/dashboardTodo/dashboardTodo.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .service('dashboardPieChart', dashboardPieChart);\r\n\r\n /** @ngInject */\r\n function dashboardPieChart() {\r\n\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('popularApp', popularApp);\r\n\r\n /** @ngInject */\r\n function popularApp() {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/pages/dashboard/popularApp/popularApp.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('TrafficChartCtrl', TrafficChartCtrl);\r\n\r\n /** @ngInject */\r\n function TrafficChartCtrl($scope, baConfig, colorHelper) {\r\n\r\n $scope.transparent = baConfig.theme.blur;\r\n var dashboardColors = baConfig.colors.dashboard;\r\n $scope.doughnutData = [\r\n {\r\n value: 2000,\r\n color: dashboardColors.white,\r\n highlight: colorHelper.shade(dashboardColors.white, 15),\r\n label: 'Other',\r\n percentage: 87,\r\n order: 1,\r\n }, {\r\n value: 1500,\r\n color: dashboardColors.blueStone,\r\n highlight: colorHelper.shade(dashboardColors.blueStone, 15),\r\n label: 'Search engines',\r\n percentage: 22,\r\n order: 4,\r\n }, {\r\n value: 1000,\r\n color: dashboardColors.surfieGreen,\r\n highlight: colorHelper.shade(dashboardColors.surfieGreen, 15),\r\n label: 'Referral Traffic',\r\n percentage: 70,\r\n order: 3,\r\n }, {\r\n value: 1200,\r\n color: dashboardColors.silverTree,\r\n highlight: colorHelper.shade(dashboardColors.silverTree, 15),\r\n label: 'Direct Traffic',\r\n percentage: 38,\r\n order: 2,\r\n }, {\r\n value: 400,\r\n color: dashboardColors.gossip,\r\n highlight: colorHelper.shade(dashboardColors.gossip, 15),\r\n label: 'Ad Campaigns',\r\n percentage: 17,\r\n order: 0,\r\n },\r\n ];\r\n\r\n var ctx = document.getElementById('chart-area').getContext('2d');\r\n window.myDoughnut = new Chart(ctx).Doughnut($scope.doughnutData, {\r\n segmentShowStroke: false,\r\n percentageInnerCutout : 64,\r\n responsive: true\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('trafficChart', trafficChart);\r\n\r\n /** @ngInject */\r\n function trafficChart() {\r\n return {\r\n restrict: 'E',\r\n controller: 'TrafficChartCtrl',\r\n templateUrl: 'app/pages/dashboard/trafficChart/trafficChart.html'\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .controller('WeatherCtrl', WeatherCtrl);\r\n\r\n /** @ngInject */\r\n function WeatherCtrl($scope, $http, $timeout, $element) {\r\n var url = 'http://api.openweathermap.org/data/2.5/forecast';\r\n var method = 'GET';\r\n var key = '2de143494c0b295cca9337e1e96b00e0';\r\n var middleOfTheDay = 15;\r\n $scope.units = 'metric';\r\n $scope.weatherIcons = {\r\n '01d': 'ion-ios-sunny-outline',\r\n '02d': 'ion-ios-partlysunny-outline',\r\n '03d': 'ion-ios-cloud-outline',\r\n '04d': 'ion-ios-cloud',\r\n '09d': 'ion-ios-rainy',\r\n '10d': 'ion-ios-rainy-outline',\r\n '11d': 'ion-ios-thunderstorm-outline',\r\n '13d': 'ion-ios-snowy',\r\n '50d': 'ion-ios-cloudy-outline',\r\n '01n': 'ion-ios-cloudy-night-outline',\r\n '02n': 'ion-ios-cloudy-night',\r\n '03n': 'ion-ios-cloud-outline',\r\n '04n': 'ion-ios-cloud',\r\n '09n': 'ion-ios-rainy',\r\n '10n': 'ion-ios-rainy-outline',\r\n '11n': 'ion-ios-thunderstorm',\r\n '13n': 'ion-ios-snowy',\r\n '50n': 'ion-ios-cloudy-outline'\r\n };\r\n $scope.weather = {};\r\n\r\n $scope.switchUnits = function (name) {\r\n $scope.units = name;\r\n $scope.updateWeather();\r\n };\r\n\r\n $scope.switchDay = function (day) {\r\n $scope.weather.current = day;\r\n makeChart($scope.weather.days[$scope.weather.current].timeTemp)\r\n };\r\n\r\n $scope.updateWeather = function () {\r\n $http({\r\n method: method, url: url, params: {\r\n appid: key,\r\n lat: $scope.geoData.geoplugin_latitude,\r\n lon: $scope.geoData.geoplugin_longitude,\r\n units: $scope.units\r\n }\r\n }).then(function success(response) {\r\n saveWeatherData(response.data);\r\n makeChart($scope.weather.days[$scope.weather.current].timeTemp)\r\n }, function error() {\r\n console.log(\"WEATHER FAILED\")\r\n });\r\n };\r\n\r\n function updateGeoData() {\r\n $http.jsonp('http://www.geoplugin.net/json.gp?jsoncallback=JSON_CALLBACK').then(function success(response) {\r\n $scope.geoData = response.data;\r\n $scope.updateWeather();\r\n }, function error() {\r\n console.log(\"GEO FAILED\")\r\n });\r\n }\r\n\r\n function makeChart(data) {\r\n AmCharts.makeChart('tempChart', {\r\n type: 'serial',\r\n theme: 'blur',\r\n handDrawn: true,\r\n categoryField: 'time',\r\n dataProvider: data,\r\n valueAxes: [\r\n {\r\n axisAlpha: 0.3,\r\n gridAlpha: 0\r\n }\r\n ],\r\n graphs: [\r\n {\r\n bullet: 'square',\r\n fillAlphas: 0.3,\r\n fillColorsField: 'lineColor',\r\n legendValueText: '[[value]]',\r\n lineColorField: 'lineColor',\r\n title: 'Temp',\r\n valueField: 'temp'\r\n }\r\n ],\r\n categoryAxis: {\r\n gridAlpha: 0,\r\n axisAlpha: 0.3\r\n }\r\n }).write('tempChart');\r\n }\r\n\r\n function saveWeatherData(data) {\r\n var firstItem = data.list[0];\r\n var weather = {\r\n days: [{\r\n date: new Date(),\r\n timeTemp: [],\r\n main: firstItem.weather[0].main,\r\n description: firstItem.weather[0].description,\r\n icon: firstItem.weather[0].icon,\r\n temp: firstItem.main.temp\r\n }], current: 0\r\n };\r\n data.list.forEach(function (item, i) {\r\n var itemDate = new Date(item.dt_txt);\r\n if (itemDate.getDate() !== weather.days[weather.days.length - 1].date.getDate()) {\r\n weather.days.push({date: itemDate, timeTemp: []});\r\n }\r\n var lastItem = weather.days[weather.days.length - 1];\r\n lastItem.timeTemp.push({\r\n time: itemDate.getHours(),\r\n temp: item.main.temp\r\n });\r\n if ((weather.days.length > 1 && itemDate.getHours() == middleOfTheDay) || i == data.list.length - 1) {\r\n lastItem.main = item.weather[0].main;\r\n lastItem.description = item.weather[0].description;\r\n lastItem.icon = item.weather[0].icon;\r\n lastItem.temp = item.main.temp;\r\n lastItem.date.setHours(i == data.list.length - 1 ? 0 : middleOfTheDay);\r\n lastItem.date.setMinutes(0);\r\n }\r\n });\r\n console.log(weather.days[weather.current].date);\r\n weather.days = weather.days.slice(0, $element.attr('forecast') || 5);\r\n $scope.weather = weather;\r\n }\r\n\r\n updateGeoData();\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.dashboard')\r\n .directive('weather', weather);\r\n\r\n /** @ngInject */\r\n function weather() {\r\n return {\r\n restrict: 'EA',\r\n controller: 'WeatherCtrl',\r\n templateUrl: 'app/pages/dashboard/weather/weather.html'\r\n };\r\n }\r\n})();\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .controller('WizardCtrl', WizardCtrl);\r\n\r\n /** @ngInject */\r\n function WizardCtrl($scope) {\r\n var vm = this;\r\n\r\n vm.personalInfo = {};\r\n vm.productInfo = {};\r\n vm.shipment = {};\r\n\r\n vm.arePersonalInfoPasswordsEqual = function () {\r\n return vm.personalInfo.confirmPassword && vm.personalInfo.password == vm.personalInfo.confirmPassword;\r\n };\r\n }\r\n\r\n})();\r\n\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.maps')\r\n .controller('GmapPageCtrl', GmapPageCtrl);\r\n\r\n /** @ngInject */\r\n function GmapPageCtrl($timeout) {\r\n function initialize() {\r\n var mapCanvas = document.getElementById('google-maps');\r\n var mapOptions = {\r\n center: new google.maps.LatLng(44.5403, -78.5463),\r\n zoom: 8,\r\n mapTypeId: google.maps.MapTypeId.ROADMAP\r\n };\r\n var map = new google.maps.Map(mapCanvas, mapOptions);\r\n }\r\n\r\n $timeout(function(){\r\n initialize();\r\n }, 100);\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.maps')\r\n .controller('LeafletPageCtrl', LeafletPageCtrl);\r\n\r\n /** @ngInject */\r\n function LeafletPageCtrl($timeout) {\r\n function initialize() {\r\n L.Icon.Default.imagePath = 'assets/img/theme/vendor/leaflet/dist/images';\r\n var map = L.map(document.getElementById('leaflet-map')).setView([51.505, -0.09], 13);\r\n L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\r\n attribution: '© OpenStreetMap contributors'\r\n }).addTo(map);\r\n\r\n L.marker([51.5, -0.09]).addTo(map)\r\n .bindPopup('A pretty CSS3 popup.
Easily customizable.')\r\n .openPopup();\r\n }\r\n\r\n $timeout(function(){\r\n initialize();\r\n }, 100);\r\n\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.maps')\r\n .controller('MapBubblePageCtrl', MapBubblePageCtrl);\r\n\r\n /** @ngInject */\r\n function MapBubblePageCtrl(baConfig, $timeout, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var latlong = {};\r\n latlong['AD'] = {'latitude': 42.5, 'longitude': 1.5};\r\n latlong['AE'] = {'latitude': 24, 'longitude': 54};\r\n latlong['AF'] = {'latitude': 33, 'longitude': 65};\r\n latlong['AG'] = {'latitude': 17.05, 'longitude': -61.8};\r\n latlong['AI'] = {'latitude': 18.25, 'longitude': -63.1667};\r\n latlong['AL'] = {'latitude': 41, 'longitude': 20};\r\n latlong['AM'] = {'latitude': 40, 'longitude': 45};\r\n latlong['AN'] = {'latitude': 12.25, 'longitude': -68.75};\r\n latlong['AO'] = {'latitude': -12.5, 'longitude': 18.5};\r\n latlong['AP'] = {'latitude': 35, 'longitude': 105};\r\n latlong['AQ'] = {'latitude': -90, 'longitude': 0};\r\n latlong['AR'] = {'latitude': -34, 'longitude': -64};\r\n latlong['AS'] = {'latitude': -14.3333, 'longitude': -170};\r\n latlong['AT'] = {'latitude': 47.3333, 'longitude': 13.3333};\r\n latlong['AU'] = {'latitude': -27, 'longitude': 133};\r\n latlong['AW'] = {'latitude': 12.5, 'longitude': -69.9667};\r\n latlong['AZ'] = {'latitude': 40.5, 'longitude': 47.5};\r\n latlong['BA'] = {'latitude': 44, 'longitude': 18};\r\n latlong['BB'] = {'latitude': 13.1667, 'longitude': -59.5333};\r\n latlong['BD'] = {'latitude': 24, 'longitude': 90};\r\n latlong['BE'] = {'latitude': 50.8333, 'longitude': 4};\r\n latlong['BF'] = {'latitude': 13, 'longitude': -2};\r\n latlong['BG'] = {'latitude': 43, 'longitude': 25};\r\n latlong['BH'] = {'latitude': 26, 'longitude': 50.55};\r\n latlong['BI'] = {'latitude': -3.5, 'longitude': 30};\r\n latlong['BJ'] = {'latitude': 9.5, 'longitude': 2.25};\r\n latlong['BM'] = {'latitude': 32.3333, 'longitude': -64.75};\r\n latlong['BN'] = {'latitude': 4.5, 'longitude': 114.6667};\r\n latlong['BO'] = {'latitude': -17, 'longitude': -65};\r\n latlong['BR'] = {'latitude': -10, 'longitude': -55};\r\n latlong['BS'] = {'latitude': 24.25, 'longitude': -76};\r\n latlong['BT'] = {'latitude': 27.5, 'longitude': 90.5};\r\n latlong['BV'] = {'latitude': -54.4333, 'longitude': 3.4};\r\n latlong['BW'] = {'latitude': -22, 'longitude': 24};\r\n latlong['BY'] = {'latitude': 53, 'longitude': 28};\r\n latlong['BZ'] = {'latitude': 17.25, 'longitude': -88.75};\r\n latlong['CA'] = {'latitude': 54, 'longitude': -100};\r\n latlong['CC'] = {'latitude': -12.5, 'longitude': 96.8333};\r\n latlong['CD'] = {'latitude': 0, 'longitude': 25};\r\n latlong['CF'] = {'latitude': 7, 'longitude': 21};\r\n latlong['CG'] = {'latitude': -1, 'longitude': 15};\r\n latlong['CH'] = {'latitude': 47, 'longitude': 8};\r\n latlong['CI'] = {'latitude': 8, 'longitude': -5};\r\n latlong['CK'] = {'latitude': -21.2333, 'longitude': -159.7667};\r\n latlong['CL'] = {'latitude': -30, 'longitude': -71};\r\n latlong['CM'] = {'latitude': 6, 'longitude': 12};\r\n latlong['CN'] = {'latitude': 35, 'longitude': 105};\r\n latlong['CO'] = {'latitude': 4, 'longitude': -72};\r\n latlong['CR'] = {'latitude': 10, 'longitude': -84};\r\n latlong['CU'] = {'latitude': 21.5, 'longitude': -80};\r\n latlong['CV'] = {'latitude': 16, 'longitude': -24};\r\n latlong['CX'] = {'latitude': -10.5, 'longitude': 105.6667};\r\n latlong['CY'] = {'latitude': 35, 'longitude': 33};\r\n latlong['CZ'] = {'latitude': 49.75, 'longitude': 15.5};\r\n latlong['DE'] = {'latitude': 51, 'longitude': 9};\r\n latlong['DJ'] = {'latitude': 11.5, 'longitude': 43};\r\n latlong['DK'] = {'latitude': 56, 'longitude': 10};\r\n latlong['DM'] = {'latitude': 15.4167, 'longitude': -61.3333};\r\n latlong['DO'] = {'latitude': 19, 'longitude': -70.6667};\r\n latlong['DZ'] = {'latitude': 28, 'longitude': 3};\r\n latlong['EC'] = {'latitude': -2, 'longitude': -77.5};\r\n latlong['EE'] = {'latitude': 59, 'longitude': 26};\r\n latlong['EG'] = {'latitude': 27, 'longitude': 30};\r\n latlong['EH'] = {'latitude': 24.5, 'longitude': -13};\r\n latlong['ER'] = {'latitude': 15, 'longitude': 39};\r\n latlong['ES'] = {'latitude': 40, 'longitude': -4};\r\n latlong['ET'] = {'latitude': 8, 'longitude': 38};\r\n latlong['EU'] = {'latitude': 47, 'longitude': 8};\r\n latlong['FI'] = {'latitude': 62, 'longitude': 26};\r\n latlong['FJ'] = {'latitude': -18, 'longitude': 175};\r\n latlong['FK'] = {'latitude': -51.75, 'longitude': -59};\r\n latlong['FM'] = {'latitude': 6.9167, 'longitude': 158.25};\r\n latlong['FO'] = {'latitude': 62, 'longitude': -7};\r\n latlong['FR'] = {'latitude': 46, 'longitude': 2};\r\n latlong['GA'] = {'latitude': -1, 'longitude': 11.75};\r\n latlong['GB'] = {'latitude': 54, 'longitude': -2};\r\n latlong['GD'] = {'latitude': 12.1167, 'longitude': -61.6667};\r\n latlong['GE'] = {'latitude': 42, 'longitude': 43.5};\r\n latlong['GF'] = {'latitude': 4, 'longitude': -53};\r\n latlong['GH'] = {'latitude': 8, 'longitude': -2};\r\n latlong['GI'] = {'latitude': 36.1833, 'longitude': -5.3667};\r\n latlong['GL'] = {'latitude': 72, 'longitude': -40};\r\n latlong['GM'] = {'latitude': 13.4667, 'longitude': -16.5667};\r\n latlong['GN'] = {'latitude': 11, 'longitude': -10};\r\n latlong['GP'] = {'latitude': 16.25, 'longitude': -61.5833};\r\n latlong['GQ'] = {'latitude': 2, 'longitude': 10};\r\n latlong['GR'] = {'latitude': 39, 'longitude': 22};\r\n latlong['GS'] = {'latitude': -54.5, 'longitude': -37};\r\n latlong['GT'] = {'latitude': 15.5, 'longitude': -90.25};\r\n latlong['GU'] = {'latitude': 13.4667, 'longitude': 144.7833};\r\n latlong['GW'] = {'latitude': 12, 'longitude': -15};\r\n latlong['GY'] = {'latitude': 5, 'longitude': -59};\r\n latlong['HK'] = {'latitude': 22.25, 'longitude': 114.1667};\r\n latlong['HM'] = {'latitude': -53.1, 'longitude': 72.5167};\r\n latlong['HN'] = {'latitude': 15, 'longitude': -86.5};\r\n latlong['HR'] = {'latitude': 45.1667, 'longitude': 15.5};\r\n latlong['HT'] = {'latitude': 19, 'longitude': -72.4167};\r\n latlong['HU'] = {'latitude': 47, 'longitude': 20};\r\n latlong['ID'] = {'latitude': -5, 'longitude': 120};\r\n latlong['IE'] = {'latitude': 53, 'longitude': -8};\r\n latlong['IL'] = {'latitude': 31.5, 'longitude': 34.75};\r\n latlong['IN'] = {'latitude': 20, 'longitude': 77};\r\n latlong['IO'] = {'latitude': -6, 'longitude': 71.5};\r\n latlong['IQ'] = {'latitude': 33, 'longitude': 44};\r\n latlong['IR'] = {'latitude': 32, 'longitude': 53};\r\n latlong['IS'] = {'latitude': 65, 'longitude': -18};\r\n latlong['IT'] = {'latitude': 42.8333, 'longitude': 12.8333};\r\n latlong['JM'] = {'latitude': 18.25, 'longitude': -77.5};\r\n latlong['JO'] = {'latitude': 31, 'longitude': 36};\r\n latlong['JP'] = {'latitude': 36, 'longitude': 138};\r\n latlong['KE'] = {'latitude': 1, 'longitude': 38};\r\n latlong['KG'] = {'latitude': 41, 'longitude': 75};\r\n latlong['KH'] = {'latitude': 13, 'longitude': 105};\r\n latlong['KI'] = {'latitude': 1.4167, 'longitude': 173};\r\n latlong['KM'] = {'latitude': -12.1667, 'longitude': 44.25};\r\n latlong['KN'] = {'latitude': 17.3333, 'longitude': -62.75};\r\n latlong['KP'] = {'latitude': 40, 'longitude': 127};\r\n latlong['KR'] = {'latitude': 37, 'longitude': 127.5};\r\n latlong['KW'] = {'latitude': 29.3375, 'longitude': 47.6581};\r\n latlong['KY'] = {'latitude': 19.5, 'longitude': -80.5};\r\n latlong['KZ'] = {'latitude': 48, 'longitude': 68};\r\n latlong['LA'] = {'latitude': 18, 'longitude': 105};\r\n latlong['LB'] = {'latitude': 33.8333, 'longitude': 35.8333};\r\n latlong['LC'] = {'latitude': 13.8833, 'longitude': -61.1333};\r\n latlong['LI'] = {'latitude': 47.1667, 'longitude': 9.5333};\r\n latlong['LK'] = {'latitude': 7, 'longitude': 81};\r\n latlong['LR'] = {'latitude': 6.5, 'longitude': -9.5};\r\n latlong['LS'] = {'latitude': -29.5, 'longitude': 28.5};\r\n latlong['LT'] = {'latitude': 55, 'longitude': 24};\r\n latlong['LU'] = {'latitude': 49.75, 'longitude': 6};\r\n latlong['LV'] = {'latitude': 57, 'longitude': 25};\r\n latlong['LY'] = {'latitude': 25, 'longitude': 17};\r\n latlong['MA'] = {'latitude': 32, 'longitude': -5};\r\n latlong['MC'] = {'latitude': 43.7333, 'longitude': 7.4};\r\n latlong['MD'] = {'latitude': 47, 'longitude': 29};\r\n latlong['ME'] = {'latitude': 42.5, 'longitude': 19.4};\r\n latlong['MG'] = {'latitude': -20, 'longitude': 47};\r\n latlong['MH'] = {'latitude': 9, 'longitude': 168};\r\n latlong['MK'] = {'latitude': 41.8333, 'longitude': 22};\r\n latlong['ML'] = {'latitude': 17, 'longitude': -4};\r\n latlong['MM'] = {'latitude': 22, 'longitude': 98};\r\n latlong['MN'] = {'latitude': 46, 'longitude': 105};\r\n latlong['MO'] = {'latitude': 22.1667, 'longitude': 113.55};\r\n latlong['MP'] = {'latitude': 15.2, 'longitude': 145.75};\r\n latlong['MQ'] = {'latitude': 14.6667, 'longitude': -61};\r\n latlong['MR'] = {'latitude': 20, 'longitude': -12};\r\n latlong['MS'] = {'latitude': 16.75, 'longitude': -62.2};\r\n latlong['MT'] = {'latitude': 35.8333, 'longitude': 14.5833};\r\n latlong['MU'] = {'latitude': -20.2833, 'longitude': 57.55};\r\n latlong['MV'] = {'latitude': 3.25, 'longitude': 73};\r\n latlong['MW'] = {'latitude': -13.5, 'longitude': 34};\r\n latlong['MX'] = {'latitude': 23, 'longitude': -102};\r\n latlong['MY'] = {'latitude': 2.5, 'longitude': 112.5};\r\n latlong['MZ'] = {'latitude': -18.25, 'longitude': 35};\r\n latlong['NA'] = {'latitude': -22, 'longitude': 17};\r\n latlong['NC'] = {'latitude': -21.5, 'longitude': 165.5};\r\n latlong['NE'] = {'latitude': 16, 'longitude': 8};\r\n latlong['NF'] = {'latitude': -29.0333, 'longitude': 167.95};\r\n latlong['NG'] = {'latitude': 10, 'longitude': 8};\r\n latlong['NI'] = {'latitude': 13, 'longitude': -85};\r\n latlong['NL'] = {'latitude': 52.5, 'longitude': 5.75};\r\n latlong['NO'] = {'latitude': 62, 'longitude': 10};\r\n latlong['NP'] = {'latitude': 28, 'longitude': 84};\r\n latlong['NR'] = {'latitude': -0.5333, 'longitude': 166.9167};\r\n latlong['NU'] = {'latitude': -19.0333, 'longitude': -169.8667};\r\n latlong['NZ'] = {'latitude': -41, 'longitude': 174};\r\n latlong['OM'] = {'latitude': 21, 'longitude': 57};\r\n latlong['PA'] = {'latitude': 9, 'longitude': -80};\r\n latlong['PE'] = {'latitude': -10, 'longitude': -76};\r\n latlong['PF'] = {'latitude': -15, 'longitude': -140};\r\n latlong['PG'] = {'latitude': -6, 'longitude': 147};\r\n latlong['PH'] = {'latitude': 13, 'longitude': 122};\r\n latlong['PK'] = {'latitude': 30, 'longitude': 70};\r\n latlong['PL'] = {'latitude': 52, 'longitude': 20};\r\n latlong['PM'] = {'latitude': 46.8333, 'longitude': -56.3333};\r\n latlong['PR'] = {'latitude': 18.25, 'longitude': -66.5};\r\n latlong['PS'] = {'latitude': 32, 'longitude': 35.25};\r\n latlong['PT'] = {'latitude': 39.5, 'longitude': -8};\r\n latlong['PW'] = {'latitude': 7.5, 'longitude': 134.5};\r\n latlong['PY'] = {'latitude': -23, 'longitude': -58};\r\n latlong['QA'] = {'latitude': 25.5, 'longitude': 51.25};\r\n latlong['RE'] = {'latitude': -21.1, 'longitude': 55.6};\r\n latlong['RO'] = {'latitude': 46, 'longitude': 25};\r\n latlong['RS'] = {'latitude': 44, 'longitude': 21};\r\n latlong['RU'] = {'latitude': 60, 'longitude': 100};\r\n latlong['RW'] = {'latitude': -2, 'longitude': 30};\r\n latlong['SA'] = {'latitude': 25, 'longitude': 45};\r\n latlong['SB'] = {'latitude': -8, 'longitude': 159};\r\n latlong['SC'] = {'latitude': -4.5833, 'longitude': 55.6667};\r\n latlong['SD'] = {'latitude': 15, 'longitude': 30};\r\n latlong['SE'] = {'latitude': 62, 'longitude': 15};\r\n latlong['SG'] = {'latitude': 1.3667, 'longitude': 103.8};\r\n latlong['SH'] = {'latitude': -15.9333, 'longitude': -5.7};\r\n latlong['SI'] = {'latitude': 46, 'longitude': 15};\r\n latlong['SJ'] = {'latitude': 78, 'longitude': 20};\r\n latlong['SK'] = {'latitude': 48.6667, 'longitude': 19.5};\r\n latlong['SL'] = {'latitude': 8.5, 'longitude': -11.5};\r\n latlong['SM'] = {'latitude': 43.7667, 'longitude': 12.4167};\r\n latlong['SN'] = {'latitude': 14, 'longitude': -14};\r\n latlong['SO'] = {'latitude': 10, 'longitude': 49};\r\n latlong['SR'] = {'latitude': 4, 'longitude': -56};\r\n latlong['ST'] = {'latitude': 1, 'longitude': 7};\r\n latlong['SV'] = {'latitude': 13.8333, 'longitude': -88.9167};\r\n latlong['SY'] = {'latitude': 35, 'longitude': 38};\r\n latlong['SZ'] = {'latitude': -26.5, 'longitude': 31.5};\r\n latlong['TC'] = {'latitude': 21.75, 'longitude': -71.5833};\r\n latlong['TD'] = {'latitude': 15, 'longitude': 19};\r\n latlong['TF'] = {'latitude': -43, 'longitude': 67};\r\n latlong['TG'] = {'latitude': 8, 'longitude': 1.1667};\r\n latlong['TH'] = {'latitude': 15, 'longitude': 100};\r\n latlong['TJ'] = {'latitude': 39, 'longitude': 71};\r\n latlong['TK'] = {'latitude': -9, 'longitude': -172};\r\n latlong['TM'] = {'latitude': 40, 'longitude': 60};\r\n latlong['TN'] = {'latitude': 34, 'longitude': 9};\r\n latlong['TO'] = {'latitude': -20, 'longitude': -175};\r\n latlong['TR'] = {'latitude': 39, 'longitude': 35};\r\n latlong['TT'] = {'latitude': 11, 'longitude': -61};\r\n latlong['TV'] = {'latitude': -8, 'longitude': 178};\r\n latlong['TW'] = {'latitude': 23.5, 'longitude': 121};\r\n latlong['TZ'] = {'latitude': -6, 'longitude': 35};\r\n latlong['UA'] = {'latitude': 49, 'longitude': 32};\r\n latlong['UG'] = {'latitude': 1, 'longitude': 32};\r\n latlong['UM'] = {'latitude': 19.2833, 'longitude': 166.6};\r\n latlong['US'] = {'latitude': 38, 'longitude': -97};\r\n latlong['UY'] = {'latitude': -33, 'longitude': -56};\r\n latlong['UZ'] = {'latitude': 41, 'longitude': 64};\r\n latlong['VA'] = {'latitude': 41.9, 'longitude': 12.45};\r\n latlong['VC'] = {'latitude': 13.25, 'longitude': -61.2};\r\n latlong['VE'] = {'latitude': 8, 'longitude': -66};\r\n latlong['VG'] = {'latitude': 18.5, 'longitude': -64.5};\r\n latlong['VI'] = {'latitude': 18.3333, 'longitude': -64.8333};\r\n latlong['VN'] = {'latitude': 16, 'longitude': 106};\r\n latlong['VU'] = {'latitude': -16, 'longitude': 167};\r\n latlong['WF'] = {'latitude': -13.3, 'longitude': -176.2};\r\n latlong['WS'] = {'latitude': -13.5833, 'longitude': -172.3333};\r\n latlong['YE'] = {'latitude': 15, 'longitude': 48};\r\n latlong['YT'] = {'latitude': -12.8333, 'longitude': 45.1667};\r\n latlong['ZA'] = {'latitude': -29, 'longitude': 24};\r\n latlong['ZM'] = {'latitude': -15, 'longitude': 30};\r\n latlong['ZW'] = {'latitude': -20, 'longitude': 30};\r\n\r\n var mapData = [\r\n {'code': 'AF', 'name': 'Afghanistan', 'value': 32358260, 'color': layoutColors.primaryDark},\r\n {'code': 'AL', 'name': 'Albania', 'value': 3215988, 'color': layoutColors.warning},\r\n {'code': 'DZ', 'name': 'Algeria', 'value': 35980193, 'color': layoutColors.danger},\r\n {'code': 'AO', 'name': 'Angola', 'value': 19618432, 'color': layoutColors.danger},\r\n {'code': 'AR', 'name': 'Argentina', 'value': 40764561, 'color': layoutColors.success},\r\n {'code': 'AM', 'name': 'Armenia', 'value': 3100236, 'color': layoutColors.warning},\r\n {'code': 'AU', 'name': 'Australia', 'value': 22605732, 'color': layoutColors.warningDark},\r\n {'code': 'AT', 'name': 'Austria', 'value': 8413429, 'color': layoutColors.warning},\r\n {'code': 'AZ', 'name': 'Azerbaijan', 'value': 9306023, 'color': layoutColors.warning},\r\n {'code': 'BH', 'name': 'Bahrain', 'value': 1323535, 'color': layoutColors.primaryDark},\r\n {'code': 'BD', 'name': 'Bangladesh', 'value': 150493658, 'color': layoutColors.primaryDark},\r\n {'code': 'BY', 'name': 'Belarus', 'value': 9559441, 'color': layoutColors.warning},\r\n {'code': 'BE', 'name': 'Belgium', 'value': 10754056, 'color': layoutColors.warning},\r\n {'code': 'BJ', 'name': 'Benin', 'value': 9099922, 'color': layoutColors.danger},\r\n {'code': 'BT', 'name': 'Bhutan', 'value': 738267, 'color': layoutColors.primaryDark},\r\n {'code': 'BO', 'name': 'Bolivia', 'value': 10088108, 'color': layoutColors.success},\r\n {'code': 'BA', 'name': 'Bosnia and Herzegovina', 'value': 3752228, 'color': layoutColors.warning},\r\n {'code': 'BW', 'name': 'Botswana', 'value': 2030738, 'color': layoutColors.danger},\r\n {'code': 'BR', 'name': 'Brazil', 'value': 196655014, 'color': layoutColors.success},\r\n {'code': 'BN', 'name': 'Brunei', 'value': 405938, 'color': layoutColors.primaryDark},\r\n {'code': 'BG', 'name': 'Bulgaria', 'value': 7446135, 'color': layoutColors.warning},\r\n {'code': 'BF', 'name': 'Burkina Faso', 'value': 16967845, 'color': layoutColors.danger},\r\n {'code': 'BI', 'name': 'Burundi', 'value': 8575172, 'color': layoutColors.danger},\r\n {'code': 'KH', 'name': 'Cambodia', 'value': 14305183, 'color': layoutColors.primaryDark},\r\n {'code': 'CM', 'name': 'Cameroon', 'value': 20030362, 'color': layoutColors.danger},\r\n {'code': 'CA', 'name': 'Canada', 'value': 34349561, 'color': layoutColors.primary},\r\n {'code': 'CV', 'name': 'Cape Verde', 'value': 500585, 'color': layoutColors.danger},\r\n {'code': 'CF', 'name': 'Central African Rep.', 'value': 4486837, 'color': layoutColors.danger},\r\n {'code': 'TD', 'name': 'Chad', 'value': 11525496, 'color': layoutColors.danger},\r\n {'code': 'CL', 'name': 'Chile', 'value': 17269525, 'color': layoutColors.success},\r\n {'code': 'CN', 'name': 'China', 'value': 1347565324, 'color': layoutColors.primaryDark},\r\n {'code': 'CO', 'name': 'Colombia', 'value': 46927125, 'color': layoutColors.success},\r\n {'code': 'KM', 'name': 'Comoros', 'value': 753943, 'color': layoutColors.danger},\r\n {'code': 'CD', 'name': 'Congo, Dem. Rep.', 'value': 67757577, 'color': layoutColors.danger},\r\n {'code': 'CG', 'name': 'Congo, Rep.', 'value': 4139748, 'color': layoutColors.danger},\r\n {'code': 'CR', 'name': 'Costa Rica', 'value': 4726575, 'color': layoutColors.primary},\r\n {'code': 'CI', 'name': 'Cote d\\'Ivoire', 'value': 20152894, 'color': layoutColors.danger},\r\n {'code': 'HR', 'name': 'Croatia', 'value': 4395560, 'color': layoutColors.warning},\r\n {'code': 'CU', 'name': 'Cuba', 'value': 11253665, 'color': layoutColors.primary},\r\n {'code': 'CY', 'name': 'Cyprus', 'value': 1116564, 'color': layoutColors.warning},\r\n {'code': 'CZ', 'name': 'Czech Rep.', 'value': 10534293, 'color': layoutColors.warning},\r\n {'code': 'DK', 'name': 'Denmark', 'value': 5572594, 'color': layoutColors.warning},\r\n {'code': 'DJ', 'name': 'Djibouti', 'value': 905564, 'color': layoutColors.danger},\r\n {'code': 'DO', 'name': 'Dominican Rep.', 'value': 10056181, 'color': layoutColors.primary},\r\n {'code': 'EC', 'name': 'Ecuador', 'value': 14666055, 'color': layoutColors.success},\r\n {'code': 'EG', 'name': 'Egypt', 'value': 82536770, 'color': layoutColors.danger},\r\n {'code': 'SV', 'name': 'El Salvador', 'value': 6227491, 'color': layoutColors.primary},\r\n {'code': 'GQ', 'name': 'Equatorial Guinea', 'value': 720213, 'color': layoutColors.danger},\r\n {'code': 'ER', 'name': 'Eritrea', 'value': 5415280, 'color': layoutColors.danger},\r\n {'code': 'EE', 'name': 'Estonia', 'value': 1340537, 'color': layoutColors.warning},\r\n {'code': 'ET', 'name': 'Ethiopia', 'value': 84734262, 'color': layoutColors.danger},\r\n {'code': 'FJ', 'name': 'Fiji', 'value': 868406, 'color': layoutColors.warningDark},\r\n {'code': 'FI', 'name': 'Finland', 'value': 5384770, 'color': layoutColors.warning},\r\n {'code': 'FR', 'name': 'France', 'value': 63125894, 'color': layoutColors.warning},\r\n {'code': 'GA', 'name': 'Gabon', 'value': 1534262, 'color': layoutColors.danger},\r\n {'code': 'GM', 'name': 'Gambia', 'value': 1776103, 'color': layoutColors.danger},\r\n {'code': 'GE', 'name': 'Georgia', 'value': 4329026, 'color': layoutColors.warning},\r\n {'code': 'DE', 'name': 'Germany', 'value': 82162512, 'color': layoutColors.warning},\r\n {'code': 'GH', 'name': 'Ghana', 'value': 24965816, 'color': layoutColors.danger},\r\n {'code': 'GR', 'name': 'Greece', 'value': 11390031, 'color': layoutColors.warning},\r\n {'code': 'GT', 'name': 'Guatemala', 'value': 14757316, 'color': layoutColors.primary},\r\n {'code': 'GN', 'name': 'Guinea', 'value': 10221808, 'color': layoutColors.danger},\r\n {'code': 'GW', 'name': 'Guinea-Bissau', 'value': 1547061, 'color': layoutColors.danger},\r\n {'code': 'GY', 'name': 'Guyana', 'value': 756040, 'color': layoutColors.success},\r\n {'code': 'HT', 'name': 'Haiti', 'value': 10123787, 'color': layoutColors.primary},\r\n {'code': 'HN', 'name': 'Honduras', 'value': 7754687, 'color': layoutColors.primary},\r\n {'code': 'HK', 'name': 'Hong Kong, China', 'value': 7122187, 'color': layoutColors.primaryDark},\r\n {'code': 'HU', 'name': 'Hungary', 'value': 9966116, 'color': layoutColors.warning},\r\n {'code': 'IS', 'name': 'Iceland', 'value': 324366, 'color': layoutColors.warning},\r\n {'code': 'IN', 'name': 'India', 'value': 1241491960, 'color': layoutColors.primaryDark},\r\n {'code': 'ID', 'name': 'Indonesia', 'value': 242325638, 'color': layoutColors.primaryDark},\r\n {'code': 'IR', 'name': 'Iran', 'value': 74798599, 'color': layoutColors.primaryDark},\r\n {'code': 'IQ', 'name': 'Iraq', 'value': 32664942, 'color': layoutColors.primaryDark},\r\n {'code': 'IE', 'name': 'Ireland', 'value': 4525802, 'color': layoutColors.warning},\r\n {'code': 'IL', 'name': 'Israel', 'value': 7562194, 'color': layoutColors.primaryDark},\r\n {'code': 'IT', 'name': 'Italy', 'value': 60788694, 'color': layoutColors.warning},\r\n {'code': 'JM', 'name': 'Jamaica', 'value': 2751273, 'color': layoutColors.primary},\r\n {'code': 'JP', 'name': 'Japan', 'value': 126497241, 'color': layoutColors.primaryDark},\r\n {'code': 'JO', 'name': 'Jordan', 'value': 6330169, 'color': layoutColors.primaryDark},\r\n {'code': 'KZ', 'name': 'Kazakhstan', 'value': 16206750, 'color': layoutColors.primaryDark},\r\n {'code': 'KE', 'name': 'Kenya', 'value': 41609728, 'color': layoutColors.danger},\r\n {'code': 'KP', 'name': 'Korea, Dem. Rep.', 'value': 24451285, 'color': layoutColors.primaryDark},\r\n {'code': 'KR', 'name': 'Korea, Rep.', 'value': 48391343, 'color': layoutColors.primaryDark},\r\n {'code': 'KW', 'name': 'Kuwait', 'value': 2818042, 'color': layoutColors.primaryDark},\r\n {'code': 'KG', 'name': 'Kyrgyzstan', 'value': 5392580, 'color': layoutColors.primaryDark},\r\n {'code': 'LA', 'name': 'Laos', 'value': 6288037, 'color': layoutColors.primaryDark},\r\n {'code': 'LV', 'name': 'Latvia', 'value': 2243142, 'color': layoutColors.warning},\r\n {'code': 'LB', 'name': 'Lebanon', 'value': 4259405, 'color': layoutColors.primaryDark},\r\n {'code': 'LS', 'name': 'Lesotho', 'value': 2193843, 'color': layoutColors.danger},\r\n {'code': 'LR', 'name': 'Liberia', 'value': 4128572, 'color': layoutColors.danger},\r\n {'code': 'LY', 'name': 'Libya', 'value': 6422772, 'color': layoutColors.danger},\r\n {'code': 'LT', 'name': 'Lithuania', 'value': 3307481, 'color': layoutColors.warning},\r\n {'code': 'LU', 'name': 'Luxembourg', 'value': 515941, 'color': layoutColors.warning},\r\n {'code': 'MK', 'name': 'Macedonia, FYR', 'value': 2063893, 'color': layoutColors.warning},\r\n {'code': 'MG', 'name': 'Madagascar', 'value': 21315135, 'color': layoutColors.danger},\r\n {'code': 'MW', 'name': 'Malawi', 'value': 15380888, 'color': layoutColors.danger},\r\n {'code': 'MY', 'name': 'Malaysia', 'value': 28859154, 'color': layoutColors.primaryDark},\r\n {'code': 'ML', 'name': 'Mali', 'value': 15839538, 'color': layoutColors.danger},\r\n {'code': 'MR', 'name': 'Mauritania', 'value': 3541540, 'color': layoutColors.danger},\r\n {'code': 'MU', 'name': 'Mauritius', 'value': 1306593, 'color': layoutColors.danger},\r\n {'code': 'MX', 'name': 'Mexico', 'value': 114793341, 'color': layoutColors.primary},\r\n {'code': 'MD', 'name': 'Moldova', 'value': 3544864, 'color': layoutColors.warning},\r\n {'code': 'MN', 'name': 'Mongolia', 'value': 2800114, 'color': layoutColors.primaryDark},\r\n {'code': 'ME', 'name': 'Montenegro', 'value': 632261, 'color': layoutColors.warning},\r\n {'code': 'MA', 'name': 'Morocco', 'value': 32272974, 'color': layoutColors.danger},\r\n {'code': 'MZ', 'name': 'Mozambique', 'value': 23929708, 'color': layoutColors.danger},\r\n {'code': 'MM', 'name': 'Myanmar', 'value': 48336763, 'color': layoutColors.primaryDark},\r\n {'code': 'NA', 'name': 'Namibia', 'value': 2324004, 'color': layoutColors.danger},\r\n {'code': 'NP', 'name': 'Nepal', 'value': 30485798, 'color': layoutColors.primaryDark},\r\n {'code': 'NL', 'name': 'Netherlands', 'value': 16664746, 'color': layoutColors.warning},\r\n {'code': 'NZ', 'name': 'New Zealand', 'value': 4414509, 'color': layoutColors.warningDark},\r\n {'code': 'NI', 'name': 'Nicaragua', 'value': 5869859, 'color': layoutColors.primary},\r\n {'code': 'NE', 'name': 'Niger', 'value': 16068994, 'color': layoutColors.danger},\r\n {'code': 'NG', 'name': 'Nigeria', 'value': 162470737, 'color': layoutColors.danger},\r\n {'code': 'NO', 'name': 'Norway', 'value': 4924848, 'color': layoutColors.warning},\r\n {'code': 'OM', 'name': 'Oman', 'value': 2846145, 'color': layoutColors.primaryDark},\r\n {'code': 'PK', 'name': 'Pakistan', 'value': 176745364, 'color': layoutColors.primaryDark},\r\n {'code': 'PA', 'name': 'Panama', 'value': 3571185, 'color': layoutColors.primary},\r\n {'code': 'PG', 'name': 'Papua New Guinea', 'value': 7013829, 'color': layoutColors.warningDark},\r\n {'code': 'PY', 'name': 'Paraguay', 'value': 6568290, 'color': layoutColors.success},\r\n {'code': 'PE', 'name': 'Peru', 'value': 29399817, 'color': layoutColors.success},\r\n {'code': 'PH', 'name': 'Philippines', 'value': 94852030, 'color': layoutColors.primaryDark},\r\n {'code': 'PL', 'name': 'Poland', 'value': 38298949, 'color': layoutColors.warning},\r\n {'code': 'PT', 'name': 'Portugal', 'value': 10689663, 'color': layoutColors.warning},\r\n {'code': 'PR', 'name': 'Puerto Rico', 'value': 3745526, 'color': layoutColors.primary},\r\n {'code': 'QA', 'name': 'Qatar', 'value': 1870041, 'color': layoutColors.primaryDark},\r\n {'code': 'RO', 'name': 'Romania', 'value': 21436495, 'color': layoutColors.warning},\r\n {'code': 'RU', 'name': 'Russia', 'value': 142835555, 'color': layoutColors.warning},\r\n {'code': 'RW', 'name': 'Rwanda', 'value': 10942950, 'color': layoutColors.danger},\r\n {'code': 'SA', 'name': 'Saudi Arabia', 'value': 28082541, 'color': layoutColors.primaryDark},\r\n {'code': 'SN', 'name': 'Senegal', 'value': 12767556, 'color': layoutColors.danger},\r\n {'code': 'RS', 'name': 'Serbia', 'value': 9853969, 'color': layoutColors.warning},\r\n {'code': 'SL', 'name': 'Sierra Leone', 'value': 5997486, 'color': layoutColors.danger},\r\n {'code': 'SG', 'name': 'Singapore', 'value': 5187933, 'color': layoutColors.primaryDark},\r\n {'code': 'SK', 'name': 'Slovak Republic', 'value': 5471502, 'color': layoutColors.warning},\r\n {'code': 'SI', 'name': 'Slovenia', 'value': 2035012, 'color': layoutColors.warning},\r\n {'code': 'SB', 'name': 'Solomon Islands', 'value': 552267, 'color': layoutColors.warningDark},\r\n {'code': 'SO', 'name': 'Somalia', 'value': 9556873, 'color': layoutColors.danger},\r\n {'code': 'ZA', 'name': 'South Africa', 'value': 50459978, 'color': layoutColors.danger},\r\n {'code': 'ES', 'name': 'Spain', 'value': 46454895, 'color': layoutColors.warning},\r\n {'code': 'LK', 'name': 'Sri Lanka', 'value': 21045394, 'color': layoutColors.primaryDark},\r\n {'code': 'SD', 'name': 'Sudan', 'value': 34735288, 'color': layoutColors.danger},\r\n {'code': 'SR', 'name': 'Suriname', 'value': 529419, 'color': layoutColors.success},\r\n {'code': 'SZ', 'name': 'Swaziland', 'value': 1203330, 'color': layoutColors.danger},\r\n {'code': 'SE', 'name': 'Sweden', 'value': 9440747, 'color': layoutColors.warning},\r\n {'code': 'CH', 'name': 'Switzerland', 'value': 7701690, 'color': layoutColors.warning},\r\n {'code': 'SY', 'name': 'Syria', 'value': 20766037, 'color': layoutColors.primaryDark},\r\n {'code': 'TW', 'name': 'Taiwan', 'value': 23072000, 'color': layoutColors.primaryDark},\r\n {'code': 'TJ', 'name': 'Tajikistan', 'value': 6976958, 'color': layoutColors.primaryDark},\r\n {'code': 'TZ', 'name': 'Tanzania', 'value': 46218486, 'color': layoutColors.danger},\r\n {'code': 'TH', 'name': 'Thailand', 'value': 69518555, 'color': layoutColors.primaryDark},\r\n {'code': 'TG', 'name': 'Togo', 'value': 6154813, 'color': layoutColors.danger},\r\n {'code': 'TT', 'name': 'Trinidad and Tobago', 'value': 1346350, 'color': layoutColors.primary},\r\n {'code': 'TN', 'name': 'Tunisia', 'value': 10594057, 'color': layoutColors.danger},\r\n {'code': 'TR', 'name': 'Turkey', 'value': 73639596, 'color': layoutColors.warning},\r\n {'code': 'TM', 'name': 'Turkmenistan', 'value': 5105301, 'color': layoutColors.primaryDark},\r\n {'code': 'UG', 'name': 'Uganda', 'value': 34509205, 'color': layoutColors.danger},\r\n {'code': 'UA', 'name': 'Ukraine', 'value': 45190180, 'color': layoutColors.warning},\r\n {'code': 'AE', 'name': 'United Arab Emirates', 'value': 7890924, 'color': layoutColors.primaryDark},\r\n {'code': 'GB', 'name': 'United Kingdom', 'value': 62417431, 'color': layoutColors.warning},\r\n {'code': 'US', 'name': 'United States', 'value': 313085380, 'color': layoutColors.primary},\r\n {'code': 'UY', 'name': 'Uruguay', 'value': 3380008, 'color': layoutColors.success},\r\n {'code': 'UZ', 'name': 'Uzbekistan', 'value': 27760267, 'color': layoutColors.primaryDark},\r\n {'code': 'VE', 'name': 'Venezuela', 'value': 29436891, 'color': layoutColors.success},\r\n {'code': 'PS', 'name': 'West Bank and Gaza', 'value': 4152369, 'color': layoutColors.primaryDark},\r\n {'code': 'VN', 'name': 'Vietnam', 'value': 88791996, 'color': layoutColors.primaryDark},\r\n {'code': 'YE', 'name': 'Yemen, Rep.', 'value': 24799880, 'color': layoutColors.primaryDark},\r\n {'code': 'ZM', 'name': 'Zambia', 'value': 13474959, 'color': layoutColors.danger},\r\n {'code': 'ZW', 'name': 'Zimbabwe', 'value': 12754378, 'color': layoutColors.danger}\r\n ];\r\n\r\n var map;\r\n var minBulletSize = 3;\r\n var maxBulletSize = 70;\r\n var min = Infinity;\r\n var max = -Infinity;\r\n\r\n // get min and max values\r\n for (var i = 0; i < mapData.length; i++) {\r\n var value = mapData[i].value;\r\n if (value < min) {\r\n min = value;\r\n }\r\n if (value > max) {\r\n max = value;\r\n }\r\n }\r\n\r\n // build map\r\n AmCharts.theme = AmCharts.themes.blur;\r\n map = new AmCharts.AmMap();\r\n\r\n map.addTitle('Population of the World in 2011', 14);\r\n map.addTitle('source: Gapminder', 11);\r\n map.areasSettings = {\r\n unlistedAreasColor: '#000000',\r\n unlistedAreasAlpha: 0.1\r\n };\r\n map.imagesSettings.balloonText = '[[title]]: [[value]]';\r\n map.pathToImages = layoutPaths.images.amMap;\r\n\r\n var dataProvider = {\r\n mapVar: AmCharts.maps.worldLow,\r\n images: []\r\n };\r\n\r\n // it's better to use circle square to show difference between values, not a radius\r\n var maxSquare = maxBulletSize * maxBulletSize * 2 * Math.PI;\r\n var minSquare = minBulletSize * minBulletSize * 2 * Math.PI;\r\n\r\n // create circle for each country\r\n for (var i = 0; i < mapData.length; i++) {\r\n var dataItem = mapData[i];\r\n var value = dataItem.value;\r\n // calculate size of a bubble\r\n var square = (value - min) / (max - min) * (maxSquare - minSquare) + minSquare;\r\n if (square < minSquare) {\r\n square = minSquare;\r\n }\r\n var size = Math.sqrt(square / (Math.PI * 2));\r\n var id = dataItem.code;\r\n\r\n dataProvider.images.push({\r\n type: 'circle',\r\n width: size,\r\n height: size,\r\n color: dataItem.color,\r\n longitude: latlong[id].longitude,\r\n latitude: latlong[id].latitude,\r\n title: dataItem.name,\r\n value: value\r\n });\r\n }\r\n\r\n map.dataProvider = dataProvider;\r\n map.export = {\r\n enabled: true\r\n };\r\n\r\n $timeout(function() {\r\n map.write('map-bubbles');\r\n }, 100);\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.maps')\r\n .controller('MapLinesPageCtrl', MapLinesPageCtrl);\r\n\r\n /** @ngInject */\r\n function MapLinesPageCtrl(baConfig, $timeout, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n // svg path for target icon\r\n var targetSVG = 'M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z';\r\n// svg path for plane icon\r\n var planeSVG = 'M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z';\r\n $timeout(function() {\r\n var map = AmCharts.makeChart( 'map-lines', {\r\n type: 'map',\r\n theme: 'blur',\r\n dataProvider: {\r\n map: 'worldLow',\r\n linkToObject: 'london',\r\n images: [ {\r\n id: 'london',\r\n svgPath: targetSVG,\r\n title: 'London',\r\n latitude: 51.5002,\r\n longitude: -0.1262,\r\n scale: 1.5,\r\n zoomLevel: 2.74,\r\n zoomLongitude: -20.1341,\r\n zoomLatitude: 49.1712,\r\n\r\n lines: [ {\r\n latitudes: [ 51.5002, 50.4422 ],\r\n longitudes: [ -0.1262, 30.5367 ]\r\n }, {\r\n latitudes: [ 51.5002, 46.9480 ],\r\n longitudes: [ -0.1262, 7.4481 ]\r\n }, {\r\n latitudes: [ 51.5002, 59.3328 ],\r\n longitudes: [ -0.1262, 18.0645 ]\r\n }, {\r\n latitudes: [ 51.5002, 40.4167 ],\r\n longitudes: [ -0.1262, -3.7033 ]\r\n }, {\r\n latitudes: [ 51.5002, 46.0514 ],\r\n longitudes: [ -0.1262, 14.5060 ]\r\n }, {\r\n latitudes: [ 51.5002, 48.2116 ],\r\n longitudes: [ -0.1262, 17.1547 ]\r\n }, {\r\n latitudes: [ 51.5002, 44.8048 ],\r\n longitudes: [ -0.1262, 20.4781 ]\r\n }, {\r\n latitudes: [ 51.5002, 55.7558 ],\r\n longitudes: [ -0.1262, 37.6176 ]\r\n }, {\r\n latitudes: [ 51.5002, 38.7072 ],\r\n longitudes: [ -0.1262, -9.1355 ]\r\n }, {\r\n latitudes: [ 51.5002, 54.6896 ],\r\n longitudes: [ -0.1262, 25.2799 ]\r\n }, {\r\n latitudes: [ 51.5002, 64.1353 ],\r\n longitudes: [ -0.1262, -21.8952 ]\r\n }, {\r\n latitudes: [ 51.5002, 40.4300 ],\r\n longitudes: [ -0.1262, -74.0000 ]\r\n } ],\r\n\r\n images: [ {\r\n label: 'Flights from London',\r\n svgPath: planeSVG,\r\n left: 100,\r\n top: 45,\r\n labelShiftY: 5,\r\n labelShiftX: 5,\r\n color: layoutColors.defaultText,\r\n labelColor: layoutColors.defaultText,\r\n labelRollOverColor: layoutColors.defaultText,\r\n labelFontSize: 20\r\n }, {\r\n label: 'show flights from Vilnius',\r\n left: 106,\r\n top: 70,\r\n labelColor: layoutColors.defaultText,\r\n labelRollOverColor: layoutColors.defaultText,\r\n labelFontSize: 11,\r\n linkToObject: 'vilnius'\r\n } ]\r\n },\r\n\r\n {\r\n id: 'vilnius',\r\n svgPath: targetSVG,\r\n title: 'Vilnius',\r\n latitude: 54.6896,\r\n longitude: 25.2799,\r\n scale: 1.5,\r\n zoomLevel: 4.92,\r\n zoomLongitude: 15.4492,\r\n zoomLatitude: 50.2631,\r\n\r\n lines: [ {\r\n latitudes: [ 54.6896, 50.8371 ],\r\n longitudes: [ 25.2799, 4.3676 ]\r\n }, {\r\n latitudes: [ 54.6896, 59.9138 ],\r\n longitudes: [ 25.2799, 10.7387 ]\r\n }, {\r\n latitudes: [ 54.6896, 40.4167 ],\r\n longitudes: [ 25.2799, -3.7033 ]\r\n }, {\r\n latitudes: [ 54.6896, 50.0878 ],\r\n longitudes: [ 25.2799, 14.4205 ]\r\n }, {\r\n latitudes: [ 54.6896, 48.2116 ],\r\n longitudes: [ 25.2799, 17.1547 ]\r\n }, {\r\n latitudes: [ 54.6896, 44.8048 ],\r\n longitudes: [ 25.2799, 20.4781 ]\r\n }, {\r\n latitudes: [ 54.6896, 55.7558 ],\r\n longitudes: [ 25.2799, 37.6176 ]\r\n }, {\r\n latitudes: [ 54.6896, 37.9792 ],\r\n longitudes: [ 25.2799, 23.7166 ]\r\n }, {\r\n latitudes: [ 54.6896, 54.6896 ],\r\n longitudes: [ 25.2799, 25.2799 ]\r\n }, {\r\n latitudes: [ 54.6896, 51.5002 ],\r\n longitudes: [ 25.2799, -0.1262 ]\r\n }, {\r\n latitudes: [ 54.6896, 53.3441 ],\r\n longitudes: [ 25.2799, -6.2675 ]\r\n } ],\r\n\r\n images: [ {\r\n label: 'Flights from Vilnius',\r\n svgPath: planeSVG,\r\n left: 100,\r\n top: 45,\r\n labelShiftY: 5,\r\n labelShiftX: 5,\r\n color: layoutColors.defaultText,\r\n labelColor: layoutColors.defaultText,\r\n labelRollOverColor: layoutColors.defaultText,\r\n labelFontSize: 20\r\n }, {\r\n label: 'show flights from London',\r\n left: 106,\r\n top: 70,\r\n labelColor: layoutColors.defaultText,\r\n labelRollOverColor: layoutColors.defaultText,\r\n labelFontSize: 11,\r\n linkToObject: 'london'\r\n } ]\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Brussels',\r\n latitude: 50.8371,\r\n longitude: 4.3676\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Prague',\r\n latitude: 50.0878,\r\n longitude: 14.4205\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Athens',\r\n latitude: 37.9792,\r\n longitude: 23.7166\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Reykjavik',\r\n latitude: 64.1353,\r\n longitude: -21.8952\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Dublin',\r\n latitude: 53.3441,\r\n longitude: -6.2675\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Oslo',\r\n latitude: 59.9138,\r\n longitude: 10.7387\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Lisbon',\r\n latitude: 38.7072,\r\n longitude: -9.1355\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Moscow',\r\n latitude: 55.7558,\r\n longitude: 37.6176\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Belgrade',\r\n latitude: 44.8048,\r\n longitude: 20.4781\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Bratislava',\r\n latitude: 48.2116,\r\n longitude: 17.1547\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Ljubljana',\r\n latitude: 46.0514,\r\n longitude: 14.5060\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Madrid',\r\n latitude: 40.4167,\r\n longitude: -3.7033\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Stockholm',\r\n latitude: 59.3328,\r\n longitude: 18.0645\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Bern',\r\n latitude: 46.9480,\r\n longitude: 7.4481\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Kiev',\r\n latitude: 50.4422,\r\n longitude: 30.5367\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'Paris',\r\n latitude: 48.8567,\r\n longitude: 2.3510\r\n }, {\r\n svgPath: targetSVG,\r\n title: 'New York',\r\n latitude: 40.43,\r\n longitude: -74\r\n }\r\n ]\r\n },\r\n\r\n areasSettings: {\r\n unlistedAreasColor: layoutColors.info\r\n },\r\n\r\n imagesSettings: {\r\n color: layoutColors.warningLight,\r\n selectedColor: layoutColors.warning\r\n },\r\n\r\n linesSettings: {\r\n color: layoutColors.warningLight,\r\n alpha: 0.8\r\n },\r\n\r\n\r\n backgroundZoomsToTop: true,\r\n linesAboveImages: true,\r\n\r\n export: {\r\n 'enabled': true\r\n },\r\n pathToImages: layoutPaths.images.amMap\r\n } );\r\n }, 100);\r\n\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.buttons')\r\n .controller('ButtonPageCtrl', ButtonPageCtrl);\r\n\r\n /** @ngInject */\r\n function ButtonPageCtrl($scope, $timeout) {\r\n $scope.progressFunction = function() {\r\n return $timeout(function() {}, 3000);\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.icons')\r\n .controller('IconsPageCtrl', IconsPageCtrl);\r\n\r\n /** @ngInject */\r\n function IconsPageCtrl($scope) {\r\n $scope.icons = {\r\n kameleonIcons: [\r\n {\r\n name: 'Beach',\r\n img: 'Beach'\r\n },\r\n {\r\n name: 'Bus',\r\n img: 'Bus'\r\n },\r\n {\r\n name: 'Cheese',\r\n img: 'Cheese'\r\n },\r\n {\r\n name: 'Desert',\r\n img: 'Desert'\r\n },\r\n {\r\n name: 'Images',\r\n img: 'Images'\r\n },\r\n {\r\n name: 'Magician',\r\n img: 'Magician'\r\n },\r\n {\r\n name: 'Makeup',\r\n img: 'Makeup'\r\n },\r\n {\r\n name: 'Programming',\r\n img: 'Programming'\r\n },\r\n {\r\n name: 'Shop',\r\n img: 'Shop'\r\n },\r\n {\r\n name: 'Surfer',\r\n img: 'Surfer'\r\n },\r\n {\r\n name: 'Phone Booth',\r\n img: 'Phone-Booth'\r\n },\r\n {\r\n name: 'Ninja',\r\n img: 'Ninja'\r\n },\r\n {\r\n name: 'Apartment',\r\n img: 'Apartment'\r\n },\r\n {\r\n name: 'Batman',\r\n img: 'Batman'\r\n },\r\n {\r\n name: 'Medal',\r\n img: 'Medal-2'\r\n },\r\n {\r\n name: 'Money',\r\n img: 'Money-Increase'\r\n },\r\n {\r\n name: 'Street View',\r\n img: 'Street-View'\r\n },\r\n {\r\n name: 'Student',\r\n img: 'Student-3'\r\n },\r\n {\r\n name: 'Bell',\r\n img: 'Bell'\r\n },\r\n {\r\n name: 'Woman',\r\n img: 'Boss-5'\r\n },\r\n {\r\n name: 'Euro',\r\n img: 'Euro-Coin'\r\n },\r\n {\r\n name: 'Chessboard',\r\n img: 'Chessboard'\r\n },\r\n {\r\n name: 'Burglar',\r\n img: 'Burglar'\r\n },\r\n {\r\n name: 'Dna',\r\n img: 'Dna'\r\n },\r\n {\r\n name: 'Clipboard Plan',\r\n img: 'Clipboard-Plan'\r\n },\r\n {\r\n name: 'Boss',\r\n img: 'Boss-3'\r\n },\r\n {\r\n name: 'Key',\r\n img: 'Key'\r\n },\r\n {\r\n name: 'Surgeon',\r\n img: 'Surgeon'\r\n },\r\n {\r\n name: 'Hacker',\r\n img: 'Hacker'\r\n },\r\n {\r\n name: 'Santa',\r\n img: 'Santa'\r\n }\r\n ],\r\n kameleonRoundedIcons: [\r\n {\r\n color: 'success',\r\n img: 'Apartment',\r\n name: 'Apartment'\r\n },\r\n {\r\n color: 'warning',\r\n img: 'Bus',\r\n name: 'Bus'\r\n },\r\n {\r\n color: 'primary',\r\n img: 'Checklist',\r\n name: 'Checklist'\r\n },\r\n {\r\n color: 'warning',\r\n img: 'Desert',\r\n name: 'Desert'\r\n },\r\n {\r\n color: 'danger',\r\n img: 'Laptop-Signal',\r\n name: 'Laptop Signal'\r\n },\r\n {\r\n color: 'info',\r\n img: 'Love-Letter',\r\n name: 'Love Letter'\r\n },\r\n {\r\n color: 'success',\r\n img: 'Makeup',\r\n name: 'Makeup'\r\n },\r\n {\r\n color: 'primary',\r\n img: 'Santa',\r\n name: 'Santa'\r\n },\r\n {\r\n color: 'success',\r\n img: 'Surfer',\r\n name: 'Surfer'\r\n },\r\n {\r\n color: 'info',\r\n img: 'Vector',\r\n name: 'Vector'\r\n },\r\n {\r\n color: 'warning',\r\n img: 'Money-Increase',\r\n name: 'Money Increase'\r\n },\r\n {\r\n color: 'info',\r\n img: 'Alien',\r\n name: 'Alien'\r\n },\r\n {\r\n color: 'danger',\r\n img: 'Online-Shopping',\r\n name: 'Online Shopping'\r\n },\r\n {\r\n color: 'warning',\r\n img: 'Euro-Coin',\r\n name: 'Euro'\r\n },\r\n {\r\n color: 'info',\r\n img: 'Boss-3',\r\n name: 'Boss'\r\n }\r\n ],\r\n ionicons: ['ion-ionic', 'ion-arrow-right-b', 'ion-arrow-down-b', 'ion-arrow-left-b', 'ion-arrow-up-c', 'ion-arrow-right-c', 'ion-arrow-down-c', 'ion-arrow-left-c', 'ion-arrow-return-right', 'ion-arrow-return-left', 'ion-arrow-swap', 'ion-arrow-shrink', 'ion-arrow-expand', 'ion-arrow-move', 'ion-arrow-resize', 'ion-chevron-up', 'ion-chevron-right', 'ion-chevron-down', 'ion-chevron-left', 'ion-navicon-round', 'ion-navicon', 'ion-drag', 'ion-log-in', 'ion-log-out', 'ion-checkmark-round', 'ion-checkmark', 'ion-checkmark-circled', 'ion-close-round', 'ion-plus-round', 'ion-minus-round', 'ion-information', 'ion-help', 'ion-backspace-outline', 'ion-help-buoy', 'ion-asterisk', 'ion-alert', 'ion-alert-circled', 'ion-refresh', 'ion-loop', 'ion-shuffle', 'ion-home', 'ion-search', 'ion-flag', 'ion-star', 'ion-heart', 'ion-heart-broken', 'ion-gear-a', 'ion-gear-b', 'ion-toggle-filled', 'ion-toggle', 'ion-settings', 'ion-wrench', 'ion-hammer', 'ion-edit', 'ion-trash-a', 'ion-trash-b', 'ion-document', 'ion-document-text', 'ion-clipboard', 'ion-scissors', 'ion-funnel', 'ion-bookmark', 'ion-email', 'ion-email-unread', 'ion-folder', 'ion-filing', 'ion-archive', 'ion-reply', 'ion-reply-all', 'ion-forward'],\r\n fontAwesomeIcons: ['fa fa-adjust', 'fa fa-anchor', 'fa fa-archive', 'fa fa-area-chart', 'fa fa-arrows', 'fa fa-arrows-h', 'fa fa-arrows-v', 'fa fa-asterisk', 'fa fa-at', 'fa fa-automobile', 'fa fa-ban', 'fa fa-bank', 'fa fa-bar-chart', 'fa fa-bar-chart-o', 'fa fa-barcode', 'fa fa-bars', 'fa fa-bed', 'fa fa-beer', 'fa fa-bell', 'fa fa-bell-o', 'fa fa-bell-slash', 'fa fa-bell-slash-o', 'fa fa-bicycle', 'fa fa-binoculars', 'fa fa-birthday-cake', 'fa fa-bolt', 'fa fa-bomb', 'fa fa-book', 'fa fa-bookmark', 'fa fa-bookmark-o', 'fa fa-briefcase', 'fa fa-bug', 'fa fa-building', 'fa fa-building-o', 'fa fa-bullhorn'],\r\n socicon: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', ',', ';', ':', '+', '@', '=', '-', '^', '?', '$', '*', '&', '(', '#', '.', '_', ']', ')', '\\'', '\"', '}', '{']\r\n }\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 18.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.notifications')\r\n .controller('ModalsPageCtrl', ModalsPageCtrl);\r\n\r\n /** @ngInject */\r\n function ModalsPageCtrl($scope, $uibModal) {\r\n $scope.open = function (page, size) {\r\n $uibModal.open({\r\n animation: true,\r\n templateUrl: page,\r\n size: size,\r\n resolve: {\r\n items: function () {\r\n return $scope.items;\r\n }\r\n }\r\n });\r\n };\r\n }\r\n\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.notifications')\r\n .controller('NotificationsPageCtrl', NotificationsPageCtrl);\r\n\r\n /** @ngInject */\r\n function NotificationsPageCtrl($scope, toastr, toastrConfig) {\r\n var defaultConfig = angular.copy(toastrConfig);\r\n $scope.types = ['success', 'error', 'info', 'warning'];\r\n\r\n $scope.quotes = [\r\n {\r\n title: 'Come to Freenode',\r\n message: 'We rock at #angularjs',\r\n options: {\r\n allowHtml: true\r\n }\r\n },\r\n {\r\n title: 'Looking for bootstrap?',\r\n message: 'Try ui-bootstrap out!'\r\n },\r\n {\r\n title: 'Wants a better router?',\r\n message: 'We have you covered with ui-router'\r\n },\r\n {\r\n title: 'Angular 2',\r\n message: 'Is gonna rock the world'\r\n },\r\n {\r\n title: null,\r\n message: 'Titles are not always needed'\r\n },\r\n {\r\n title: null,\r\n message: 'Toastr rock!'\r\n },\r\n {\r\n title: 'What about nice html?',\r\n message: 'Sure you can!',\r\n options: {\r\n allowHtml: true\r\n }\r\n },\r\n {\r\n title: 'Ionic is cool',\r\n message: 'Best mobile framework ever',\r\n options: {\r\n allowHtml: true\r\n }\r\n }\r\n ];\r\n\r\n var openedToasts = [];\r\n $scope.options = {\r\n autoDismiss: false,\r\n positionClass: 'toast-top-right',\r\n type: 'info',\r\n timeOut: '5000',\r\n extendedTimeOut: '2000',\r\n allowHtml: false,\r\n closeButton: false,\r\n tapToDismiss: true,\r\n progressBar: false,\r\n newestOnTop: true,\r\n maxOpened: 0,\r\n preventDuplicates: false,\r\n preventOpenDuplicates: false,\r\n title: \"Some title here\",\r\n msg: \"Type your message here\"\r\n };\r\n\r\n\r\n $scope.clearLastToast = function () {\r\n var toast = openedToasts.pop();\r\n toastr.clear(toast);\r\n };\r\n\r\n $scope.clearToasts = function () {\r\n toastr.clear();\r\n };\r\n\r\n $scope.openRandomToast = function () {\r\n var type = Math.floor(Math.random() * $scope.types.length);\r\n var quote = Math.floor(Math.random() * $scope.quotes.length);\r\n var toastType = $scope.types[type];\r\n var toastQuote = $scope.quotes[quote];\r\n openedToasts.push(toastr[toastType](toastQuote.message, toastQuote.title, toastQuote.options));\r\n $scope.optionsStr = \"toastr.\" + toastType + \"(\\'\" + toastQuote.message + \"\\', \\'\" + toastQuote.title + \"', \" + JSON.stringify(toastQuote.options || {}, null, 2) + \")\";\r\n };\r\n\r\n $scope.openToast = function () {\r\n angular.extend(toastrConfig, $scope.options);\r\n openedToasts.push(toastr[$scope.options.type]($scope.options.msg, $scope.options.title));\r\n var strOptions = {};\r\n for (var o in $scope.options) if (o != 'msg' && o != 'title')strOptions[o] = $scope.options[o];\r\n $scope.optionsStr = \"toastr.\" + $scope.options.type + \"(\\'\" + $scope.options.msg + \"\\', \\'\" + $scope.options.title + \"\\', \" + JSON.stringify(strOptions, null, 2) + \")\";\r\n };\r\n\r\n $scope.$on('$destroy', function iVeBeenDismissed() {\r\n angular.extend(toastrConfig, defaultConfig);\r\n })\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 23.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n /**\r\n * Includes basic panel layout inside of current element.\r\n */\r\n angular.module('BlurAdmin.theme')\r\n .directive('baPanel', baPanel);\r\n\r\n /** @ngInject */\r\n function baPanel(baPanel, baConfig) {\r\n return angular.extend({}, baPanel, {\r\n template: function(el, attrs) {\r\n var res = '
';\r\n res += baPanel.template(el, attrs);\r\n res += '
';\r\n return res;\r\n }\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 23.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .factory('baPanel', baPanel);\r\n\r\n /** @ngInject */\r\n function baPanel() {\r\n\r\n /** Base baPanel directive */\r\n return {\r\n restrict: 'A',\r\n transclude: true,\r\n template: function(elem, attrs) {\r\n var res = '
';\r\n if (attrs.baPanelTitle) {\r\n var titleTpl = '

' + attrs.baPanelTitle + '

';\r\n res = titleTpl + res; // title should be before\r\n }\r\n\r\n return res;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 15.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .directive('baPanelBlur', baPanelBlur);\r\n\r\n /** @ngInject */\r\n function baPanelBlur(baPanelBlurHelper, $window, $rootScope) {\r\n var bodyBgSize;\r\n\r\n baPanelBlurHelper.bodyBgLoad().then(function() {\r\n bodyBgSize = baPanelBlurHelper.getBodyBgImageSizes();\r\n });\r\n\r\n $window.addEventListener('resize', function() {\r\n bodyBgSize = baPanelBlurHelper.getBodyBgImageSizes();\r\n });\r\n\r\n return {\r\n restrict: 'A',\r\n link: function($scope, elem) {\r\n if(!$rootScope.$isMobile) {\r\n baPanelBlurHelper.bodyBgLoad().then(function () {\r\n setTimeout(recalculatePanelStyle);\r\n });\r\n $window.addEventListener('resize', recalculatePanelStyle);\r\n\r\n $scope.$on('$destroy', function () {\r\n $window.removeEventListener('resize', recalculatePanelStyle);\r\n });\r\n }\r\n\r\n function recalculatePanelStyle() {\r\n if (!bodyBgSize) {\r\n return;\r\n }\r\n elem.css({\r\n backgroundSize: Math.round(bodyBgSize.width) + 'px ' + Math.round(bodyBgSize.height) + 'px',\r\n backgroundPosition: Math.floor(bodyBgSize.positionX) + 'px ' + Math.floor(bodyBgSize.positionY) + 'px'\r\n });\r\n }\r\n\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 15.01.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .service('baPanelBlurHelper', baPanelBlurHelper);\r\n\r\n /** @ngInject */\r\n function baPanelBlurHelper($q) {\r\n var res = $q.defer();\r\n var computedStyle = getComputedStyle(document.body, ':before');\r\n var image = new Image();\r\n image.src = computedStyle.backgroundImage.replace(/url\\((['\"])?(.*?)\\1\\)/gi, '$2');\r\n image.onerror = function() {\r\n res.reject();\r\n };\r\n image.onload = function() {\r\n res.resolve();\r\n };\r\n\r\n this.bodyBgLoad = function() {\r\n return res.promise;\r\n };\r\n\r\n this.getBodyBgImageSizes = function() {\r\n var elemW = document.documentElement.clientWidth;\r\n var elemH = document.documentElement.clientHeight;\r\n if(elemW <= 640) return;\r\n var imgRatio = (image.height / image.width); // original img ratio\r\n var containerRatio = (elemH / elemW); // container ratio\r\n\r\n var finalHeight, finalWidth;\r\n if (containerRatio > imgRatio) {\r\n finalHeight = elemH;\r\n finalWidth = (elemH / imgRatio);\r\n } else {\r\n finalWidth = elemW;\r\n finalHeight = (elemW * imgRatio);\r\n }\r\n return { width: finalWidth, height: finalHeight, positionX: (elemW - finalWidth)/2, positionY: (elemH - finalHeight)/2};\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 23.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n /**\r\n * Represents current element as panel, adding all necessary classes.\r\n */\r\n angular.module('BlurAdmin.theme')\r\n .directive('baPanelSelf', baPanelSelf);\r\n\r\n /** @ngInject */\r\n function baPanelSelf(baPanel) {\r\n return angular.extend({}, baPanel, {\r\n link: function(scope, el, attrs) {\r\n el.addClass('panel panel-white');\r\n if (attrs.baPanelClass) {\r\n el.addClass(attrs.baPanelClass);\r\n }\r\n }\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .controller('BaSidebarCtrl', BaSidebarCtrl);\r\n\r\n /** @ngInject */\r\n function BaSidebarCtrl($scope, $http, baSidebarService) {\r\n $http.post('GetMenu', [0]).success(function (data) {\r\n $scope.menuItems = baSidebarService.getMenuItems();\r\n $scope.defaultSidebarState = $scope.menuItems[0].stateRef;\r\n });\r\n $scope.hoverItem = function ($event) {\r\n $scope.showHoverElem = true;\r\n $scope.hoverElemHeight = $event.currentTarget.clientHeight;\r\n var menuTopValue = 66;\r\n $scope.hoverElemTop = $event.currentTarget.getBoundingClientRect().top - menuTopValue;\r\n };\r\n\r\n $scope.$on('$stateChangeSuccess', function () {\r\n if (baSidebarService.canSidebarBeHidden()) {\r\n baSidebarService.setMenuCollapsed(true);\r\n }\r\n });\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baSidebar', baSidebar);\r\n\r\n /** @ngInject */\r\n function baSidebar($timeout, baSidebarService, baUtil, layoutSizes) {\r\n var jqWindow = $(window);\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/theme/components/baSidebar/ba-sidebar.html',\r\n controller: 'BaSidebarCtrl',\r\n link: function(scope, el) {\r\n\r\n scope.menuHeight = el[0].childNodes[0].clientHeight - 84;\r\n jqWindow.on('click', _onWindowClick);\r\n jqWindow.on('resize', _onWindowResize);\r\n\r\n scope.$on('$destroy', function() {\r\n jqWindow.off('click', _onWindowClick);\r\n jqWindow.off('resize', _onWindowResize);\r\n });\r\n\r\n function _onWindowClick($evt) {\r\n if (!baUtil.isDescendant(el[0], $evt.target) &&\r\n !$evt.originalEvent.$sidebarEventProcessed &&\r\n !baSidebarService.isMenuCollapsed() &&\r\n baSidebarService.canSidebarBeHidden()) {\r\n $evt.originalEvent.$sidebarEventProcessed = true;\r\n $timeout(function () {\r\n baSidebarService.setMenuCollapsed(true);\r\n }, 10);\r\n }\r\n }\r\n\r\n // watch window resize to change menu collapsed state if needed\r\n function _onWindowResize() {\r\n var newMenuCollapsed = baSidebarService.shouldMenuBeCollapsed();\r\n var newMenuHeight = _calculateMenuHeight();\r\n if (newMenuCollapsed != baSidebarService.isMenuCollapsed() || scope.menuHeight != newMenuHeight) {\r\n scope.$apply(function () {\r\n scope.menuHeight = newMenuHeight;\r\n baSidebarService.setMenuCollapsed(newMenuCollapsed)\r\n });\r\n }\r\n }\r\n\r\n function _calculateMenuHeight() {\r\n return el[0].childNodes[0].clientHeight - 84;\r\n }\r\n }\r\n };\r\n }\r\n\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .provider('baSidebarService', baSidebarServiceProvider);\r\n\r\n /** @ngInject */\r\n function baSidebarServiceProvider() {\r\n var staticMenuItems = [];\r\n\r\n this.addStaticItem = function() {\r\n staticMenuItems.push.apply(staticMenuItems, arguments);\r\n };\r\n\r\n /** @ngInject */\r\n this.$get = function ($state, $rootScope, $http, layoutSizes) {\r\n return new _factory();\r\n\r\n function _factory() {\r\n var isMenuCollapsed = shouldMenuBeCollapsed();\r\n this.getMenuItems = function () { \r\n var states = defineMenuItemStates();\r\n var menuItems = [];\r\n states.forEach(function (item) {\r\n var isOk = (item.level == 0);\r\n if (!(item.secure == null)) {\r\n if (item.secure.Allow) {\r\n isOk = false;\r\n $rootScope.UserRoles.forEach(function (ur) {\r\n item.secure.Allow.forEach(function (r) {\r\n if (ur.RoleName == r) {\r\n isOk = true;\r\n }\r\n });\r\n });\r\n }\r\n if (item.secure.Deny) {\r\n $rootScope.UserRoles.forEach(function (ur) {\r\n item.secure.Deny.forEach(function (r) {\r\n if (ur.RoleName == r) {\r\n isOk = false;\r\n }\r\n });\r\n });\r\n }\r\n }\r\n if (isOk && item.level == 0) {\r\n menuItems.push(item)\r\n }\r\n });\r\n //var menuItems = states.filter(function (item) {\r\n // var isOk = (item.level == 0);\r\n \r\n // return isOk;\r\n //});\r\n menuItems.forEach(function (item) {\r\n //console.log(item)\r\n var children = [];\r\n states.forEach(function (child) {\r\n var isChildOk = false;\r\n if (child.level == 1 && child.name.indexOf(item.name) === 0) {\r\n isChildOk = true;\r\n if (!(child.secure == null)) {\r\n if (child.secure.Allow) {\r\n isChildOk = false;\r\n $rootScope.UserRoles.forEach(function (ur) {\r\n ////console.log(ur.RoleName)\r\n child.secure.Allow.forEach(function (r) {\r\n if (ur.RoleName == r) {\r\n isChildOk = true;\r\n }\r\n });\r\n });\r\n }\r\n if (child.secure.Deny) {\r\n $rootScope.UserRoles.forEach(function (ur) {\r\n child.secure.Deny.forEach(function (r) {\r\n if (ur.RoleName == r) {\r\n isChildOk = false;\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n }\r\n if (isChildOk) {\r\n ////console.log(child.title + \" Added to \" + item.title)\r\n children.push(child)\r\n }\r\n });\r\n item.subMenu = children.length ? children : null;\r\n //var children = states.filter(function (child) {\r\n // ////console.log(child)\r\n // var isChildOk = (child.level == 1 && child.name.indexOf(item.name) === 0);\r\n // if (isChildOk) {\r\n // ////console.log(child)\r\n \r\n // }\r\n // ////console.log(isChildOk)\r\n // //if (!isChildOk) {\r\n // return isChildOk;\r\n // //}\r\n \r\n //});\r\n //\r\n //if (isChildOk) {\r\n \r\n //} else {\r\n\r\n //}\r\n //return true;\r\n \r\n });\r\n //console.log(menuItems.concat(staticMenuItems));\r\n return menuItems.concat(staticMenuItems);\r\n };\r\n\r\n this.shouldMenuBeCollapsed = shouldMenuBeCollapsed;\r\n this.canSidebarBeHidden = canSidebarBeHidden;\r\n\r\n this.setMenuCollapsed = function(isCollapsed) {\r\n isMenuCollapsed = isCollapsed;\r\n };\r\n\r\n this.isMenuCollapsed = function() {\r\n return isMenuCollapsed;\r\n };\r\n\r\n this.toggleMenuCollapsed = function() {\r\n isMenuCollapsed = !isMenuCollapsed;\r\n };\r\n\r\n this.getAllStateRefsRecursive = function(item) {\r\n var result = [];\r\n _iterateSubItems(item);\r\n return result;\r\n\r\n function _iterateSubItems(currentItem) {\r\n currentItem.subMenu && currentItem.subMenu.forEach(function(subItem) {\r\n subItem.stateRef && result.push(subItem.stateRef);\r\n _iterateSubItems(subItem);\r\n });\r\n }\r\n };\r\n\r\n function defineMenuItemStates() {\r\n return $state.get()\r\n .filter(function(s) {\r\n return s.sidebarMeta;\r\n })\r\n .map(function(s) {\r\n var meta = s.sidebarMeta;\r\n return {\r\n name: s.name,\r\n title: s.title,\r\n level: (s.name.match(/\\./g) || []).length,\r\n order: meta.order,\r\n icon: meta.icon,\r\n secure: meta.secure,\r\n stateRef: s.name,\r\n color: (meta.color ? {\"color\":meta.color} : \"\"),\r\n };\r\n })\r\n .sort(function(a, b) {\r\n return (a.level - b.level) * 100 + a.order - b.order;\r\n });\r\n }\r\n\r\n function shouldMenuBeCollapsed() {\r\n return window.innerWidth <= layoutSizes.resWidthCollapseSidebar;\r\n }\r\n\r\n function canSidebarBeHidden() {\r\n return window.innerWidth <= layoutSizes.resWidthHideSidebar;\r\n }\r\n }\r\n\r\n };\r\n\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 03.05.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baSidebarToggleMenu', baSidebarToggleMenu)\r\n .directive('baSidebarCollapseMenu', baSidebarCollapseMenu)\r\n .directive('baSidebarTogglingItem', baSidebarTogglingItem)\r\n .controller('BaSidebarTogglingItemCtrl', BaSidebarTogglingItemCtrl)\r\n .directive('baUiSrefTogglingSubmenu', baUiSrefTogglingSubmenu)\r\n .directive('baUiSrefToggler', baUiSrefToggler);\r\n\r\n /** @ngInject */\r\n function baSidebarToggleMenu(baSidebarService) {\r\n return {\r\n restrict: 'A',\r\n link: function(scope, elem) {\r\n elem.on('click', function($evt) {\r\n $evt.originalEvent.$sidebarEventProcessed = true;\r\n scope.$apply(function() {\r\n baSidebarService.toggleMenuCollapsed();\r\n });\r\n });\r\n }\r\n };\r\n }\r\n\r\n /** @ngInject */\r\n function baSidebarCollapseMenu(baSidebarService) {\r\n return {\r\n restrict: 'A',\r\n link: function(scope, elem) {\r\n elem.on('click', function($evt) {\r\n $evt.originalEvent.$sidebarEventProcessed = true;\r\n if (!baSidebarService.isMenuCollapsed()) {\r\n scope.$apply(function() {\r\n baSidebarService.setMenuCollapsed(true);\r\n });\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n /** @ngInject */\r\n function baSidebarTogglingItem() {\r\n return {\r\n restrict: 'A',\r\n controller: 'BaSidebarTogglingItemCtrl'\r\n };\r\n }\r\n\r\n /** @ngInject */\r\n function BaSidebarTogglingItemCtrl($scope, $element, $attrs, $state, baSidebarService) {\r\n var vm = this;\r\n var menuItem = vm.$$menuItem = $scope.$eval($attrs.baSidebarTogglingItem);\r\n if (menuItem && menuItem.subMenu && menuItem.subMenu.length) {\r\n vm.$$expandSubmenu = function() { console.warn('$$expandMenu should be overwritten by baUiSrefTogglingSubmenu') };\r\n vm.$$collapseSubmenu = function() { console.warn('$$collapseSubmenu should be overwritten by baUiSrefTogglingSubmenu') };\r\n\r\n var subItemsStateRefs = baSidebarService.getAllStateRefsRecursive(menuItem);\r\n\r\n vm.$expand = function() {\r\n vm.$$expandSubmenu();\r\n $element.addClass('ba-sidebar-item-expanded');\r\n };\r\n\r\n vm.$collapse = function() {\r\n vm.$$collapseSubmenu();\r\n $element.removeClass('ba-sidebar-item-expanded');\r\n };\r\n\r\n vm.$toggle = function() {\r\n $element.hasClass('ba-sidebar-item-expanded') ?\r\n vm.$collapse() :\r\n vm.$expand();\r\n };\r\n\r\n if (_isState($state.current)) {\r\n $element.addClass('ba-sidebar-item-expanded');\r\n }\r\n\r\n $scope.$on('$stateChangeStart', function (event, toState) {\r\n if (!_isState(toState) && $element.hasClass('ba-sidebar-item-expanded')) {\r\n vm.$collapse();\r\n $element.removeClass('ba-sidebar-item-expanded');\r\n }\r\n });\r\n\r\n $scope.$on('$stateChangeSuccess', function (event, toState) {\r\n if (_isState(toState) && !$element.hasClass('ba-sidebar-item-expanded')) {\r\n vm.$expand();\r\n $element.addClass('ba-sidebar-item-expanded');\r\n }\r\n });\r\n }\r\n\r\n function _isState(state) {\r\n return state && subItemsStateRefs.some(function(subItemState) {\r\n return state.name.indexOf(subItemState) == 0;\r\n });\r\n }\r\n }\r\n\r\n /** @ngInject */\r\n function baUiSrefTogglingSubmenu($state) {\r\n return {\r\n restrict: 'A',\r\n require: '^baSidebarTogglingItem',\r\n link: function(scope, el, attrs, baSidebarTogglingItem) {\r\n baSidebarTogglingItem.$$expandSubmenu = function() { el.slideDown(); };\r\n baSidebarTogglingItem.$$collapseSubmenu = function() { el.slideUp(); };\r\n }\r\n };\r\n }\r\n\r\n /** @ngInject */\r\n function baUiSrefToggler(baSidebarService) {\r\n return {\r\n restrict: 'A',\r\n require: '^baSidebarTogglingItem',\r\n link: function(scope, el, attrs, baSidebarTogglingItem) {\r\n el.on('click', function() {\r\n if (baSidebarService.isMenuCollapsed()) {\r\n // If the whole sidebar is collapsed and this item has submenu. We need to open sidebar.\r\n // This should not affect mobiles, because on mobiles sidebar should be hidden at all\r\n scope.$apply(function() {\r\n baSidebarService.setMenuCollapsed(false);\r\n });\r\n baSidebarTogglingItem.$expand();\r\n } else {\r\n baSidebarTogglingItem.$toggle();\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baWizard', baWizard);\r\n\r\n /** @ngInject */\r\n function baWizard() {\r\n return {\r\n restrict: 'E',\r\n scope: { complete: '=', tabaction: '=' , isValid:'='},\r\n transclude: true,\r\n templateUrl: 'app/theme/components/baWizard/baWizard.html',\r\n controllerAs: '$baWizardController',\r\n controller: 'baWizardCtrl'\r\n }\r\n }\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baWizardNewExam', baWizardNewExam);\r\n function baWizardNewExam() {\r\n return {\r\n restrict: 'E',\r\n scope: { complete: '=', tabaction: '=', isValid: '=' },\r\n transclude: true,\r\n templateUrl: 'app/theme/components/baWizard/baWizard_customexam.html',\r\n controllerAs: '$baWizardController',\r\n controller: 'baWizardCtrl'\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .controller('baWizardCtrl', baWizardCtrl);\r\n\r\n /** @ngInject */\r\n function baWizardCtrl($scope) {\r\n \r\n var vm = this;\r\n vm.tabs = [];\r\n\r\n vm.tabNum = 0;\r\n vm.progress = 0;\r\n\r\n vm.addTab = function(tab) {\r\n tab.setPrev(vm.tabs[vm.tabs.length - 1]);\r\n vm.tabs.push(tab);\r\n vm.selectTab(0);\r\n };\r\n $scope.LastTab = false;\r\n $scope.FirstTab = true;\r\n $scope.$watch(angular.bind(vm, function () { return vm.tabNum; }), calcProgress);\r\n $scope.$on('buildme', function (e, t) {\r\n vm.selectTab(t)\r\n })\r\n vm.selectTab = function (tabNum) {\r\n if ($scope.isValid) {\r\n if ($scope.isValid(vm.tabNum,tabNum)) {\r\n vm.tabs[vm.tabNum].submit();\r\n if (vm.tabs[tabNum].isAvailiable()) {\r\n $scope.LastTab = tabNum === vm.tabs.length - 1;\r\n vm.tabNum = tabNum;\r\n if ($scope.tabaction) {\r\n $scope.tabaction(tabNum);\r\n }\r\n vm.tabs.forEach(function (t, tIndex) {\r\n tIndex === vm.tabNum ? t.select(true) : t.select(false);\r\n });\r\n }\r\n $scope.FirstTab = vm.isFirstTab();\r\n } \r\n } else {\r\n \r\n vm.tabs[vm.tabNum].submit();\r\n if (vm.tabs[tabNum].isAvailiable()) {\r\n $scope.LastTab = tabNum === vm.tabs.length - 1;\r\n vm.tabNum = tabNum;\r\n if ($scope.tabaction) { $scope.tabaction(tabNum); }\r\n vm.tabs.forEach(function (t, tIndex) {\r\n tIndex === vm.tabNum ? t.select(true) : t.select(false);\r\n });\r\n }\r\n \r\n }\r\n $scope.FirstTab = vm.isFirstTab();\r\n };\r\n\r\n vm.isFirstTab = function () {\r\n return vm.tabNum === 0;\r\n };\r\n\r\n vm.isLastTab = function () {\r\n return vm.tabNum === vm.tabs.length - 1;\r\n };\r\n\r\n vm.nextTab = function () {\r\n vm.selectTab(vm.tabNum + 1);\r\n };\r\n\r\n vm.previousTab = function () {\r\n vm.selectTab(vm.tabNum - 1);\r\n };\r\n\r\n function calcProgress() {\r\n vm.progress = (vm.tabNum + 1) / vm.tabs.length * 100;\r\n }\r\n }\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baWizardStep', baWizardStep);\r\n\r\n /** @ngInject */\r\n function baWizardStep() {\r\n return {\r\n restrict: 'E',\r\n transclude: true,\r\n require: '^baWizard',\r\n scope: {\r\n form: '='\r\n },\r\n templateUrl: 'app/theme/components/baWizard/baWizardStep.html',\r\n link: function($scope, $element, $attrs, wizard) {\r\n $scope.selected = true;\r\n\r\n var tab = {\r\n title: $attrs.title,\r\n select: select,\r\n submit: submit,\r\n isComplete: isComplete,\r\n isAvailiable: isAvailiable,\r\n prevTab: undefined,\r\n setPrev: setPrev\r\n };\r\n\r\n wizard.addTab(tab);\r\n\r\n function select(isSelected) {\r\n if (isSelected) {\r\n $scope.selected = true;\r\n } else {\r\n $scope.selected = false;\r\n }\r\n }\r\n\r\n function submit() {\r\n $scope.form && $scope.form.$setSubmitted(true);\r\n }\r\n\r\n function isComplete() {\r\n return $scope.form ? $scope.form.$valid : true;\r\n }\r\n\r\n function isAvailiable() {\r\n return tab.prevTab ? tab.prevTab.isComplete() : true;\r\n }\r\n\r\n function setPrev(pTab) {\r\n tab.prevTab = pTab;\r\n }\r\n }\r\n };\r\n }\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('baWizardStepNewExam', baWizardNewExam);\r\n function baWizardNewExam() {\r\n return {\r\n restrict: 'E',\r\n transclude: true,\r\n require: '^baWizardNewExam',\r\n scope: {\r\n form: '='\r\n },\r\n templateUrl: 'app/theme/components/baWizard/baWizardStep.html',\r\n link: function ($scope, $element, $attrs, wizard) {\r\n $scope.selected = true;\r\n\r\n var tab = {\r\n title: $attrs.title,\r\n select: select,\r\n submit: submit,\r\n isComplete: isComplete,\r\n isAvailiable: isAvailiable,\r\n prevTab: undefined,\r\n setPrev: setPrev\r\n };\r\n\r\n wizard.addTab(tab);\r\n\r\n function select(isSelected) {\r\n if (isSelected) {\r\n $scope.selected = true;\r\n } else {\r\n $scope.selected = false;\r\n }\r\n }\r\n\r\n function submit() {\r\n $scope.form && $scope.form.$setSubmitted(true);\r\n }\r\n\r\n function isComplete() {\r\n return $scope.form ? $scope.form.$valid : true;\r\n }\r\n\r\n function isAvailiable() {\r\n return tab.prevTab ? tab.prevTab.isComplete() : true;\r\n }\r\n\r\n function setPrev(pTab) {\r\n tab.prevTab = pTab;\r\n }\r\n }\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('backTop', backTop);\r\n\r\n /** @ngInject */\r\n function backTop() {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/theme/components/backTop/backTop.html',\r\n controller: function () {\r\n $('#backTop').backTop({\r\n 'position': 200,\r\n 'speed': 10\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('contentTop', contentTop);\r\n\r\n /** @ngInject */\r\n function contentTop($location, $state) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/theme/components/contentTop/contentTop.html',\r\n link: function($scope) {\r\n $scope.$watch(function () {\r\n $scope.hideTitle = $state.current.hideTitle;\r\n $scope.hideMeta = $state.current.hideMeta;\r\n if($state.current.useDisplayTitle===true && $state.current.displayTitle.length) {\r\n $scope.activePageTitle = $state.current.displayTitle;\r\n }else{\r\n $scope.activePageTitle = $state.current.title;\r\n }\r\n });\r\n $scope.NowNow = function() {\r\n return Date.now().toString(2).replace(/1/g,'!').replace(/0/g,'¡');\r\n }\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .controller('MsgCenterCtrl', MsgCenterCtrl);\r\n\r\n /** @ngInject */\r\n function MsgCenterCtrl($scope, $rootScope, $sce) {\r\n \r\n $scope.users = {\r\n 0: {\r\n name: 'Vlad',\r\n },\r\n 1: {\r\n name: 'Kostya',\r\n },\r\n 2: {\r\n name: 'Andrey',\r\n },\r\n 3: {\r\n name: 'Nasta',\r\n }\r\n };\r\n\r\n $scope.notifications = [\r\n {\r\n userId: 0,\r\n template: '&name posted a new article.',\r\n time: '1 min ago'\r\n },\r\n {\r\n userId: 1,\r\n template: '&name changed his contact information.',\r\n time: '2 hrs ago'\r\n },\r\n {\r\n image: 'assets/img/shopping-cart.svg',\r\n template: 'New orders received.',\r\n time: '5 hrs ago'\r\n },\r\n {\r\n userId: 2,\r\n template: '&name replied to your comment.',\r\n time: '1 day ago'\r\n },\r\n {\r\n userId: 3,\r\n template: 'Today is &name\\'s birthday.',\r\n time: '2 days ago'\r\n },\r\n {\r\n image: 'assets/img/comments.svg',\r\n template: 'New comments on your post.',\r\n time: '3 days ago'\r\n },\r\n {\r\n userId: 1,\r\n template: '&name invited you to join the event.',\r\n time: '1 week ago'\r\n }\r\n ];\r\n\r\n $scope.messages = [\r\n {\r\n userId: 3,\r\n text: 'After you get up and running, you can place Font Awesome icons just about...',\r\n time: '1 min ago'\r\n },\r\n {\r\n userId: 0,\r\n text: 'You asked, Font Awesome delivers with 40 shiny new icons in version 4.2.',\r\n time: '2 hrs ago'\r\n },\r\n {\r\n userId: 1,\r\n text: 'Want to request new icons? Here\\'s how. Need vectors or want to use on the...',\r\n time: '10 hrs ago'\r\n },\r\n {\r\n userId: 2,\r\n text: 'Explore your passions and discover new ones by getting involved. Stretch your...',\r\n time: '1 day ago'\r\n },\r\n {\r\n userId: 3,\r\n text: 'Get to know who we are - from the inside out. From our history and culture, to the...',\r\n time: '1 day ago'\r\n },\r\n {\r\n userId: 1,\r\n text: 'Need some support to reach your goals? Apply for scholarships across a variety of...',\r\n time: '2 days ago'\r\n },\r\n {\r\n userId: 0,\r\n text: 'Wrap the dropdown\\'s trigger and the dropdown menu within .dropdown, or...',\r\n time: '1 week ago'\r\n }\r\n ];\r\n\r\n $scope.getMessage = function(msg) {\r\n var text = msg.template;\r\n if (msg.userId || msg.userId === 0) {\r\n text = text.replace('&name', '' + $scope.users[msg.userId].name + '');\r\n }\r\n return $sce.trustAsHtml(text);\r\n };\r\n }\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('msgCenter', msgCenter);\r\n\r\n /** @ngInject */\r\n function msgCenter() {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/theme/components/msgCenter/msgCenter.html',\r\n controller: 'MsgCenterCtrl'\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('pageTop', pageTop);\r\n\r\n /** @ngInject */\r\n function pageTop() {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'app/theme/components/pageTop/pageTop.html',\r\n controller: function ($scope, $rootScope, $http, $location, $window, $state) {\r\n $scope.showMobileSearch = false;\r\n $scope.toggleMobileSearch = function() {\r\n $scope.showMobileSearch = !$scope.showMobileSearch;\r\n $scope.$apply();\r\n }\r\n $scope.User = $rootScope.User;\r\n $scope.UserSettings = $rootScope.UserSettings;\r\n $scope.SaveUserSettings = function () {\r\n $rootScope.UserSettings = $scope.UserSettings;\r\n $http.post(\"/Execute/SaveUserSettings\", [$scope.User.UserId, JSON.stringify($scope.UserSettings)]).success(function (data) {\r\n ////console.log('Settings Saved')\r\n });\r\n }\r\n $scope.ChangeTheme = function(theme) {\r\n if(theme == 'default' || theme == 'chall-light') {\r\n $rootScope.UserSettings.AppTheme = theme;\r\n $rootScope.SaveUserSettings();\r\n }\r\n\r\n }\r\n $scope.currentState = $state;\r\n if ($rootScope.User) {\r\n $scope.User = $rootScope.User\r\n } else {\r\n $http.post(\"/CurrentUser\").success(function (data) {\r\n $rootScope.User = data;\r\n $scope.User = $rootScope.User\r\n $http.post(\"/Execute/GetUserRoleList\", [data.UserName]).success(function (d) {\r\n $rootScope.UserRoles = d.RS_0;\r\n });\r\n });\r\n }\r\n //$scope.ptflurp = {};\r\n //$scope.ptflurp.SearchQueryTop = '';\r\n $scope.startSearch = function() {\r\n if($rootScope.ptflurp.SearchQueryTop.length) {\r\n if($rootScope.User.UserName) {\r\n $location.path('/search/'+$rootScope.ptflurp.SearchQueryTop);\r\n }else{\r\n //$location.path('/store?q='+$rootScope.ptflurp.SearchQueryTop);\r\n $window.location.href='/store?q='+$rootScope.ptflurp.SearchQueryTop;\r\n }\r\n }\r\n\r\n\r\n }\r\n }\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme.components')\r\n .directive('widgets', widgets);\r\n\r\n /** @ngInject */\r\n function widgets() {\r\n return {\r\n restrict: 'EA',\r\n scope: {\r\n ngModel: '='\r\n },\r\n templateUrl: 'app/theme/components/widgets/widgets.html',\r\n replace: true\r\n };\r\n }\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 17.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .filter('appImage', appImage);\r\n\r\n /** @ngInject */\r\n function appImage(layoutPaths) {\r\n return function(input) {\r\n return layoutPaths.images.root + input;\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 17.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .filter('kameleonImg', kameleonImg);\r\n\r\n /** @ngInject */\r\n function kameleonImg(layoutPaths) {\r\n return function(input) {\r\n return layoutPaths.images.root + 'theme/icon/kameleon/' + input + '.svg';\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 17.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .filter('profilePicture', profilePicture);\r\n\r\n /** @ngInject */\r\n function profilePicture(layoutPaths) {\r\n return function(input, ext) {\r\n ext = ext || 'png';\r\n return layoutPaths.images.profile + input + '.' + ext;\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 23.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.theme')\r\n .filter('plainText', plainText);\r\n\r\n /** @ngInject */\r\n function plainText() {\r\n return function(text) {\r\n return text ? String(text).replace(/<[^>]+>/gm, '') : '';\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('AreaChartCtrl', AreaChartCtrl);\r\n\r\n /** @ngInject */\r\n function AreaChartCtrl($scope, baConfig, $element, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var areaChart = AmCharts.makeChart(id, {\r\n type: 'serial',\r\n theme: 'blur',\r\n color: layoutColors.defaultText,\r\n dataProvider: [\r\n {\r\n lineColor: layoutColors.info,\r\n date: '2012-01-01',\r\n duration: 408\r\n },\r\n {\r\n date: '2012-01-02',\r\n duration: 482\r\n },\r\n {\r\n date: '2012-01-03',\r\n duration: 562\r\n },\r\n {\r\n date: '2012-01-04',\r\n duration: 379\r\n },\r\n {\r\n lineColor: layoutColors.warning,\r\n date: '2012-01-05',\r\n duration: 501\r\n },\r\n {\r\n date: '2012-01-06',\r\n duration: 443\r\n },\r\n {\r\n date: '2012-01-07',\r\n duration: 405\r\n },\r\n {\r\n date: '2012-01-08',\r\n duration: 309,\r\n lineColor: layoutColors.danger\r\n },\r\n {\r\n date: '2012-01-09',\r\n duration: 287\r\n },\r\n {\r\n date: '2012-01-10',\r\n duration: 485\r\n },\r\n {\r\n date: '2012-01-11',\r\n duration: 890\r\n },\r\n {\r\n date: '2012-01-12',\r\n duration: 810\r\n }\r\n ],\r\n balloon: {\r\n cornerRadius: 6,\r\n horizontalPadding: 15,\r\n verticalPadding: 10\r\n },\r\n valueAxes: [\r\n {\r\n duration: 'mm',\r\n durationUnits: {\r\n hh: 'h ',\r\n mm: 'min'\r\n },\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n }\r\n ],\r\n graphs: [\r\n {\r\n bullet: 'square',\r\n bulletBorderAlpha: 1,\r\n bulletBorderThickness: 1,\r\n fillAlphas: 0.5,\r\n fillColorsField: 'lineColor',\r\n legendValueText: '[[value]]',\r\n lineColorField: 'lineColor',\r\n title: 'duration',\r\n valueField: 'duration'\r\n }\r\n ],\r\n\r\n chartCursor: {\r\n categoryBalloonDateFormat: 'YYYY MMM DD',\r\n cursorAlpha: 0,\r\n fullWidth: true\r\n },\r\n dataDateFormat: 'YYYY-MM-DD',\r\n categoryField: 'date',\r\n categoryAxis: {\r\n dateFormats: [\r\n {\r\n period: 'DD',\r\n format: 'DD'\r\n },\r\n {\r\n period: 'WW',\r\n format: 'MMM DD'\r\n },\r\n {\r\n period: 'MM',\r\n format: 'MMM'\r\n },\r\n {\r\n period: 'YYYY',\r\n format: 'YYYY'\r\n }\r\n ],\r\n parseDates: true,\r\n autoGridCount: false,\r\n gridCount: 50,\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n },\r\n export: {\r\n enabled: true\r\n },\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n\r\n areaChart.addListener('dataUpdated', zoomAreaChart);\r\n\r\n function zoomAreaChart() {\r\n areaChart.zoomToDates(new Date(2012, 0, 3), new Date(2012, 0, 11));\r\n }\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('BarChartCtrl', BarChartCtrl);\r\n\r\n /** @ngInject */\r\n function BarChartCtrl($scope, baConfig, $element, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var barChart = AmCharts.makeChart(id, {\r\n type: 'serial',\r\n theme: 'blur',\r\n color: layoutColors.defaultText,\r\n dataProvider: [\r\n {\r\n country: 'USA',\r\n visits: 3025,\r\n color: layoutColors.primary\r\n },\r\n {\r\n country: 'China',\r\n visits: 1882,\r\n color: layoutColors.danger\r\n\r\n },\r\n {\r\n country: 'Japan',\r\n visits: 1809,\r\n color: layoutColors.info\r\n },\r\n {\r\n country: 'Germany',\r\n visits: 1322,\r\n color: layoutColors.success\r\n },\r\n {\r\n country: 'UK',\r\n visits: 1122,\r\n color: layoutColors.warning\r\n },\r\n {\r\n country: 'France',\r\n visits: 1114,\r\n color: layoutColors.primaryLight\r\n }\r\n ],\r\n valueAxes: [\r\n {\r\n axisAlpha: 0,\r\n position: 'left',\r\n title: 'Visitors from country',\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n }\r\n ],\r\n startDuration: 1,\r\n graphs: [\r\n {\r\n balloonText: '[[category]]: [[value]]',\r\n fillColorsField: 'color',\r\n fillAlphas: 0.7,\r\n lineAlpha: 0.2,\r\n type: 'column',\r\n valueField: 'visits'\r\n }\r\n ],\r\n chartCursor: {\r\n categoryBalloonEnabled: false,\r\n cursorAlpha: 0,\r\n zoomable: false\r\n },\r\n categoryField: 'country',\r\n categoryAxis: {\r\n gridPosition: 'start',\r\n labelRotation: 45,\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n },\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'top-right',\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 22.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('combinedChartCtrl', combinedChartCtrl);\r\n\r\n /** @ngInject */\r\n function combinedChartCtrl($element, baConfig, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var chart = AmCharts.makeChart(id, {\r\n \"type\": \"serial\",\r\n \"theme\": \"none\",\r\n \"color\": layoutColors.defaultText,\r\n \"dataDateFormat\": \"YYYY-MM-DD\",\r\n \"precision\": 2,\r\n \"valueAxes\": [{\r\n color: layoutColors.defaultText,\r\n axisColor: layoutColors.defaultText,\r\n gridColor: layoutColors.defaultText,\r\n \"id\": \"v1\",\r\n \"title\": \"Sales\",\r\n \"position\": \"left\",\r\n \"autoGridCount\": false,\r\n \"labelFunction\": function(value) {\r\n return \"$\" + Math.round(value) + \"M\";\r\n }\r\n }, {\r\n color: layoutColors.defaultText,\r\n axisColor: layoutColors.defaultText,\r\n gridColor: layoutColors.defaultText,\r\n \"id\": \"v2\",\r\n \"title\": \"Market Days\",\r\n \"gridAlpha\": 0,\r\n \"position\": \"right\",\r\n \"autoGridCount\": false\r\n }],\r\n \"graphs\": [{\r\n \"id\": \"g3\",\r\n color: layoutColors.defaultText,\r\n \"valueAxis\": \"v1\",\r\n \"lineColor\": layoutColors.primaryLight,\r\n \"fillColors\": layoutColors.primaryLight,\r\n \"fillAlphas\": 0.8,\r\n \"lineAlpha\": 0.8,\r\n \"type\": \"column\",\r\n \"title\": \"Actual Sales\",\r\n \"valueField\": \"sales2\",\r\n \"clustered\": false,\r\n \"columnWidth\": 0.5,\r\n \"lineColorField\" : layoutColors.defaultText,\r\n \"legendValueText\": \"$[[value]]M\",\r\n \"balloonText\": \"[[title]]
$[[value]]M\"\r\n }, {\r\n \"id\": \"g4\",\r\n \"valueAxis\": \"v1\",\r\n color: layoutColors.defaultText,\r\n \"lineColor\": layoutColors.primary,\r\n \"fillColors\": layoutColors.primary,\r\n \"fillAlphas\": 0.9,\r\n \"lineAlpha\": 0.9,\r\n \"type\": \"column\",\r\n \"title\": \"Target Sales\",\r\n \"valueField\": \"sales1\",\r\n \"clustered\": false,\r\n \"columnWidth\": 0.3,\r\n \"legendValueText\": \"$[[value]]M\",\r\n \"balloonText\": \"[[title]]
$[[value]]M\"\r\n }, {\r\n \"id\": \"g1\",\r\n \"valueAxis\": \"v2\",\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": layoutColors.defaultText,\r\n color: layoutColors.defaultText,\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 50,\r\n \"lineThickness\": 2,\r\n \"lineColor\": layoutColors.danger,\r\n \"type\": \"smoothedLine\",\r\n \"title\": \"Market Days\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"market1\",\r\n \"balloonText\": \"[[title]]
[[value]]\"\r\n }, {\r\n \"id\": \"g2\",\r\n \"valueAxis\": \"v2\",\r\n color: layoutColors.defaultText,\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": layoutColors.defaultText,\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 50,\r\n \"lineThickness\": 2,\r\n \"lineColor\": layoutColors.warning,\r\n \"type\": \"smoothedLine\",\r\n \"dashLength\": 5,\r\n \"title\": \"Market Days ALL\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"market2\",\r\n \"balloonText\": \"[[title]]
[[value]]\"\r\n }],\r\n \"chartScrollbar\": {\r\n \"graph\": \"g1\",\r\n \"oppositeAxis\": false,\r\n \"offset\": 30,\r\n gridAlpha: 0,\r\n color: layoutColors.defaultText,\r\n scrollbarHeight: 50,\r\n backgroundAlpha: 0,\r\n selectedBackgroundAlpha: 0.05,\r\n selectedBackgroundColor: layoutColors.defaultText,\r\n graphFillAlpha: 0,\r\n autoGridCount: true,\r\n selectedGraphFillAlpha: 0,\r\n graphLineAlpha: 0.2,\r\n selectedGraphLineColor: layoutColors.defaultText,\r\n selectedGraphLineAlpha: 1\r\n },\r\n \"chartCursor\": {\r\n \"pan\": true,\r\n \"cursorColor\" : layoutColors.danger,\r\n \"valueLineEnabled\": true,\r\n \"valueLineBalloonEnabled\": true,\r\n \"cursorAlpha\": 0,\r\n \"valueLineAlpha\": 0.2\r\n },\r\n \"categoryField\": \"date\",\r\n \"categoryAxis\": {\r\n \"axisColor\": layoutColors.defaultText,\r\n \"color\": layoutColors.defaultText,\r\n \"gridColor\": layoutColors.defaultText,\r\n \"parseDates\": true,\r\n \"dashLength\": 1,\r\n \"minorGridEnabled\": true\r\n },\r\n \"legend\": {\r\n \"useGraphSettings\": true,\r\n \"position\": \"top\",\r\n \"color\": layoutColors.defaultText\r\n },\r\n \"balloon\": {\r\n \"borderThickness\": 1,\r\n \"shadowAlpha\": 0\r\n },\r\n \"export\": {\r\n \"enabled\": true\r\n },\r\n \"dataProvider\": [{\r\n \"date\": \"2013-01-16\",\r\n \"market1\": 71,\r\n \"market2\": 75,\r\n \"sales1\": 5,\r\n \"sales2\": 8\r\n }, {\r\n \"date\": \"2013-01-17\",\r\n \"market1\": 74,\r\n \"market2\": 78,\r\n \"sales1\": 4,\r\n \"sales2\": 6\r\n }, {\r\n \"date\": \"2013-01-18\",\r\n \"market1\": 78,\r\n \"market2\": 88,\r\n \"sales1\": 5,\r\n \"sales2\": 2\r\n }, {\r\n \"date\": \"2013-01-19\",\r\n \"market1\": 85,\r\n \"market2\": 89,\r\n \"sales1\": 8,\r\n \"sales2\": 9\r\n }, {\r\n \"date\": \"2013-01-20\",\r\n \"market1\": 82,\r\n \"market2\": 89,\r\n \"sales1\": 9,\r\n \"sales2\": 6\r\n }, {\r\n \"date\": \"2013-01-21\",\r\n \"market1\": 83,\r\n \"market2\": 85,\r\n \"sales1\": 3,\r\n \"sales2\": 5\r\n }, {\r\n \"date\": \"2013-01-22\",\r\n \"market1\": 88,\r\n \"market2\": 92,\r\n \"sales1\": 5,\r\n \"sales2\": 7\r\n }, {\r\n \"date\": \"2013-01-23\",\r\n \"market1\": 85,\r\n \"market2\": 90,\r\n \"sales1\": 7,\r\n \"sales2\": 6\r\n }, {\r\n \"date\": \"2013-01-24\",\r\n \"market1\": 85,\r\n \"market2\": 91,\r\n \"sales1\": 9,\r\n \"sales2\": 5\r\n }, {\r\n \"date\": \"2013-01-25\",\r\n \"market1\": 80,\r\n \"market2\": 84,\r\n \"sales1\": 5,\r\n \"sales2\": 8\r\n }, {\r\n \"date\": \"2013-01-26\",\r\n \"market1\": 87,\r\n \"market2\": 92,\r\n \"sales1\": 4,\r\n \"sales2\": 8\r\n }, {\r\n \"date\": \"2013-01-27\",\r\n \"market1\": 84,\r\n \"market2\": 87,\r\n \"sales1\": 3,\r\n \"sales2\": 4\r\n }, {\r\n \"date\": \"2013-01-28\",\r\n \"market1\": 83,\r\n \"market2\": 88,\r\n \"sales1\": 5,\r\n \"sales2\": 7\r\n }, {\r\n \"date\": \"2013-01-29\",\r\n \"market1\": 84,\r\n \"market2\": 87,\r\n \"sales1\": 5,\r\n \"sales2\": 8\r\n }, {\r\n \"date\": \"2013-01-30\",\r\n \"market1\": 81,\r\n \"market2\": 85,\r\n \"sales1\": 4,\r\n \"sales2\": 7\r\n }],\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('FunnelChartCtrl', FunnelChartCtrl);\r\n\r\n /** @ngInject */\r\n function FunnelChartCtrl($scope, $element, layoutPaths, baConfig) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var funnelChart = AmCharts.makeChart(id, {\r\n type: 'funnel',\r\n theme: 'blur',\r\n color: layoutColors.defaultText,\r\n labelTickColor: layoutColors.borderDark,\r\n dataProvider: [\r\n {\r\n title: 'Website visits',\r\n value: 300\r\n },\r\n {\r\n title: 'Downloads',\r\n value: 123\r\n },\r\n {\r\n title: 'Requested prices',\r\n value: 98\r\n },\r\n {\r\n title: 'Contaced',\r\n value: 72\r\n },\r\n {\r\n title: 'Purchased',\r\n value: 35\r\n },\r\n {\r\n title: 'Asked for support',\r\n value: 25\r\n },\r\n {\r\n title: 'Purchased more',\r\n value: 18\r\n }\r\n ],\r\n titleField: 'title',\r\n marginRight: 160,\r\n marginLeft: 15,\r\n labelPosition: 'right',\r\n funnelAlpha: 0.9,\r\n valueField: 'value',\r\n startX: 0,\r\n alpha: 0.8,\r\n neckWidth: '0%',\r\n startAlpha: 0,\r\n outlineThickness: 1,\r\n neckHeight: '0%',\r\n balloonText: '[[title]]:[[value]]',\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-left',\r\n pathToImages: layoutPaths\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 22.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('ganttChartCtrl', ganttChartCtrl);\r\n\r\n /** @ngInject */\r\n function ganttChartCtrl($element) {\r\n var id = $element[0].getAttribute('id');\r\n var chart = AmCharts.makeChart( id, {\r\n \"type\": \"gantt\",\r\n \"theme\": \"light\",\r\n \"marginRight\": 70,\r\n \"period\": \"hh\",\r\n \"dataDateFormat\":\"YYYY-MM-DD\",\r\n \"balloonDateFormat\": \"JJ:NN\",\r\n \"columnWidth\": 0.5,\r\n \"valueAxis\": {\r\n \"type\": \"date\",\r\n \"minimum\": 7,\r\n \"maximum\": 31\r\n },\r\n \"brightnessStep\": 10,\r\n \"graph\": {\r\n \"fillAlphas\": 1,\r\n \"balloonText\": \"[[task]]: [[open]] [[value]]\"\r\n },\r\n \"rotate\": true,\r\n \"categoryField\": \"category\",\r\n \"segmentsField\": \"segments\",\r\n \"colorField\": \"color\",\r\n \"startDate\": \"2015-01-01\",\r\n \"startField\": \"start\",\r\n \"endField\": \"end\",\r\n \"durationField\": \"duration\",\r\n \"dataProvider\": [\r\n {\r\n \"category\": \"John\",\r\n \"segments\": [ {\r\n \"start\": 7,\r\n \"duration\": 2,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Smith\",\r\n \"segments\": [ {\r\n \"start\": 10,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 1,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n }, {\r\n \"duration\": 4,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n } ]\r\n }, {\r\n \"category\": \"Ben\",\r\n \"segments\": [ {\r\n \"start\": 12,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"start\": 16,\r\n \"duration\": 2,\r\n \"color\": \"#FFE4C4\",\r\n \"task\": \"Task #4\"\r\n } ]\r\n }, {\r\n \"category\": \"Mike\",\r\n \"segments\": [ {\r\n \"start\": 9,\r\n \"duration\": 6,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 4,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n } ]\r\n }, {\r\n \"category\": \"Lenny\",\r\n \"segments\": [ {\r\n \"start\": 8,\r\n \"duration\": 1,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n }, {\r\n \"duration\": 4,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n } ]\r\n }, {\r\n \"category\": \"Scott\",\r\n \"segments\": [ {\r\n \"start\": 15,\r\n \"duration\": 3,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n } ]\r\n }, {\r\n \"category\": \"Julia\",\r\n \"segments\": [ {\r\n \"start\": 9,\r\n \"duration\": 2,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 1,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 8,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Bob\",\r\n \"segments\": [ {\r\n \"start\": 9,\r\n \"duration\": 8,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 7,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Kendra\",\r\n \"segments\": [ {\r\n \"start\": 11,\r\n \"duration\": 8,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"start\": 16,\r\n \"duration\": 2,\r\n \"color\": \"#FFE4C4\",\r\n \"task\": \"Task #4\"\r\n } ]\r\n }, {\r\n \"category\": \"Tom\",\r\n \"segments\": [ {\r\n \"start\": 9,\r\n \"duration\": 4,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 3,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 5,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Kyle\",\r\n \"segments\": [ {\r\n \"start\": 6,\r\n \"duration\": 3,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n } ]\r\n }, {\r\n \"category\": \"Anita\",\r\n \"segments\": [ {\r\n \"start\": 12,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"start\": 16,\r\n \"duration\": 2,\r\n \"color\": \"#FFE4C4\",\r\n \"task\": \"Task #4\"\r\n } ]\r\n }, {\r\n \"category\": \"Jack\",\r\n \"segments\": [ {\r\n \"start\": 8,\r\n \"duration\": 10,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n } ]\r\n }, {\r\n \"category\": \"Kim\",\r\n \"segments\": [ {\r\n \"start\": 12,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 3,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Aaron\",\r\n \"segments\": [ {\r\n \"start\": 18,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#FFE4C4\",\r\n \"task\": \"Task #4\"\r\n } ]\r\n }, {\r\n \"category\": \"Alan\",\r\n \"segments\": [ {\r\n \"start\": 17,\r\n \"duration\": 2,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 2,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n } ]\r\n }, {\r\n \"category\": \"Ruth\",\r\n \"segments\": [ {\r\n \"start\": 13,\r\n \"duration\": 2,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"duration\": 1,\r\n \"color\": \"#8dc49f\",\r\n \"task\": \"Task #3\"\r\n }, {\r\n \"duration\": 4,\r\n \"color\": \"#46615e\",\r\n \"task\": \"Task #1\"\r\n } ]\r\n }, {\r\n \"category\": \"Simon\",\r\n \"segments\": [ {\r\n \"start\": 10,\r\n \"duration\": 3,\r\n \"color\": \"#727d6f\",\r\n \"task\": \"Task #2\"\r\n }, {\r\n \"start\": 17,\r\n \"duration\": 4,\r\n \"color\": \"#FFE4C4\",\r\n \"task\": \"Task #4\"\r\n } ]\r\n } ],\r\n \"valueScrollbar\": {\r\n \"autoGridCount\":true\r\n },\r\n \"chartCursor\": {\r\n \"cursorColor\":\"#55bb76\",\r\n \"valueBalloonsEnabled\": false,\r\n \"cursorAlpha\": 0,\r\n \"valueLineAlpha\":0.5,\r\n \"valueLineBalloonEnabled\": true,\r\n \"valueLineEnabled\": true,\r\n \"zoomable\":false,\r\n \"valueZoomable\":true\r\n },\r\n \"export\": {\r\n \"enabled\": true\r\n }\r\n });\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('LineChartCtrl', LineChartCtrl);\r\n\r\n /** @ngInject */\r\n function LineChartCtrl($scope, baConfig, $element, layoutPaths) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var lineChart = AmCharts.makeChart(id, {\r\n type: 'serial',\r\n theme: 'blur',\r\n color: layoutColors.defaultText,\r\n marginTop: 0,\r\n marginRight: 15,\r\n dataProvider: [\r\n {\r\n year: '1990',\r\n value: -0.17\r\n },\r\n {\r\n year: '1991',\r\n value: -0.254\r\n },\r\n {\r\n year: '1992',\r\n value: 0.019\r\n },\r\n {\r\n year: '1993',\r\n value: -0.063\r\n },\r\n {\r\n year: '1994',\r\n value: 0.005\r\n },\r\n {\r\n year: '1995',\r\n value: 0.077\r\n },\r\n {\r\n year: '1996',\r\n value: 0.12\r\n },\r\n {\r\n year: '1997',\r\n value: 0.011\r\n },\r\n {\r\n year: '1998',\r\n value: 0.177\r\n },\r\n {\r\n year: '1999',\r\n value: -0.021\r\n },\r\n {\r\n year: '2000',\r\n value: -0.037\r\n },\r\n {\r\n year: '2001',\r\n value: 0.03\r\n },\r\n {\r\n year: '2002',\r\n value: 0.179\r\n },\r\n {\r\n year: '2003',\r\n value: 0.2\r\n },\r\n {\r\n year: '2004',\r\n value: 0.180\r\n },\r\n {\r\n year: '2005',\r\n value: 0.21\r\n }\r\n ],\r\n valueAxes: [\r\n {\r\n axisAlpha: 0,\r\n position: 'left',\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n }\r\n ],\r\n graphs: [\r\n {\r\n id: 'g1',\r\n balloonText: '[[value]]',\r\n bullet: 'round',\r\n bulletSize: 8,\r\n lineColor: layoutColors.danger,\r\n lineThickness: 1,\r\n negativeLineColor: layoutColors.warning,\r\n type: 'smoothedLine',\r\n valueField: 'value'\r\n }\r\n ],\r\n chartScrollbar: {\r\n graph: 'g1',\r\n gridAlpha: 0,\r\n color: layoutColors.defaultText,\r\n scrollbarHeight: 55,\r\n backgroundAlpha: 0,\r\n selectedBackgroundAlpha: 0.05,\r\n selectedBackgroundColor: layoutColors.defaultText,\r\n graphFillAlpha: 0,\r\n autoGridCount: true,\r\n selectedGraphFillAlpha: 0,\r\n graphLineAlpha: 0.2,\r\n selectedGraphLineColor: layoutColors.defaultText,\r\n selectedGraphLineAlpha: 1\r\n },\r\n chartCursor: {\r\n categoryBalloonDateFormat: 'YYYY',\r\n cursorAlpha: 0,\r\n valueLineEnabled: true,\r\n valueLineBalloonEnabled: true,\r\n valueLineAlpha: 0.5,\r\n fullWidth: true\r\n },\r\n dataDateFormat: 'YYYY',\r\n categoryField: 'year',\r\n categoryAxis: {\r\n minPeriod: 'YYYY',\r\n parseDates: true,\r\n minorGridAlpha: 0.1,\r\n minorGridEnabled: true,\r\n gridAlpha: 0.5,\r\n gridColor: layoutColors.border,\r\n },\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-right',\r\n pathToImages: layoutPaths.images.amChart\r\n });\r\n\r\n lineChart.addListener('rendered', zoomChart);\r\n if (lineChart.zoomChart) {\r\n lineChart.zoomChart();\r\n }\r\n\r\n function zoomChart() {\r\n lineChart.zoomToIndexes(Math.round(lineChart.dataProvider.length * 0.4), Math.round(lineChart.dataProvider.length * 0.55));\r\n }\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.charts.amCharts')\r\n .controller('PieChartCtrl', PieChartCtrl);\r\n\r\n /** @ngInject */\r\n function PieChartCtrl($element, layoutPaths, baConfig) {\r\n var layoutColors = baConfig.colors;\r\n var id = $element[0].getAttribute('id');\r\n var pieChart = AmCharts.makeChart(id, {\r\n type: 'pie',\r\n startDuration: 0,\r\n theme: 'blur',\r\n addClassNames: true,\r\n color: layoutColors.defaultText,\r\n labelTickColor: layoutColors.borderDark,\r\n legend: {\r\n position: 'right',\r\n marginRight: 100,\r\n autoMargins: false,\r\n },\r\n innerRadius: '40%',\r\n defs: {\r\n filter: [\r\n {\r\n id: 'shadow',\r\n width: '200%',\r\n height: '200%',\r\n feOffset: {\r\n result: 'offOut',\r\n in: 'SourceAlpha',\r\n dx: 0,\r\n dy: 0\r\n },\r\n feGaussianBlur: {\r\n result: 'blurOut',\r\n in: 'offOut',\r\n stdDeviation: 5\r\n },\r\n feBlend: {\r\n in: 'SourceGraphic',\r\n in2: 'blurOut',\r\n mode: 'normal'\r\n }\r\n }\r\n ]\r\n },\r\n dataProvider: [\r\n {\r\n country: 'Lithuania',\r\n litres: 501.9\r\n },\r\n {\r\n country: 'Czech Republic',\r\n litres: 301.9\r\n },\r\n {\r\n country: 'Ireland',\r\n litres: 201.1\r\n },\r\n {\r\n country: 'Germany',\r\n litres: 165.8\r\n },\r\n {\r\n country: 'Australia',\r\n litres: 139.9\r\n },\r\n {\r\n country: 'Austria',\r\n litres: 128.3\r\n },\r\n {\r\n country: 'UK',\r\n litres: 99\r\n },\r\n {\r\n country: 'Belgium',\r\n litres: 60\r\n }\r\n ],\r\n valueField: 'litres',\r\n titleField: 'country',\r\n export: {\r\n enabled: true\r\n },\r\n creditsPosition: 'bottom-left',\r\n\r\n autoMargins: false,\r\n marginTop: 10,\r\n alpha: 0.8,\r\n marginBottom: 0,\r\n marginLeft: 0,\r\n marginRight: 0,\r\n pullOutRadius: 0,\r\n pathToImages: layoutPaths.images.amChart,\r\n responsive: {\r\n enabled: true,\r\n rules: [\r\n // at 900px wide, we hide legend\r\n {\r\n maxWidth: 900,\r\n overrides: {\r\n legend: {\r\n enabled: false\r\n }\r\n }\r\n },\r\n\r\n // at 200 px we hide value axis labels altogether\r\n {\r\n maxWidth: 200,\r\n overrides: {\r\n valueAxes: {\r\n labelsEnabled: false\r\n },\r\n marginTop: 30,\r\n marginBottom: 30,\r\n marginLeft: 30,\r\n marginRight: 30\r\n }\r\n }\r\n ]\r\n }\r\n });\r\n\r\n pieChart.addListener('init', handleInit);\r\n\r\n pieChart.addListener('rollOverSlice', function (e) {\r\n handleRollOver(e);\r\n });\r\n\r\n function handleInit() {\r\n pieChart.legend.addListener('rollOverItem', handleRollOver);\r\n }\r\n\r\n function handleRollOver(e) {\r\n var wedge = e.dataItem.wedge.node;\r\n wedge.parentNode.appendChild(wedge);\r\n }\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 24/12/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .controller('composeBoxCtrl', composeBoxCtrl);\r\n\r\n /** @ngInject */\r\n function composeBoxCtrl(subject, to, text) {\r\n var vm = this;\r\n vm.subject = subject;\r\n vm.to = to;\r\n vm.text = text;\r\n }\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 12/24/15\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .service('composeModal', composeModal);\r\n\r\n /** @ngInject */\r\n function composeModal($uibModal) {\r\n this.open = function(options){\r\n return $uibModal.open({\r\n animation: false,\r\n templateUrl: 'app/pages/components/mail/composeBox/compose.html',\r\n controller: 'composeBoxCtrl',\r\n controllerAs: 'boxCtrl',\r\n size: 'compose',\r\n resolve: {\r\n subject: function () {\r\n return options.subject;\r\n },\r\n to: function () {\r\n return options.to;\r\n },\r\n text: function () {\r\n return options.text;\r\n }\r\n }\r\n });\r\n }\r\n\r\n }\r\n\r\n})();\n/**\r\n * @author a.demeshko\r\n * created on 28.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .controller('MailDetailCtrl', MailDetailCtrl);\r\n\r\n /** @ngInject */\r\n function MailDetailCtrl($stateParams, mailMessages) {\r\n var vm = this;\r\n vm.mail = mailMessages.getMessageById($stateParams.id);\r\n vm.label = $stateParams.label;\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author a.demeshko\r\n * created on 28.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.components.mail')\r\n .controller('MailListCtrl', MailListCtrl);\r\n\r\n /** @ngInject */\r\n function MailListCtrl($stateParams, mailMessages) {\r\n var vm = this;\r\n vm.messages = mailMessages.getMessagesByLabel($stateParams.label);\r\n vm.label = $stateParams.label;\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovsky\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.ui.modals')\r\n .controller('NotificationsCtrl', NotificationsCtrl);\r\n\r\n /** @ngInject */\r\n function NotificationsCtrl($scope, toastr) {\r\n $scope.showSuccessMsg = function() {\r\n toastr.success('Your information has been saved successfully!');\r\n };\r\n\r\n $scope.showInfoMsg = function() {\r\n toastr.info(\"You've got a new email!\", 'Information');\r\n };\r\n\r\n $scope.showErrorMsg = function() {\r\n toastr.error(\"Your information hasn't been saved!\", 'Error');\r\n };\r\n\r\n $scope.showWarningMsg = function() {\r\n toastr.warning('Your computer is about to explode!', 'Warning');\r\n };\r\n }\r\n\r\n})();\r\n\n/* Minified js for jQuery BackTop */\r\n!function(o){o.fn.backTop=function(e){var n=this,i=o.extend({position:400,speed:500,color:\"white\"},e),t=i.position,c=i.speed,d=i.color;n.addClass(\"white\"==d?\"white\":\"red\"==d?\"red\":\"green\"==d?\"green\":\"black\"),n.css({right:40,bottom:40,position:\"fixed\"}),o(document).scroll(function(){var e=o(window).scrollTop();e>=t?n.fadeIn(c):n.fadeOut(c)}),n.click(function(){o(\"html, body\").animate({scrollTop:0},{duration:1200})})}}(jQuery);\n/**\r\n * @author v.lugovsky\r\n * created on 22.04.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .controller('SelectpickerPanelCtrl', SelectpickerPanelCtrl);\r\n\r\n /** @ngInject */\r\n function SelectpickerPanelCtrl() {\r\n var vm = this;\r\n\r\n vm.standardSelectItems = [\r\n { label: 'Option 1', value: 1 },\r\n { label: 'Option 2', value: 2 },\r\n { label: 'Option 3', value: 3 },\r\n { label: 'Option 4', value: 4 },\r\n ];\r\n\r\n vm.selectWithSearchItems = [\r\n { label: 'Hot Dog, Fries and a Soda', value: 1 },\r\n { label: 'Burger, Shake and a Smile', value: 2 },\r\n { label: 'Sugar, Spice and all things nice', value: 3 },\r\n { label: 'Baby Back Ribs', value: 4 },\r\n ];\r\n\r\n vm.groupedSelectItems = [\r\n { label: 'Group 1 - Option 1', value: 1, group: 'Group 1' },\r\n { label: 'Group 2 - Option 2', value: 2, group: 'Group 2' },\r\n { label: 'Group 1 - Option 3', value: 3, group: 'Group 1' },\r\n { label: 'Group 2 - Option 4', value: 4, group: 'Group 2' },\r\n ];\r\n\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .directive('selectpicker', selectpicker);\r\n\r\n /** @ngInject */\r\n function selectpicker() {\r\n return {\r\n restrict: 'A',\r\n require: '?ngOptions',\r\n priority: 1500, // make priority bigger than ngOptions and ngRepeat\r\n link: {\r\n pre: function (scope, elem, attrs) {\r\n elem.append('')\r\n },\r\n post: function(scope, elem, attrs) {\r\n function refresh() {\r\n elem.selectpicker('refresh');\r\n }\r\n\r\n if (attrs.ngModel) {\r\n scope.$watch(attrs.ngModel, refresh);\r\n }\r\n\r\n if (attrs.ngDisabled) {\r\n scope.$watch(attrs.ngDisabled, refresh);\r\n }\r\n\r\n elem.selectpicker({ dropupAuto: false});\r\n }\r\n }\r\n };\r\n }\r\n\r\n\r\n})();\n/**\r\n * @author v.lugovsky\r\n * created on 07.06.2016\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .controller('SwitchPanelCtrl', SwitchPanelCtrl);\r\n\r\n /** @ngInject */\r\n function SwitchPanelCtrl() {\r\n var vm = this;\r\n\r\n vm.switcherValues = {\r\n primary: true,\r\n warning: true,\r\n danger: true,\r\n info: true,\r\n success: true\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .directive('switch', switchDirective);\r\n\r\n /** @ngInject */\r\n function switchDirective($timeout) {\r\n return {\r\n restrict: 'EA',\r\n replace: true,\r\n scope: {\r\n ngModel: '='\r\n },\r\n template: function(el, attrs) {\r\n return '
';\r\n },\r\n link: function (scope, elem, attr) {\r\n $timeout(function(){\r\n var input = $(elem).find('input');\r\n input.bootstrapSwitch({\r\n size: 'small',\r\n onColor: attr.color\r\n });\r\n input.on('switchChange.bootstrapSwitch', function(event, state) {\r\n scope.ngModel = state;\r\n scope.$apply();\r\n });\r\n\r\n });\r\n }\r\n };\r\n }\r\n})();\r\n\n/**\r\n * @author v.lugovksy\r\n * created on 16.12.2015\r\n */\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('BlurAdmin.pages.form')\r\n .directive('tagInput', tagInput);\r\n\r\n /** @ngInject */\r\n function tagInput() {\r\n return {\r\n restrict: 'A',\r\n link: function( $scope, elem, attr) {\r\n $(elem).tagsinput({\r\n tagClass: 'label label-' + attr.tagInput\r\n });\r\n }\r\n };\r\n }\r\n})();\nangular.module(\"BlurAdmin\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"app/modals/EditorImageUpload.html\",\"

Insert Image

Selected: {{SelectedImage.OriginalFileName}}

Wrong file type. Must be one of the following: {{e.$errorParam}} File size too big. Must be no more than {{e.$errorParam}}

0 && progress < 100\\\" class=\\\"progress-striped active\\\" value=\\\"progress\\\">

Drop Images Here
or
Click To Browse

\");\n$templateCache.put(\"app/tpls/AllDiscusions.html\",\"

Invalid Invitation Code

You\\'ve been invited to participate in a discussion group:

Group Description:
{{InviteGroupDetail.Description}}

Discussions Main

{{GroupDetail.Name}} Public Group Private Group

{{GroupDetail.Description}}

New PostCreate Group 0\\\" ng-click=\\\"Invite(GroupDetail)\\\">Invite Users

Discussions Main

My Groups ({{MyGroups.length}})
Groups Available To Join ({{AvailableGroups.length}})
Public Private {{GroupDetail.Name}}

{{GroupDetail.Description}}

New PostCreate Group 0\\\" ng-click=\\\"Invite(GroupDetail)\\\">Invite Users

0\\\">
Pending Membership Requests
  1. {{jreq.DisplayName}}- {{jreq.Message}}
    APPROVE asor REJECT
0\\\">
Email Address

Include Message:

Group Name

Group Description

Editing post

Post To

Edit {{post.CreatedDateTime | date : \\'short\\'}} {{post.Replies}}
\");\n$templateCache.put(\"app/tpls/ChildReplies.html\",\"\");\n$templateCache.put(\"app/tpls/GlobalSettings.html\",\"

WARNING: These settings have immediate effects on the production environment. Please use care.

Store promo area content

Promo Bar Pages:

(Under development, PromoBar shows on all pages when enabled)

Bar content should be one line only. The .btn-xs button class fits. Use only small (under 32px height) images.

Promo bar content for desktop users

Promo bar content for mobile users

Video URL (HTTPS required; Vimeo or YouTube only)

Video title card URL (HTTPS required; 16:9 JPEG)

Get Started main content

\");\n$templateCache.put(\"app/tpls/NoteWidget.html\",\"
Notes:

No notes to display
Add

Add Note

\");\n$templateCache.put(\"app/tpls/PostReplies.html\",\"\");\n$templateCache.put(\"app/tpls/UserPurchaseHistory.html\",\"
DateProductPriceExtended PriceDiscount
{{pch.TransactionDateTime}}{{pch.Name}}{{((1*pch.Price)+(1*pch.Discount)) | currency:\\'$\\'}}{{pch.Price | currency:\\'$\\'}}-{{pch.Discount | currency:\\'$\\'}} (Code: {{pch.DiscountCode}} )
\");\n$templateCache.put(\"app/tpls/assettrial.html\",\"Expires: {{ThisTrial[0].Expires.split(\\' \\')[0]}} Add To Cart View Product
Trial Information

{{ThisTrial[0].Name}}

Expire{{(ThisTrial[0].TrialHasExpired===\\\"True\\\"?\\'d\\':\\'s\\')}} {{ThisTrial[0].Expires.split(\\' \\')[0]}}

from
{{ThisTrial[0].Price | currency:\\'$\\':0}}

Add To Cart

View Product

\");\n$templateCache.put(\"app/tpls/inline-edit.html\",\"
{{model}} edit
\");\n$templateCache.put(\"app/tpls/inlineQuestion.html\",\"
{{displaymode}}

  Tries Remaining:  0,\\'fa fa-circle used-try\\':1*Question.Question.RemainingTries==0}\\\">
 
Edited: {{Question.LastReview | date:\\'mediumDate\\'}}
\");\n$templateCache.put(\"app/tpls/instuserprogress.html\",\"

Proficiency for specialty:

Display users from:

Order by:

Rows per page:

No users have enough scored work to show probability data for this specialty.

     {{u.Class}}   {{u.FirstName + \\' \\' + u.LastName}}
Name{{u.FirstName+\\' \\'+u.LastName}}
Login{{u.Username}}
Email {{u.Email}}
Class{{u.Class}}

Proficiency Information for {{u.FirstName+\\' \\'+u.LastName}}

Exam Pass Likelihood{{u.Likelihood}} ({{u.RealIndex | number:0}}%)
Board Exam Sims
Exam Sims Completed{{u.BoardSimsTaken | number:0}}
Exam Sim Avg. Score 0\\\">{{u.BoardSimAvg | number:1}} %N/A
Last Completed Exam Sim{{(u.BoardSimsTaken > 0 ? u.BoardSimDaysSince+\\' day\\'+(u.BoardSimDaysSince != 1 ? \\'s\\' : \\'\\')+\\' ago\\' : \\'N/A\\')}}
All Other Assessments
Other Assessments Completed{{u.NonBoardSimsTaken | number:0}}
Other Assessment Avg. Score 0\\\">{{u.NonBoardSimAvg | number:1}} %N/A
Last Completed Other Assessment{{(u.NonBoardSimsTaken > 0 ? u.NonBoardSimDaysSince+\\' day\\'+(u.NonBoardSimDaysSince != 1 ? \\'s\\' : \\'\\')+\\' ago\\' : \\'N/A\\')}}
\");\n$templateCache.put(\"app/tpls/instuserprogressmeter.html\",\"
\");\n$templateCache.put(\"app/tpls/instuserprogressmini.html\",\"

Proficiency for specialty:

Display users from:

Order by:

Rows per page:

No users have enough scored work to show probability data for this specialty.

    {{u.Class}}   {{u.FirstName + \\' \\' + u.LastName}}
Name{{u.FirstName+\\' \\'+u.LastName}}
Login{{u.Username}}
Email {{u.Email}}
Class{{u.Class}}

Proficiency Information for {{u.FirstName+\\' \\'+u.LastName}}

Exam Pass Likelihood{{u.Likelihood}} ({{u.RealIndex | number:0}}%)
Board Exam Sims
Exam Sims Completed{{u.BoardSimsTaken | number:0}}
Exam Sim Avg. Score 0\\\">{{u.BoardSimAvg | number:1}} %N/A
Last Completed Exam Sim{{(u.BoardSimsTaken > 0 ? u.BoardSimDaysSince+\\' day\\'+(u.BoardSimDaysSince != 1 ? \\'s\\' : \\'\\')+\\' ago\\' : \\'N/A\\')}}
All Other Assessments
Other Assessments Completed{{u.NonBoardSimsTaken | number:0}}
Other Assessment Avg. Score 0\\\">{{u.NonBoardSimAvg | number:1}} %N/A
Last Completed Other Assessment{{(u.NonBoardSimsTaken > 0 ? u.NonBoardSimDaysSince+\\' day\\'+(u.NonBoardSimDaysSince != 1 ? \\'s\\' : \\'\\')+\\' ago\\' : \\'N/A\\')}}
\");\n$templateCache.put(\"app/tpls/manage-users.html\",\"
{{Inst.Settings.AdminTerm}} Slots Allocated: {{AdminCount}} | {{Inst.Settings.FacultyTerm}} Slots Allocated: {{FacultyCount}} | {{Inst.Settings.LearnerTerm}} Slots Allocated: {{StudentCount}} | Inactive: {{InactiveCount}} | UnAllocated: {{UnAllocatedCount}}
Bulk CSV Template
Contact sales@chall.com\\'\\\" tooltip-placement=\\\"bottom\\\">Used Slots: {{Inst.Users.length - Inst.FacultySlots}} / {{Inst.StudentSlots}}
\");\n$templateCache.put(\"app/tpls/mediaLib.html\",\"
Media Library
\");\n$templateCache.put(\"app/tpls/moreslots.html\",\"Need more? Email sales@chall.com\");\n$templateCache.put(\"app/tpls/percentBar.html\",\"
{{percent | number : 0}}%
\");\n$templateCache.put(\"app/tpls/premium-promo.html\",\"

Premium Membership:

  • Applies 12 months of Premium Membership to your account
  • Keeps every product purchase in your Challenger account fresh and ready for use for less than $17/mo.
  • Never have to re-buy your review and MOC/CME required materials ever again
  • Includes free content updates to all assets, CME claims, annual CME credit usage renewal, and any new course editions.

You will be notified prior to any active membership expiry. Opt-out of renewal at any time.

$199 / year

Add To Cart

\");\n$templateCache.put(\"app/tpls/progdashmain.html\",\"

Directive/progdashmain

app/tpls/progdashmain.html

Proficiency
\");\n$templateCache.put(\"app/tpls/progmanageusers.html\",\"
{{Inst.Settings.AdminTerm}} Slots Allocated: {{AdminCount}} | {{Inst.Settings.FacultyTerm}} Slots Allocated: {{FacultyCount}} | {{Inst.Settings.LearnerTerm}} Slots Allocated: {{StudentCount}} | Inactive: {{InactiveCount}} | UnAllocated: {{UnAllocatedCount}}
     Import Users:
CSV Template
Contact sales@chall.com\\'\\\" tooltip-placement=\\\"bottom\\\">Used Slots: {{Inst.Users.length - Inst.FacultySlots}} / {{Inst.StudentSlots}}
\");\n$templateCache.put(\"app/tpls/promobar.html\",\"

\");\n$templateCache.put(\"app/tpls/questionLibrary.html\",\"

Question Library

Total Questions: {{Questions.length}}

Filter:       Show:

Loading Questions....

0\\\" ui-tree=\\\"TreeOptions\\\">
{{question.Name}}

Name

We\\'ll use this so you can easily identify your questions. Question names will not appear in assessments.

Publish Status

Available for use in custom content?

Privacy/Sharing

Who else should be able to use this question in their custom content?

Tags

Tags help you keep track of, organize, and search for questions. (E.g. emergency, pediatric, cardiac, etc). Press enter to save each tag.

Question Stem

This is the question itself. All prompts necessary to correctly answer your question should be in the stem, including lab measurements, images, audio recordings, etc.

Answers

Answer options should be clear, concise, and unambiguous.



  

Remediation

The remediation will be displayed to the user after they have scored an assessment containing your question. Explain in detail the correct answer to your question here. This is the place to insert links to references if you have them.




Remediation:
Incorrect Remediation:
Correct Remediation:

\");\n$templateCache.put(\"app/tpls/quickquiz.html\",\"
Your Avg. Rank:
= 10000,\\'avgrank-4\\':QuickQuiz.RankAverage >= 1000 && QuickQuiz.RankAverage < 10000,\\'avgrank-3\\':QuickQuiz.RankAverage >= 100 && QuickQuiz.RankAverage < 1000}\\\" class=\\\"avgrank qqtoplevelinfo\\\">{{QuickQuiz.RankAverage || \\\"0\\\" | number:0 }}
Your Average Rank:Over last 5 quizzes
{{QuickQuiz.RankAverage || \\\"0\\\" | number:0 }}
Unclaimed Quiz CME:
{{QuickQuizCME || \\\"0\\\"}} 0\\\">
Claim
All-Time High Score:
{{Settings.QQHighScore || \\\"0\\\" | number:0}}
To earn CME, score an 80% or better.

Loading, just a sec...

0 || Loading.IsHappening\\\">
New!{{Quiz.Name}}
RankScoreTimePoints
Take = 80\\\">Review Retake Take Quiz = 80\\\">Review Q&A Retake Q&A Ranks Close Show Ranks Close Ranks{{Quiz.Rank || \\\"--\\\"}} Quiz.Score && Quiz.Score !== \\'\\', \\'assigncomplete\\' : Quiz.Score >= 80 }\\\" style=\\\"border-radius:20px; padding: 0px 4px 1px 3px; cursor:pointer\\\"> Quiz.Score && Quiz.Score !== \\'\\'\\\" tooltip-placement=\\\"bottom\\\" tooltip-html-unsafe=\\\"You need to score 80% or better for CME. Click "Retake" to access and retake the CME Assessment to improve your score.\\\"> Quiz.Score\\\"> {{Quiz.Score || \\\"--\\\"}} 0\\\">% = 80\\\" tooltip-placement=\\\"bottom\\\" tooltip-html-unsafe=\\\"You have earned CME for this Quick Quiz.\\\">= 80\\\"> {{Quiz.Score || \\\"--\\\"}} 0\\\">% ----= 3600\\\">{{Quiz.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"H\\'h\\'\\\"}} = 60\\\">{{Quiz.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"m\\'m\\'\\\"}} 0\\\">{{Quiz.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"s\\\"}}.{{Quiz.partialSeconds}}s-- 0\\\">{{Quiz.Points | number:0}}{{Quiz.Points}}
{{Quiz.completedCurrentPage}} of {{Quiz.activityPageInfo.TotalPages}} Show: Report Abuse
0\\\" style=\\\"text-align:left;\\\" ng-repeat=\\\"r in Quiz.Results\\\">
RankGame AliasNameClassScoreTimePoints
{{r.Rank}} {{r.Rank}} {{r.NickName}}{{r.FirstName}} {{r.LastName}}{{r.ClassName}}--{{r.Score}}{{r.Score}}%= 3600\\\">{{r.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"H\\'h\\'\\\"}} = 60\\\">{{r.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"m\\'m\\'\\\"}} 0\\\">{{r.TimeToTake || \\'\\' | secondsToDateTime | date:\\\"s\\\"}}.{{r.partialSeconds}}s{{r.Points | number:0}}
No Rankings Yet
 
Rankings as of: {{RightNow | date: \\'MMM d, y h:mm a\\'}}. Rankings continually change. Check back later to see how you stack up!
  • ->
  • ->
\\\" ng-click=\\\"Next()\\\">
\");\n$templateCache.put(\"app/tpls/quickquizdata.html\",\"
\");\n$templateCache.put(\"app/tpls/storepromoarea.html\",\"
\");\n$templateCache.put(\"app/tpls/trialbar.html\",\"
Your free trial, {{$root.TrialProducts[0].Name}}, expires {{$root.TrialProducts[0].Expires.split(\\' \\')[0]}}. has expired! Buy NowUnlock Full Product Buy NowUnlock Full Product
1\\\">You have {{$root.ActiveTrialProducts.length}} active trial{{($root.ActiveTrialProducts.length>1?\\'s\\':\\'\\')}} {{($root.ExpiredTrialProducts.length==0?\\'.\\':\\' and \\')}} {{$root.ExpiredTrialProducts.length}} expired trial{{($root.ExpiredTrialProducts.length>1?\\'s\\':\\'\\')}}. View Trials
\");\n$templateCache.put(\"app/tpls/trialproducts.html\",\"

Here are the Med-Challenger products for which you have an active or expired trial.

To extend an expired trial, please contact Challenger Sales:

1-800-676-0822, Option 1
8AM—6PM CT, M-F

ProductTrial StatusExpirationPurchase
{{t.Name}}{{(t.TrialHasExpired==\\\"True\\\"?\\'Expired\\':\\'Active\\')}}{{t.Expires.split(\\' \\')[0]}}Unlock Now
\");\n$templateCache.put(\"app/pages/Media/media.html\",\"
\");\n$templateCache.put(\"app/pages/activity/activity.html\",\"
Last Login: {{Profile.LastActivityDate | date: \\'MM/dd/yyyy\\'}}

Assessments In-Progress


CourseAssessmentDateProgressResumeRemove
Expired Trial{{Assessment.StartDateTime | date:\\'mediumDate\\'}} {{Assessment.StartDateTime | date:\\'mediumDate\\'}}{{Assessment.PercentComplete | number:0}}%

to review performance and prescription of your Assessments.\\\">

Recent Assessments Scored

{{completedCurrentPage}} of {{activityPageInfo.TotalPages}} Show:

CourseAssessmentDateScoreDetails

Expired Trial
=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%{{Assessment.EndDateTime | date:\\'mediumDate\\'}}
Expired Trial {{Assessment.EndDateTime | date:\\'mediumDate\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%
\");\n$templateCache.put(\"app/pages/activity/inprogress.html\",\"
Last Login: {{Profile.LastActivityDate | date: \\'MM/dd/yyyy\\'}}

Assessments In-Progress


CourseAssessmentDateProgressResumeRemove
Expired Trial{{Assessment.StartDateTime | date:\\'mediumDate\\'}} {{Assessment.StartDateTime | date:\\'mediumDate\\'}}{{Assessment.PercentComplete | number:0}}%

\");\n$templateCache.put(\"app/pages/activity/scorelog.html\",\"
to review performance and prescription of your Assessments.\\\">

Recent Assessments Scored

Recent Assessments Scored

{{Completed.length}} resultsShow:

(View Prescription) and/or (Retry Assessment) may be disabled depending on assignment status

You don\\'t have a current premium subscription. Assessment detail and retry functionality will be limited to Quick Quizzes, non-premium content, and assessments belonging to an active free trial.

CourseAssessmentDateScore

Expired Trial
=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%{{Assessment.EndDateTime | date:\\'mediumDate\\'}}
Expired Trial hi {{Assessment.EndDateTime | date:\\'mediumDate\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%
\");\n$templateCache.put(\"app/pages/administration/UserSale.html\",\"
PLEASE WAIT

Place Order for {{user.DisplayName}}

Select A Product

{{item.Name}}
This product includes one year of Premium Membership
{{item.Price | currency:\\\"$\\\"}} 0\\\">({{item.Discount | currency:\\\"$\\\"}} Discount) ({{(1*item.Price)+(1*item.Discount) | currency:\\\"$\\\"}} + {{-1*item.Discount | currency:\\\"$\\\"}} add-on) Already owned!
ItemPrice
{{item.Name}}
0\\\">
  • {{modifier.Name}}
    • {{opt.Description}} - {{opt.Value}}
{{item.Price | currency:\\\"$\\\"}}$0.00
0\\\">({{item.Discount | currency:\\\"$\\\"}} Discount) ({{(1*item.Price)+(1*item.Discount) | currency:\\\"$\\\"}} + {{-1*item.Discount | currency:\\\"$\\\"}} add-on) You already own this!
Total:{{Cart.TotalPrice | currency:\\\"$\\\"}}
Select A Payment Method

0\\\"> 
Discount Applied: {{Discount.Name}}


Promotional Add-On Applied: {{Discount.Name}}

 
Sorry, that\\'s not a valid promotional code.

 
Sorry, that promotional code has expired.

The selected payment method is expired. Select or add a different one.


\");\n$templateCache.put(\"app/pages/administration/administrator.html\",\"

Administration Pages

New Institution

\");\n$templateCache.put(\"app/pages/administration/badproduct.html\",\"
BAD PRODUCT!
\");\n$templateCache.put(\"app/pages/administration/sales.html\",\"

Sales Administration Pages

\");\n$templateCache.put(\"app/pages/administration/staff.html\",\"

Platform Administration Pages

New Institution
DeleteEditDiscount NameDiscount Code% or Amount OffExpiration
{{discount.Name}}{{discount.Code}}{{discount.Value | currency:\\\"$\\\"}}{{discount.Value | number: 2}}%{{discount.Expires | date:\\'medium\\'}}
\");\n$templateCache.put(\"app/pages/assessment/assessment.html\",\"
\");\n$templateCache.put(\"app/pages/assessment/assessmenthistory.html\",\"
\");\n$templateCache.put(\"app/pages/assessment/questionpool.html\",\"\");\n$templateCache.put(\"app/pages/assets/assets.html\",\"
\");\n$templateCache.put(\"app/pages/assignments/assignees-ddl.html\",\"
{{filtered.length}} results  per page
First NameLast NameClass
No Results
{{student.FirstName}}{{student.LastName}}{{student.ClassName}}
\");\n$templateCache.put(\"app/pages/assignments/assignment.html\",\"
Editing Assignments:
  • {{Id}}
Getting Assignments Ready for Review...
{{AssignmentProgressPercent}}% Complete

Initializing Assignment Wizard...

When assignments are created, they will immediately appear in assignees\\' My Assignments list. The options in this wizard affect assignment access and compliance restrictions.

Assessments scored before assignment start date or after due date will not count as assignment completion. To complete an assignment, the assignee must achieve a passing score within the assignment\\'s date range.

Assignment Dates

Start Date

Start Date:

Immediately

Set individual dates below

Due Date

Due Date:

Set individual dates below

Result:

All assignments in this batch will start on {{EffectiveDate | date:\\'mediumDate\\'}} and be due on {{DueDate | date:\\'mediumDate\\'}}.
All assignments in this batch will start on {{EffectiveDate | date:\\'mediumDate\\'}}. Due dates must be set indivdually below.
Start dates must be set individually below. All assignments in this batch will be due on {{DueDate | date:\\'mediumDate\\'}}.
Start and due dates must be set individually below.

Assessments & Exams to Include In Assignment

Select Course

Filter List

Display:

Select Assessments & Exams

Assessment/ExamQuestion Count:
(Per Assessment / Total In Pool)
Effective Date:Due Date:
  • 0\\\" class=\\\"form-control border-info\\\" ng-change=\\\"FillDueDateDown(course)\\\" style=\\\"display:{{course.DetailDisplay}};max-width:160px\\\" type=\\\"date\\\" ng-model=\\\"course.DueDate\\\">
    • {{assessment.QuestionCount}} / {{assessment.TotalQuestions}}

Select Assignees

Set individual assignees below

Assignment Score

Required

Set individual passing scores below

Advanced Assignment Options

Send notification email to assignee(s):

day(s) before due date

day(s) before due date

Also send this notification to: (optional) Separate multiple addresses with semicolon (ex. user1@acme.edu;user2@acme.edu;user3@acme.edu)

Also send this notification to: (optional) Separate multiple addresses with semicolon (ex. user1@acme.edu;user2@acme.edu;user3@acme.edu)

Also send this notification to: (optional) Separate multiple addresses with semicolon (ex. user1@acme.edu;user2@acme.edu;user3@acme.edu)

{{confirmText}}

0 && AssignmentProgressPercent != 100\\\" class=\\\"progress\\\">
{{AssignmentProgressPercent}}% Complete
0 && saveprogress != 100\\\" class=\\\"progress\\\">
{{saveprogress | number:0}}% Complete
You have at least one user assigned to the same Assessment with the same Due Date. Click the to remove the duplicate.

Assignment Batch Settings:

Basic Settings
Start Date:{{EffectiveDate | date:\\'mediumDate\\'}}Individual start dates set, see below
Due Date:{{DueDate | date:\\'mediumDate\\'}}Individual due dates set, see below
Passing Score:{{PassingScore}}Individual scores set, see below
Visibility & Feature Restrictions
Show Assessment(s):No restriction Hidden until start date Viewable only between start and due dates
Enable Practice & Review:Immediately / always After first score After first passing score After due date Never
Enable ℞ / Answer Key:Immediately / always After first score After first passing score After due date Never
Time & Attempt Limits
Time Limit:{{MinutesAllocated}} minutes per attemptUnlimited time
Attempt Limit:{{NumTries}} attempt 1\\\">s per assigneeUnlimited attempts
Assignee Notification Settings
Notify Assignee:Never Immediately after creation On start date When created & on start date
Remind Assignees of Due Date:{{SendReminderHours}} day 1\\\">s before due dateDo not send reminder
Instructor Notification Settings
Notify Me of Incomplete Assignments:{{SendPendingHours}} day 1\\\">s before due date

Additional recipients:
{{v}}

Do not notify me
Notify Me On Due Date:Notify me

Additional recipients:
{{v}}

Do not notify me
Notify Me When Each Assignee Has Completed:Notify me

Additional recipients:
{{v}}

Do not notify me

Assignments To Be Created:

{{filteredqueue.length}} resultsper page
AssignmentAssigneeClassPassing ScoreStart DateDue Date
No Results
{{student.AssignName}}{{student.Name}}{{student.ClassName}}{{student.Passing_Score}}{{student.EffectiveDateTime | date:\\\"mediumDate\\\"}}{{student.DueDateTime | date:\\\"mediumDate\\\"}}
\");\n$templateCache.put(\"app/pages/assignments/tootltip.html\",\"
{{task.model.FullLabel}}
\");\n$templateCache.put(\"app/pages/cmes/cmeclaim.html\",\"
\");\n$templateCache.put(\"app/pages/cmes/cmefinderpage.html\",\"
\");\n$templateCache.put(\"app/pages/cmes/cmes.html\",\"
\");\n$templateCache.put(\"app/pages/courseware/CourseByChapter.html\",\"
{{Chapter.Chapter.Name}}
\");\n$templateCache.put(\"app/pages/courseware/StudyChapterTopics.html\",\"\");\n$templateCache.put(\"app/pages/courseware/cme.html\",\"
\");\n$templateCache.put(\"app/pages/courseware/cmesubtopic.html\",\"
\");\n$templateCache.put(\"app/pages/courseware/cmetopic.html\",\"\");\n$templateCache.put(\"app/pages/courseware/courseware.html\",\"

Select an asset to expand it and see Study and CME options...

\");\n$templateCache.put(\"app/pages/courseware/exam.html\",\"
AssessmentId: {{AssessmentId}}
\");\n$templateCache.put(\"app/pages/courseware/exams.html\",\"
\");\n$templateCache.put(\"app/pages/courseware/myexams.html\",\"
\");\n$templateCache.put(\"app/pages/courseware/newexam.html\",\"

Saving exam, please wait

Creating custom exam \\\"{{vm.Exam.Name}}\\\"...
Selecting questions...done
Sorting and grouping...done
Reticulating splines...done
Applying exam preferences...done
Verifying... ... ...done

Exam created successfully.

Exam Info

A brief title for your custom exam. This is what will appear in lists and results. Required
A more detailed description of your custom exam.
0 && PreviewQuestions\\\"> Check this box to make this custom exam unavailable for assignments; you\\'ll be the only user who can see or use it.

Number of questions to load from question pool into each attempt.
If fewer than total available, questions selected via Adaptive Learning Engine.
You can adjust number of questions per section in the next step.

out of {{DistinctCount()}} (total)


You\\'ll build your custom exam\\'s question pool from this course\\'s content.
Full Trial Course content will be unavailable for any Custom Exams until purchase.

Required

Build Question Pool

Favorites
Filters:

Build Question Pool

My Questions
Filters:
Name of Question Library (# of Selected Qs) / (Total Qs)

0 && !CustomQuestions && !Bookmarks)\\\">

Build Question Pool

Load From Template

Add questions to your custom exam from a premade template

Search For Questions

Find questions with specific content

Clear Selected Questions Update Selected Totals
Pick Questions

Searching, please wait

{{Results.Questions.length}} results for \\\"{{SearchResults}}\\\":

Save |
Loading Course Content...
  • 0 || Chapter.Assessments.length > 0\\\" ng-repeat=\\\"Chapter in tabcontent.Chapters\\\">
    0\\\" style=\\\"color:#69b532\\\">({{Chapter.SelectedCount}}) / ({{Chapter.QuestionCount}})
    • 0\\\" style=\\\"color:#69b532\\\">({{Topic.SelectedCount}}) / ({{Topic.QuestionCount}})
      • 0\\\" style=\\\"color:#69b532\\\">({{Assessment.SelectedCount}}) / ({{Assessment.Questions.length}})
You have not selected any Questions. Please return to the Questions section.
0\\\">

Custom Exam Options

Your exam will display {{vm.Exam.QCount}} out of {{Questions.length}} Question1\\\">s from {{vm.CourseCount}} Course1\\\">s, {{vm.Chapters.length}} Chapter1\\\">s, and {{vm.Topics.length}} Topic1\\\">s.

Would you like to break this Exam into Sections?

If you enable this, each section will initially be set to contain the same number of questions. This may change the total number of questions displayed.

Create Sections by
NameQuestions Per SectionQuestions Available
Total Questions:{{vm.Exam.QCount}}*{{Questions.length}}
*This number is how many questions will appear per test attempt.
You have not selected any Questions. Please return to the Questions section.

You\\'re almost ready to go.

Please confirm the details of your custom exam, and click \\\"Submit\\\".

1\\\" class=\\\"col-md-12\\\">
Returning to the Options section will reset your current allocation of questions in each Section.

Exam Name:

{{vm.Exam.Name}}

0\\\">

Exam Description:

{{vm.Exam.Description}}

Question allocation:

Each new attempt of this custom exam will contain a unique arrangement of questions from the exam\\'s question pool.

1\\\">
  • Each time a new attempt of this exam is started, {{Section.QCount}} question1\\\">s will be pulled from out of an available {{Section.Questions.length}} question1\\\">s.

Total question pool: {{vm.Exam.QCount}} question1\\\">s.

Each time a new attempt of this exam is started, {{vm.Exam.QCount}} question1\\\">s will be pulled from the following courses:

  • {{names.QCount}} question1\\\">s from {{names.CourseNames}}

Total question pool: {{vm.Exam.Sections[0].Questions.length}} question1\\\">s.

Press the \\\"Submit\\\" button to confirm and save this custom exam.
You can also return to any step and make changes before submitting.

\");\n$templateCache.put(\"app/pages/courseware/pagination-qpool.html\",\"Questions {{range.lower}} - {{range.upper}} of {{range.total}}\");\n$templateCache.put(\"app/pages/courseware/topics.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/activityTab.html\",\"
Last Login: {{Profile.LastActivityDate | date: \\'MM/dd/yyyy\\'}}

Assessments In-Progress

CourseAssessmentDateProgressResumeRemove
{{Assessment.StartDateTime | date:\\'mediumDate\\'}} {{Assessment.StartDateTime | date:\\'mediumDate\\'}}{{Assessment.PercentComplete | number:0}}%

to review performance and prescription of your Assessments.\\\">

Recent Assessments Scored

{{completedCurrentPage}} of {{activityPageInfo.TotalPages}} Show:

CourseAssessmentDateScoreDetails
{{Assessment.EndDateTime | date:\\'mediumDate\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%
\");\n$templateCache.put(\"app/pages/dashboard/dashboard.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/dashhome.html\",\"

Welcome, {{User.FirstName}}

Edit Photo

{{User.DisplayName}}

Your Recent Activity

Last Login: {{User.LastActivityDate | date: \\'MM/dd/yyyy\\'}}

Last Paused Assessment
AssessmentDate
Course:
{{Assessment.StartDateTime | date:\\'short\\'}} {{Assessment.StartDateTime | date:\\'shortDate\\'}}
{{Assessment.StartDateTime | date:\\'shortTime\\'}}
Last Scored Assessment
AssessmentDateScore
{{Assessment.EndDateTime | date:\\'short\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%
\");\n$templateCache.put(\"app/pages/dashboard/mydashboard.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/mydashboardhome.html\",\"
Most RecentMost RecentRankScoreTimePoints
{{QuickQuiz[0].AssessmentName}}{{QuickQuiz[0].AssessmentName}}{{QuickQuiz[0].Rank || \\\"--\\\"}}{{QuickQuiz[0].Score || \\\"--\\\"}} 0\\\">%= 3600\\\">{{QuickQuiz[0].TimeToTake || \\'\\' | secondsToDateTime | date:\\\"H\\'h\\'\\\"}} = 60\\\">{{QuickQuiz[0].TimeToTake || \\'\\' | secondsToDateTime | date:\\\"m\\'m\\'\\\"}} 0\\\">{{QuickQuiz[0].TimeToTake || \\'\\' | secondsToDateTime | date:\\\"s\\\"}}.{{QuickQuiz[0].partialSeconds}}s--{{QuickQuiz[0].Points | number:0}}--
Avg Rank:Unclaimed CME:Untaken Quizzes:All-time High Score:
{{QuickQuiz.RankAverage || \\\"0\\\" | number:0}}{{QuickQuizCME || \\\"--\\\"}} 0\\\"> 0}\\\">{{QuickQuiz.Available}}{{QuickQuiz.highScore || \\\"0\\\" | number: 0}}
Average Rank as of: {{RightNow | date: \\'MMM d, y h:mm a\\'}}. All Rankings are only for your Institution/Organization. {{CurrentUser.Profile.Institution}}

My CME Goals Add DELETE IT ALL

NameTarget
= cmeGoal.CMEGoalValue && editGoal==false\\\" ng-click=\\\"$parent.$parent.$parent.cme = 4;$parent.$parent.$parent.clickTab(0);$parent.$parent.scroll()\\\" class=\\\"btn btn-xs btn-success\\\">Claim{{cmeGoal.CMEGoalType.Name}}
= cmeGoal.CMEGoalValue, \\'cmegoalactive\\' : cmeGoal.CMEGoalEarned < cmeGoal.CMEGoalValue}\\\" ng-style=\\\"{width: cmeGoal.CMEGoalWidth + \\'%\\'}\\\">
{{cmeGoal.CMEGoalEarned}} / {{cmeGoal.CMEGoalValue}}
| |
You haven\\'t set any goals yet.

My Countdowns Add DELETE IT ALL

Name of exam:
Date of event date:

7, \\'assignfailed\\': duration(countdown) < 30}\\\">
EventDays LeftEnd Date
{{countdown.goalName}} 7, \\'label-important\\': duration(countdown) < 30}\\\">{{duration(countdown)}}{{countdown.endDate | date: \\'dd/MM/yyyy\\'}} | |
You don\\'t have any countdowns yet.
0\\\" class=\\\"btn btn-xs btn-primary\\\">Start Assignments No Assignments 0\\\">Next Assignment: {{assignScheduled[0].EffectiveDateTime | MMMddyyyydatedisplay}} View Assignments

Assignment Summary

  • {{assignComplete.length}} Complete
  • {{assignFailed.length}} Failed
  • {{assignActive.length}} Active
Courses Asset Details

Assets

All Courses Overall {{CourseCount}}

See Asset Details for completion progress and uncompleted content per course.

{{DataValues.EarnedHours}} / {{DataValues.TotalHours}} Complete
{{DataValues.PercentFloor}}%
Last Login: {{Profile.LastActivityDate | date: \\'MM/dd/yyyy\\'}} Activity

Activity

Last Assessment Paused:
More
CourseAssessmentDateProgressResumeRemove
{{Assessment.StartDateTime | date:\\'short\\'}}{{Assessment.PercentComplete}}%
Last Assessment Scored:
More
CourseAssessmentDateScoreDetails
{{Assessment.EndDateTime | date:\\'short\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%

CME Summary

TypeTotalAvailableUnclaimedClaimed
{{cmeType.Name}}{{cmeType.getCMEStats.Available}}{{cmeType.getCMEStats.totalUnclaimed}}{{cmeType.getCMEStats.ClaimedHours}}
\");\n$templateCache.put(\"app/pages/dashboard/mydashboardtabs.html\",\"
Add Courses My Resources [ Open Course] to leave this page and launch the course.
Click [ CME Details] to view exam simulator status and CME completion data by chapter.\\\">

Assets

Assignments 0\\\">{{assignActive.length}}Quick Quiz 0}\\\">{{QuickQuiz.Available}}Save Settings

 Updates/News VisibleHidden

 Short Cuts HiddenVisible

 CME Goals VisibleHidden

 Count Downs VisibleHidden

 CME Summary VisibleHidden

 Assignments VisibleHidden

 Assets Summary VisibleHidden

 Activty Summary VisibleHidden

 Quick Quiz VisibleHidden

\");\n$templateCache.put(\"app/pages/discussions/GroupDiscussion.html\",\"
{{GroupId}}
\");\n$templateCache.put(\"app/pages/help/help.html\",\"
24/7 Self-Help Options

Our support portal is available to you 24 hours a day, 7 days a week, 365 days a year.

There you\\'ll find guides, tips, and frequenty asked questions, along with our user agreements, terms of service, and privacy policy.

Product & Group Program Sales

1-800-676-0822, Option 1

Live Sales: 8 AM - 6 PM CT, Mon-Fri

Technical Support & Account Services

1-800-676-0822, Option 2

Live Support: 8 AM - 5 PM CT, Mon-Fri

Request Support

Become A Contributor

Write for us. Publish. Get paid.

How to Become a Contributor

CME Claims Department

CME Accreditation & Claims

cme@chall.com

Product Web Site URL

Product Information Site

https://www.challengercme.com/

Learning Portal URL

Portal Login and Product Usage

https://app.challengercme.com/

Business Headquarters

5100 Poplar Avenue

Suite 400

Memphis, TN 38137

USA

Business Hours Mon—Fri 8AM—5PM CT

1-800-676-0822

\");\n$templateCache.put(\"app/pages/institution/Milestones.html\",\"
\");\n$templateCache.put(\"app/pages/institution/institution.html\",\"
\");\n$templateCache.put(\"app/pages/institution/my-users.html\",\"
\");\n$templateCache.put(\"app/pages/institution/progdash.html\",\"\");\n$templateCache.put(\"app/pages/institution/program.html\",\"
sdd
\");\n$templateCache.put(\"app/pages/launch/launch.html\",\"

My Program

My Program

My Program
Number of Active Users{{filteredinstusers.length}}
My Active Roster
NameClassEmail
{{slot.FirstName}} {{slot.LastName}}{{slot.Class}}{{slot.Email}}

My Account What would you like to do?

My Account What would you like to do?

You don\\'t have any assets yet.

Here\\'s what you can do:

  • Start a free full trial
    You can try any of our assets for free! Just head over to our store, and click the \\\"Try For Free\\\" button on the product you\\'d like to try out. During the trial period, you\\'ll be able to evaluate the complete product.

  • Purchase a Med-Challenger product
    Check out our store, where you can purchase one or more products from the largest library of online exam review and CME courseware available anywhere.

  • Play the Free CME Quick Quiz
    Try our Quick Quiz to test your clinical knowledge, earn free CME1, and see how you rank among your peers!
Account InfoEdit Profile
Login ID{{User.UserName}}
Last Login{{LastLogin | date:\\'MMM d, yyyy h:mm a\\'}}
Account Type0\\\" class=\\\"label label-default\\\">Group Individual
Premium StatusActive Does not expire
Premium Status= NowDate && 1*User.PremiumInfo.DaysUntilExpiry > 30\\\" class=\\\"label label-success\\\">Active = NowDate && 1*User.PremiumInfo.DaysUntilExpiry <= 30\\\" class=\\\"label label-warning\\\">Expiring Soon Expired Expire= NowDate\\\">sd {{User.PremiumInfo.ExpiryDate | date:\\'mediumDate\\'}}: Renew Now Call Support
Expired Trials{{ExpiredTrials.length}} Go To Store
My Recent Activity
Once you own some assets and complete some work, you\\'ll see your recent activity here.
Last Paused Assessment

All In-Progress

AssessmentDateAction
Course:
{{Assessment.StartDateTime | date:\\'short\\'}} {{Assessment.StartDateTime | date:\\'shortDate\\'}}
{{Assessment.StartDateTime | date:\\'shortTime\\'}}

Last Scored Assessment

Score Log

AssessmentDateScore
{{Assessment.EndDateTime | date:\\'short\\'}}=(1*Assessment.PassingScore))}\\\">{{Assessment.Score}}%
My CMEs
Once you own some assets and complete some CME assessments, you\\'ll see your CME info here.
TypeTotalAvailableUnclaimedClaimed
{{cmeType.Name}}{{cmeType.getCMEStats.Available || \\'0\\'}}{{1*(cmeType.getCMEStats.totalUnclaimed.toFixed(2)) || \\'0\\'}}{{cmeType.getCMEStats.ClaimedHours || \\'0\\'}}
Latest News

Loading, please wait...

\\\"please

{{LastRSS.title}}


Explore more from Med-Challenger

Quick Quiz
1 Free CME credits added to your account upon achievement of 80% or higher score on Quick Quiz assessment. Premium Membership required to generate CME certificate.
\");\n$templateCache.put(\"app/pages/launch/smallpaginate.html\",\"\");\n$templateCache.put(\"app/pages/launchcme/launchcme.html\",\"

Select Course

You haven\\'t chosen a course, yet. Please select one of your courses to continue:

You don\\'t have any assets yet.

Whoops, looks like there\\'s nothing to list here right now.

Here\\'s what you can do:

  • Start a free full trial
    You can try any of our assets for free! Just head over to our store, and click the \\\"Try For Free\\\" button on the product you\\'d like to try out. During the trial period, you\\'ll be able to evaluate the complete product.

  • Purchase a Med-Challenger product
    Check out our store, where you can purchase one or more products from the largest library of online exam review and CME courseware available anywhere.

  • Play the Free CME Quick Quiz
    Try our Quick Quiz to test your clinical knowledge, earn free CME1, and see how you rank among your peers!
1 Free CME credits added to your account upon achievement of 80% or higher score on Quick Quiz assessment. Premium Membership required to generate CME certificate.
\");\n$templateCache.put(\"app/pages/launchexams/launchexams.html\",\"

Select Course

You haven\\'t chosen a course, yet. Please select one of your courses to continue:

You don\\'t have any assets yet.

Whoops, looks like there\\'s nothing to list here right now.

Here\\'s what you can do:

  • Start a free full trial
    You can try any of our assets for free! Just head over to our store, and click the \\\"Try For Free\\\" button on the product you\\'d like to try out. During the trial period, you\\'ll be able to evaluate the complete product.

  • Purchase a Med-Challenger product
    Check out our store, where you can purchase one or more products from the largest library of online exam review and CME courseware available anywhere.

  • Play the Free CME Quick Quiz
    Try our Quick Quiz to test your clinical knowledge, earn free CME1, and see how you rank among your peers!
1 Free CME credits added to your account upon achievement of 80% or higher score on Quick Quiz assessment. Premium Membership required to generate CME certificate.
\");\n$templateCache.put(\"app/pages/launchtopics/launchtopics.html\",\"

Select Course

You haven\\'t chosen a course, yet. Please select one of your courses to continue:

You don\\'t have any assets yet.

Whoops, looks like there\\'s nothing to list here right now.

Here\\'s what you can do:

  • Start a free full trial
    You can try any of our assets for free! Just head over to our store, and click the \\\"Try For Free\\\" button on the product you\\'d like to try out. During the trial period, you\\'ll be able to evaluate the complete product.

  • Purchase a Med-Challenger product
    Check out our store, where you can purchase one or more products from the largest library of online exam review and CME courseware available anywhere.

  • Play the Free CME Quick Quiz
    Try our Quick Quiz to test your clinical knowledge, earn free CME1, and see how you rank among your peers!
1 Free CME credits added to your account upon achievement of 80% or higher score on Quick Quiz assessment. Premium Membership required to generate CME certificate.
\");\n$templateCache.put(\"app/pages/maps/maps.html\",\"
\");\n$templateCache.put(\"app/pages/myassignments/myassignments.html\",\"\");\n$templateCache.put(\"app/pages/news/news.html\",\"

Loading feeds, please wait...

\\\"please

From The Med-Challenger Blog

https://www.challengercme.com/blog/
{{entry.title}}
\");\n$templateCache.put(\"app/pages/notes/notes.html\",\"

My Notes

Questions Custom Questions Assessments Topics

Once you take some notes, they\\'ll appear here

My Bookmarks

Once you bookmark content, it will appear here

\");\n$templateCache.put(\"app/pages/notes/notesPagination.tpl.html\",\"
1\\\">
\");\n$templateCache.put(\"app/pages/products/CartDirect.html\",\"

There was a problem adding the product to your shopping cart:

You already own {{Product.Name}}.

Back Store

{{Product.Name}} has been added to your cart!

{{Product.Price | currency:$}} One-Time Purchase Yearly Subscription

You\\'ll never have to buy this product again!
One full year of use included (Premium Membership)

Super Renewal Advantage!

Use it – AND EVERYTHING ELSE in your account – again and again for just $199 annually.

No more re-buys!

Will renew on {{PremiumRenewDate | date:\\'mediumDate\\'}}

Looks like you\\'re not signed in.

We\\'ve added {{Product.Name}} to your cart, but to continue your purchase, you\\'ll need to be signed into your Med-Challenger account.

Don\\'t have an account yet?
No problem! Creating one is free and easy.

Select an option below:

\");\n$templateCache.put(\"app/pages/products/checkout.html\",\"

Hi, {{User.FirstName}}!

Thanks for creating an account, and welcome to Med-Challenger!

To finish checking out, add a payment method and click Process Order.

Return to Cart

Double-check your order!

We noticed that you\\'ve added a year of Med-Challenger Premium membership to your cart, and already have an active Premium membership.

Your current Premium membership expires {{User.PremiumInfo.ExpiryDate | date:\\'mediumDate\\'}}. Completing this purchase will add one year to that.

If this is intentional, that\\'s great! There\\'s nothing else to do other than complete your purchase.

If this is by mistake, please remove Premium membership from the shopping cart.

Review Your Purchase
{{item.Name}}
This product includes one year of Premium Membership
{{item.Price | currency:\\\"$\\\"}} 0\\\">({{item.Discount | currency:\\\"$\\\"}} Discount) ({{(1*item.Price)+(1*item.Discount) | currency:\\\"$\\\"}} + {{-1*item.Discount | currency:\\\"$\\\"}} add-on) Already owned!
ItemPrice
{{item.Name}}
Includes one year of Premium Membership free What\\'s this?
{{item.Price | currency:\\\"$\\\"}}$0.00
One-Time Purchase Yearly Subscription
0\\\">({{item.Discount | currency:\\\"$\\\"}} Discount) ({{(1*item.Price)+(1*item.Discount) | currency:\\\"$\\\"}} + {{-1*item.Discount | currency:\\\"$\\\"}} add-on) You already own this!
Total:{{Cart.TotalPrice | currency:\\\"$\\\"}}
Select A Payment Method
Promo codes unavailable for the following reason:

One or more items in cart are ineligible for promotions

0\\\"> 
Discount Applied: {{Discount.Name}}


Promotional Add-On Applied: {{Discount.Name}}

 
Sorry, that\\'s not a valid promotional code.

 
Sorry, that promotional code has expired.

0\\\" class=\\\"row\\\">

Please add or select a payment method to continue.

The selected payment method is expired. Select or add a different one.


Please accept Agreement, Terms, and Privacy Policy to continue. Agreement, Terms, and Privacy Policy accecpted.

\");\n$templateCache.put(\"app/pages/products/conversion.html\",\"

Thank you for your purchase!

Your order is now complete.

In a moment, you\\'ll receive an email with a receipt.

You can begin using your new asset(s) immediately.

Get Started

\");\n$templateCache.put(\"app/pages/products/products.html\",\"\");\n$templateCache.put(\"app/pages/products/requiredpurchase.html\",\"\");\n$templateCache.put(\"app/pages/products/storelistview.html\",\"\");\n$templateCache.put(\"app/pages/products/trialconversion.html\",\"

Thanks for trying out Med-Challenger!

Your trial is ready, and you can begin using it immediately.

The trial will expire in 3 days.

Get Started

\");\n$templateCache.put(\"app/pages/products/usertrials.html\",\"\");\n$templateCache.put(\"app/pages/profile/cmeprofile.html\",\"
In order to process your CME claim(s), we just need a bit of basic information. Once completed, you\\'ll be sent back to CME Claims to continue.

Degree & Specialty

Address

 Please complete required fields to continue.
\");\n$templateCache.put(\"app/pages/profile/paymentoptions.html\",\"
LOADING

\\\"Wildcard \\\"We

Expiration date must be current month or later

DeleteCard NumberExpiration DateDefaultMethod

You haven\\'t added any payment methods yet.

{{opt.ssl_card_number | ccspaces:true}}{{opt.ssl_exp_date}}Expired
\");\n$templateCache.put(\"app/pages/profile/profile.html\",\"

Login: {{User.UserName}}

{{User.UserId}}
{{User.CreationDate | jsonDate}}
{{User.LastLoginDate | jsonDate}}
{{User.Profile.CustomerId}}
Yes No
{{User.Profile.Class}}



Premium Expires: {{PremiumExpires}} [UTC]
Premium Expires: {{PremiumExpires}} [UTC]

Role Assigned:

  • {{Role.RoleName}}
  •   {{Subscription.Name}}
SettingValue
{{key}}{{k}} : {{v}}{{value}}

App Preferences

App Theme

Adaptive Learning

Last Reset on: {{ResetDate.EffectiveDateTime | date:\\\"shortDate\\\"}}

Resets the data used to provide you with more relevant questions.

Your account history will be unaffected.

Learn more about Adaptive Assessments

Change Password

Password can\\'t be blank Password must be 8 characters or longer Password must contain at least one number and uppercase letter
Please confirm your password Passwords don\\'t match

Payment Methods

General Information

{{User.FirstName}}
{{User.Profile.MiddleName}}
{{User.LastName}}
{{User.PremiumInfo.ExpiryDate | date : \\'M/dd/yyyy\\'}}

Contact Information

{{User.Email}}
Email TypeOpt Out?
{{camp.Name}} Opted Out

Address

 Please complete required fields to update profile.
\");\n$templateCache.put(\"app/pages/profile/profileModal.html\",\"

Add Account

Paste a link to your profile into the box below

\");\n$templateCache.put(\"app/pages/progdash/assignment-activity.html\",\"\");\n$templateCache.put(\"app/pages/progdash/manage-users.html\",\"
{{Inst.Settings.AdminTerm}} Slots Allocated: {{AdminCount}} | {{Inst.Settings.FacultyTerm}} Slots Allocated: {{FacultyCount}} | {{Inst.Settings.LearnerTerm}} Slots Allocated: {{StudentCount}} | Inactive: {{InactiveCount}} | UnAllocated: {{UnAllocatedCount}}
Download Template
Contact sales@chall.com\\'\\\" tooltip-placement=\\\"bottom\\\">Used Slots: {{Inst.Users.length - Inst.FacultySlots}} / {{Inst.StudentSlots}}
\");\n$templateCache.put(\"app/pages/questions/questions.html\",\"
\");\n$templateCache.put(\"app/pages/quickquiz/quickquiz.html\",\"
\");\n$templateCache.put(\"app/pages/registration/qqprocess.html\",\"

Processing your registration, please wait...

\\\"please

You\\'re All Set.

Play The Quick Quiz

Whoops, looks like someone has already picked that Gaming Alias.

Please try another one.

\");\n$templateCache.put(\"app/pages/registration/qqsignup-2.html\",\"

By signing up, you\\'ll create a free Med-Challenger account where you\\'ll be able to play every CME quiz, rank on leaderboards, and earn and claim weekly CME credit free!

You\\'ll also receive a free 100-question Express question bank with required CME credits in your specialty.

All fields are required.

Please enter a gaming alias 20 characters max, required to play Quick Quiz
Please enter your first name
Please enter your last name
This will be your user ID Please enter your email address That doesn\\'t appear to be an email address
Minimum: 8 characters, a number, a capital letter Password can\\'t be blank Password must be 8 characters or longer Password must contain at least one number and uppercase letter
Please confirm your password Passwords don\\'t match
Please complete the form to continue. 
\");\n$templateCache.put(\"app/pages/registration/qqsignup.html\",\"
— Sign up, join the fun & stay sharp!\\\">

Please complete the form below. Signing up for the Med-Challenger Quick Quiz creates you a free online Med-Challenger account where you can login and play our Quick Quiz CME game, get important practice information, and full trial and purchase products. No purchase necessary to play. Earn CME credits with a passing score1. See how you rank against peers. Add products to your account at any time. Purchased assets stay in your account forever. Low-cost renewal keeps everything fresh for use year after year. Nothing beats it.

Already have an account? Just sign in. Questions? Call 1-800-676-0822 or email sales@chall.com
You will be automatically redirected to the Quick Quiz after signing in.

1 Score 80% or higher to earn CME credit per quiz. Premium membership required for certificate processing.

indicates required field

Name & Sign-In Details
You\\'ll receive an email after registration confirming these details.
Please enter your first name
Please enter your last name
Please enter your email address That doesn\\'t appear to be an email address This will be your username
Password can\\'t be blank Password must be 8 characters or longer Password must contain at least one number and uppercase letter Must contain at minimum: 8 characters, a number, a capital letter
Please confirm your password Passwords don\\'t match
Gaming Info
Please enter a gaming alias 20 characters max, required to play Quick Quiz
Professional Info
We use this info to provide you with an experience tailored to your background.
Please select a clinician type
Please select your degree You may list additional degrees in your profile after registration
Please select your specialty You may select an additional specialty in your profile after registration

Please complete the form to continue. 

\");\n$templateCache.put(\"app/pages/registration/registration1.html\",\"

With your free Med-Challenger account, you will be able to:

First, select your interest:

Looking for your group account?

There is no need to register. Simply sign in using the account details provided to you by your organization.

Please select an interest to continue. 

\");\n$templateCache.put(\"app/pages/registration/registration2.1.html\",\"

With registration, you\\'ll receive a free 100-question Express question bank with CME credits related to your specialty.

All fields are required.

Please enter your first name
Please enter your last name
This will be your user ID Please enter your email address That doesn\\'t appear to be an email address
Minimum: 8 characters, a number, a capital letter Password can\\'t be blank Password must be 8 characters or longer Password must contain at least one number and uppercase letter
Please confirm your password Passwords don\\'t match
Please complete the form to continue. 
\");\n$templateCache.put(\"app/pages/registration/registration2.html\",\"

Need help? Our friendly staff are ready to assist you. Call 1-800-676-0822 or email sales@chall.com

Professional Info
Get your express course with 5 free CME! Please select your specialty
Please select your degree
Please select a clinician type
Name & Sign-In Details
Please enter your first name
Please enter your last name
Please enter your email address That doesn\\'t appear to be an email address This will be your username
Password can\\'t be blank Password must be 8 characters or longer Password must contain at least one number and uppercase letter Must contain at minimum: 8 characters, a number, a capital letter
Please confirm your password Passwords don\\'t match

Please complete the form to continue. 

\");\n$templateCache.put(\"app/pages/registration/registration3.html\",\"
Gaming
Earn free CME1 by playing our Quick Quiz Clinical Knowledge game!
Please specify a Gaming Alias 20 chars max, required to play Quick Quiz
1 Free CME credits added to your account upon achievement of 80% or higher score on Quick Quiz assessment. Premium Membership required to generate CME certificate.
Additional Profile Info
Please complete the following to help us serve your specific needs
Please select your personal objective What do you hope to achieve with Med-Challenger?
Please select your next testing year
CME Certificate Information
This information is needed to generate CME certificates. Complete it now to save time later!
President, VP, etc.
Please enter your organization name
Select all that apply
Please include timezone, e.g. \\\"After 5PM Eastern\\\"
Please complete required fields to continue. 
\");\n$templateCache.put(\"app/pages/reports/compliance.html\",\"
\");\n$templateCache.put(\"app/pages/reports/reportlist.html\",\"
Report List
\");\n$templateCache.put(\"app/pages/reports/scorecard.html\",\"
Start Date
{{MinDate | date : \\'MM/dd/yy\\'}}
End Date
{{MaxDate | date : \\'MM/dd/yy\\'}}
All DatesCourse Name:
User Name:
Hide Null Scores
\");\n$templateCache.put(\"app/pages/search/customPaginate.html\",\"
Displaying {{range.lower}} - {{range.upper}} of {{range.total}} results
\");\n$templateCache.put(\"app/pages/search/search.html\",\"
\");\n$templateCache.put(\"app/pages/search/searchresult.html\",\"

Searching, please wait

{{Results.AllTotal}} results for \\\"{{SearchLabel}}\\\":

Questions {{Results.QuestionsTotal}}

{{r.QuestionLabel}}

{{r.CourseName}}: {{r.ChapterName}}

Go to topic: {{r.TopicName}}: {{r.SubTopicName}}

Topics {{Results.TopicsTotal}}

:
Texts & Media {{Results.PagesTotal}}

:

Subtopics {{Results.SubTopicsTotal}}

:

Courses {{Results.CoursesTotal}}
\");\n$templateCache.put(\"app/pages/welcome/welcome-backup-predynamic.html\",\"
Getting Started Video

Welcome to Med-Challenger, {{User.FirstName}}!

Watch our getting started video to learn what you can do with your Med-Challenger account:

\\\"Play

To return to this page, use the app menu to navigate to Help Get Started



Welcome to Med-Challenger, {{User.FirstName}}!

Watch our getting started video to learn what you can do with your {{User.Institution}} assignee account:

\\\"Play

To return to this page, use the app menu to navigate to Help Get Started


Welcome to Med-Challenger, {{User.FirstName}}!

Watch our getting started video to learn what you can do with your {{User.Institution}} administrative/faculty account:

\\\"Play

To return to this page, use the app menu to navigate to Help Get Started


What\\'s Next?

Make sure to Complete Your Profile

  • Create Gaming Alias to play CME Quick Quiz
  • Complete information required to claim CME credits

To add more assets to your institution, contact Sales & Service

Make sure to Complete Your Profile

  • Create Gaming Alias to play Quick Quiz
  • Complete and verify contact information

Make sure to Complete Your Profile

  • Create Gaming Alias to play CME Quick Quiz
  • Complete information required to claim CME credits
  • Set up Premium service renewal options for MOC
Support Info

For 24/7 self-help, please visit our support site.

If you require assistance, please use our support form, or call 1-800-676-0822, Option 2.
Live Support: 8 AM - 5 PM CT, Mon-Fri

Your Cart
{{Item.Name}} * {{Item.Name}}
You already own this item
* {{Item.Name}}
1 year included free with another item in your cart
{{Item.Price | currency: \\\"$\\\"}}
Cart Total: {{Cart.TotalPrice | currency: \\\"$\\\"}}
Check Out View Cart
Your Free Trial

{{TrialName}}
Active

Assets Included With Trial:

{{tc.Name}}
\");\n$templateCache.put(\"app/pages/welcome/welcome-new.html\",\"

Watch our getting started video to learn what\\'s possible with Med-Challenger:

\\\"Play

What\\'s Next?

Make sure to Complete Your Profile

  • Create Gaming Alias to play CME Quick Quiz
  • Complete information required to claim CME credits

To add more assets to your institution, contact Sales & Service

Make sure to Complete Your Profile

  • Create Gaming Alias to play Quick Quiz
  • Complete and verify contact information

Make sure to Complete Your Profile

  • Create Gaming Alias to play CME Quick Quiz
  • Complete information required to claim CME credits
  • Set up Premium service renewal options for MOC
Support Info

For 24/7 self-help, please visit our support site.

If you require assistance, please use our support form, or call 1-800-676-0822, Option 2.
Live Support: 8 AM - 5 PM CT, Mon-Fri

Your Cart
{{Item.Name}} * {{Item.Name}}
You already own this item
* {{Item.Name}}
1 year included free with another item in your cart
{{Item.Price | currency: \\\"$\\\"}}
Cart Total: {{Cart.TotalPrice | currency: \\\"$\\\"}}
Check Out View Cart
Your Free Trial

{{TrialName}}
Active

Assets Included With Trial:

{{tc.Name}}
\");\n$templateCache.put(\"app/pages/welcome/welcome.html\",\"
\\\"\\\"

Welcome to the world\\'s largest online review and CME library!

Your account is now set up, and we went ahead and signed you in.

This handy guide will help you get going.

Welcome to the world\\'s largest online review and CME library!

Your account and profile are now set up.

This handy guide will help you get going.

Get Started

Start A Free Trial

\\\"\\\"

To try out a Med-Challenger product for free, go to the store and click on the blue \\\"Try For Free\\\" button of the product.

Go To Store

Use Your Free Trial

\\\"\\\"

To begin using your free trial, go to the dashboard and click \\\"Study For An Exam\\\" or \\\"Earn CME Credits\\\".

Go To Dashboard

Enter Billing Information

\\\"\\\"

To add a payment method, go to your profile and scroll down to the Payment Options section. Med-Challenger accepts all major credit cards.

Go To Profile

Play the Quick Quiz

\\\"\\\"

You can play our weekly CME Quick Quiz for free. See how you rank against your peers on new Q&A selections from our library.

Play the Quick Quiz
\");\n$templateCache.put(\"app/tpls/eva/courselevelchaptercme.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/charts.html\",\"
\");\n$templateCache.put(\"app/pages/charts/assign/assignchart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/assign/barChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/chartJs/chartJs.html\",\"
\");\n$templateCache.put(\"app/pages/charts/chartist/chartist.html\",\"
Simple line chart
Line chart with area
Bi-polar line chart with area only
Simple bar chart
Multi-line labels bar chart
Stacked bar chart
Simple Pie
Pie with labels
Donut
\");\n$templateCache.put(\"app/pages/charts/morris/morris.html\",\"
\");\n$templateCache.put(\"app/pages/components/mail/mail.html\",\"
{{t.name}}{{t.newMails}}
Work
Family
Friend
Study
Add new label
\");\n$templateCache.put(\"app/pages/components/timeline/timeline.html\",\"
Title of section 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto, optio, dolorum provident rerum aut hic quasi placeat iure tempora laudantium ipsa ad debitis unde? Iste voluptatibus minus veritatis qui ut.

Jan 14
Title of section 2

Donec dapibus at leo eget volutpat. Praesent dolor tellus, ultricies venenatis molestie eu, luctus eget nibh. Curabitur ullamcorper eleifend nisl.

Jan 18
Title of section 3

Phasellus auctor tellus eget lacinia condimentum. Cum sociis natoque penatibus et magnis dis parturient montes.

Feb 18
Title of section 4

Morbi fringilla in massa ac posuere. Fusce non sagittis massa, id accumsan odio. Nullam eget tempor est. Etiam eu felis eu purus aliquam tristique id quis nisl. Nam eros nibh, consequat sed pulvinar eu, ultrices ornare ligula. Aenean interdum sed nunc sed hendrerit.

Feb 20
Title of section 5

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur eget mattis metus. Nullam egestas eros metus, quis fringilla urna accumsan sed. Aliquam ultrices at arcu vitae tincidunt.

Feb 21
Title of section 6

Praesent bibendum ante mattis augue consectetur, ut commodo turpis consequat. Donec ligula eros, porta in iaculis vel, semper ac sem. Integer at mauris lorem.

Feb 23
Title of section 7

Vivamus ut laoreet erat, vitae eleifend eros. Sed varius id tellus non lobortis. Sed dolor ante, cursus non scelerisque sed, euismod id eros.

Feb 24
\");\n$templateCache.put(\"app/pages/components/tree/tree.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/blurFeed/blurFeed.html\",\"
{{ ::message.author }} {{ ::message.surname}}
{{message.header}}{{::message.text}}
{{::message.time}}
{{::message.ago}}
\");\n$templateCache.put(\"app/pages/dashboard/dashboardCalendar/dashboardCalendar.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/dashboardLineChart/dashboardLineChart.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/dashboardMap/dashboardMap.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/dashboardPieChart/dashboardPieChart.html\",\"
{{ ::chart.description }}
{{ ::chart.stats }}
\");\n$templateCache.put(\"app/pages/dashboard/dashboardTodo/dashboardTodo.html\",\"
\");\n$templateCache.put(\"app/pages/dashboard/popularApp/popularApp.html\",\"
Super App
Most Popular App
175$
Total Visits
47,512
New Visits
9,217
Sales
2,928
\");\n$templateCache.put(\"app/pages/dashboard/trafficChart/trafficChart.html\",\"
1,900,128 Views Total

{{::item.label}}+{{item.percentage}}%

\");\n$templateCache.put(\"app/pages/dashboard/weather/weather.html\",\"
{{geoData.geoplugin_city}} - {{geoData.geoplugin_countryName | uppercase}}
{{ weather.days[weather.current].date | date : \\'EEEE h:mm\\'}}
{{weather.days[weather.current].main}} - {{weather.days[weather.current].description}}
{{weather.days[weather.current].temp}} °C | °F {{weather.days[weather.current].temp}} °F | °C
{{day.temp}}
{{day.main}}
{{day.date | date : \\'EEE\\'}}
\");\n$templateCache.put(\"app/pages/form/inputs/inputs.html\",\"
\");\n$templateCache.put(\"app/pages/form/layouts/layouts.html\",\"
\");\n$templateCache.put(\"app/pages/form/wizard/wizard.html\",\"
Required
Proper email required
Required
Passwords should match
Required
Required
Required
Congratulations! You have successfully filled the form!
\");\n$templateCache.put(\"app/pages/maps/google-maps/google-maps.html\",\"
\");\n$templateCache.put(\"app/pages/maps/leaflet/leaflet.html\",\"
\");\n$templateCache.put(\"app/pages/maps/map-bubbles/map-bubbles.html\",\"
\");\n$templateCache.put(\"app/pages/maps/map-lines/map-lines.html\",\"
\");\n$templateCache.put(\"app/pages/tables/basic/tables.html\",\"
\");\n$templateCache.put(\"app/pages/tables/smart/tables.html\",\"
\");\n$templateCache.put(\"app/pages/tables/widgets/basicTable.html\",\"
BrowserVisitsDownloadsPurchasesDAUMAULTVUsers %
Google Chrome10,3923,8224,2148997,09817845%
Mozilla Firefox7,8736,0033,0318978,99710228%
Internet Explorer5,8903,4922,102274,0399917%
Safari4,0012,0391,0011043,98320914%
Opera1,83398383191,0991035%
\");\n$templateCache.put(\"app/pages/tables/widgets/borderedTable.html\",\"
BrowserVisitsPurchases%
{{item.browser}}{{item.visits}}{{item.purchases}}{{item.percent}}
\");\n$templateCache.put(\"app/pages/tables/widgets/condensedTable.html\",\"
#First NameLast NameUsernameEmailStatus
{{item.id}}{{item.firstName}}{{item.lastName}}{{item.username}}{{item.email}}
\");\n$templateCache.put(\"app/pages/tables/widgets/contextualTable.html\",\"
#First NameLast NameUsernameEmailAge
1MarkOtto@mdomdo@gmail.com28
2JacobThornton@fatfat@yandex.ru45
3LarryBird@twittertwitter@outlook.com18
4JohnSnow@snowsnow@gmail.com20
5JackSparrow@jackjack@yandex.ru30
\");\n$templateCache.put(\"app/pages/tables/widgets/editableRowTable.html\",\"
NameStatusGroupActions
{{$index}}{{ user.name || \\'empty\\' }}{{ showStatus(user) }}{{ showGroup(user) }}
\");\n$templateCache.put(\"app/pages/tables/widgets/editableTable.html\",\"
#First NameLast NameUsernameEmailAge
{{item.id}}{{item.firstName}}{{item.lastName}}{{item.username}}{{item.email}}{{item.age}}
\");\n$templateCache.put(\"app/pages/tables/widgets/hoverRows.html\",\"
BrowserVisitsPurchases%
{{item.browser}}{{item.visits}}{{item.purchases}}{{item.percent}}
\");\n$templateCache.put(\"app/pages/tables/widgets/responsiveTable.html\",\"
#First NameLast NameUsernameEmailAge
1MarkOtto@mdomdo@gmail.com28
2JacobThornton@fatfat@yandex.ru45
3LarryBird@twittertwitter@outlook.com18
4JohnSnow@snowsnow@gmail.com20
5JackSparrow@jackjack@yandex.ru30
\");\n$templateCache.put(\"app/pages/tables/widgets/smartTable.html\",\"
#First NameLast NameUsernameEmailAge
{{item.id}}{{item.firstName}}{{item.lastName}}{{item.username}}{{item.email}}{{item.age}}
\");\n$templateCache.put(\"app/pages/tables/widgets/stripedRows.html\",\"
#First NameLast NameUsernameEmailAge
{{item.id}}{{item.firstName}}{{item.lastName}}{{item.username}}{{item.email}}{{item.age}}
\");\n$templateCache.put(\"app/pages/ui/alerts/alerts.html\",\"
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it\\'s not super important.
Warning! Better check yourself, you\\'re not looking too good.
Oh snap! Change a few things up and try submitting again.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it\\'s not super important.
Warning! Better check yourself, you\\'re not looking too good.
Oh snap! Change a few things up and try submitting again.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it\\'s not super important.
Warning! Better check yourself, you\\'re not looking too good.
Oh snap! Change a few things up and try submitting again.

Warning!

Pay attention. Change a few things up and try submitting again.
\");\n$templateCache.put(\"app/pages/ui/buttons/buttons.html\",\"
\");\n$templateCache.put(\"app/pages/ui/grid/baseGrid.html\",\"

Stacked to horizontal

.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-8
.col-md-4
.col-md-4
.col-md-4
.col-md-4
.col-md-6
.col-md-6

Mobile and desktop

xs-12 .col-md-8
xs-6 .col-md-4
xs-6 .col-md-4
xs-6 .col-md-4
xs-6 .col-md-4
.col-xs-6
.col-xs-6

Mobile, tablet, desktop

.col-xs-12 .col-sm-6 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4

Column wrapping

.col-xs-9
.col-xs-4
Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.
.col-xs-6
Subsequent columns continue along the new line.

Responsive column resets

.col-xs-6 .col-sm-3

Resize your viewport or check it out on your phone for an example.

.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3
.col-xs-6 .col-sm-3

Offsetting columns

.col-md-4
.col-md-4 .col-md-offset-4
.col-md-3 .col-md-offset-3
.col-md-3 .col-md-offset-3
.col-md-6 .col-md-offset-3

Grid options

Extra small devices Phones (<768px)Small devices Tablets (≥768px)Medium devices Desktops (≥992px)Large devices Desktops (≥1200px)
Grid behaviorHorizontal at all timesCollapsed to start, horizontal above breakpoints
Container widthNone (auto)750px970px1170px
Class prefix.col-xs-.col-sm-.col-md-.col-lg-
# of columns12
Column widthAuto~62px~81px~97px
Gutter width30px (15px on each side of a column)
NestableYes
OffsetsYes
Column orderingYes
\");\n$templateCache.put(\"app/pages/ui/grid/grid.html\",\"
\");\n$templateCache.put(\"app/pages/ui/icons/icons.html\",\"
\");\n$templateCache.put(\"app/pages/ui/modals/modals.html\",\"
\");\n$templateCache.put(\"app/pages/ui/notifications/notifications.html\",\"
{{optionsStr}}
\");\n$templateCache.put(\"app/pages/ui/panels/panels.html\",\"

Default panels

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ac mi erat. Phasellus placerat, elit a laoreet semper, enim ipsum ultricies orci, ac tincidunt tellus massa eu est. Nam non porta purus, sed facilisis justo. Nam pulvinar sagittis quam.
Phasellus maximus venenatis augue, et vestibulum neque aliquam ut. Morbi mattis libero vitae vulputate dignissim. Praesent placerat, sem non dapibus cursus, lacus nisi blandit quam, vitae porttitor lectus lacus non turpis. Donec suscipit consequat tellus.

Suspendisse nec tellus urna. Sed id est metus. Nullam sit amet dolor nec ipsum dictum suscipit. Mauris sed nisi mauris. Nulla iaculis nisl ut velit ornare imperdiet. Suspendisse potenti. In tempor leo sed sem malesuada pellentesque. Maecenas faucibus metus lacus, ac egestas diam vulputate vitae.

Sed dapibus, purus vel hendrerit consectetur, lectus orci gravida massa, sed bibendum dui mauris et eros. Nulla dolor massa, posuere et dictum sit amet, dignissim quis odio. Fusce mollis finibus dignissim. Integer sodales augue erat. Pellentesque laoreet vestibulum urna at iaculis. Nulla libero augue, euismod at diam eget, aliquam condimentum ligula. Donec a leo eu est molestie lacinia hendrerit sed lorem. Duis id diam eu metus sodales consequat vel eu elit. Praesent dolor nibh, convallis eleifend feugiat a, finibus porttitor nibh. Ut non libero vel velit pulvinar scelerisque non vel lorem. Integer porta tempor nulla. Sed nibh erat, ultrices vel lorem eu, rutrum vehicula sem.

Donec nec tellus urna. Sed id est metus. Nullam sit amet dolor nec ipsum dictum suscipit. Mauris sed nisi mauris. Nulla iaculis nisl ut velit ornare imperdiet. Suspendisse potenti. In tempor leo sed sem malesuada pellentesque. Maecenas faucibus metus lacus, ac egestas diam vulputate vitae.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque fermentum nec ligula egestas rhoncus. Sed dignissim, augue vel scelerisque vulputate, nisi ante posuere lorem, quis iaculis eros dolor eu nisl. Etiam sagittis, ipsum ac tempor iaculis, justo neque mattis ante, ac maximus sapien risus eu sapien. Morbi erat urna, varius et lectus vel, porta dictum orci. Duis bibendum euismod elit, et lobortis purus venenatis in. Mauris eget lacus enim. Cras quis sem et magna fringilla convallis. Proin hendrerit nulla vel gravida mollis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum consectetur quis purus vel aliquam.

Bootstrap panels

A panel in bootstrap is a bordered box with some padding around its content.

Panels are created with the .panel class, and content inside the panel has a .panel-body class. The .panel-default .panel-primary .panel-danger and other classes are used to style the color of the panel. See the next example on this page for more contextual classes.

Panel Heading

The .panel-heading class adds a heading to the panel.Easily add a heading container to your panel with .panel-heading. You may also include any h1-h6 with a .panel-title class to add a pre-styled heading.

Wrap buttons or secondary text in .panel-footer. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

Panel Footer

Panels with Contextual Classes

Panel with panel-default class
To color the panel, use contextual classes. This is sample .panel-default panel
Panel with panel-primary class
Sample .panel-primary panel
Panel with panel-success class
Sample .panel-success panel
Panel with panel-info class
Sample .panel-info panel
Panel with panel-warning class
Sample .panel-warning panel
Panel with panel-danger class
Sample .panel-danger panel

Panel Group

Panel group 1

To group many panels together, wrap a <div> with class \\r\\n .panel-group around them.

Panel group 2

The .panel-group class clears the bottom-margin of each panel.

\");\n$templateCache.put(\"app/pages/ui/progressBars/progressBars.html\",\"
\");\n$templateCache.put(\"app/pages/ui/slider/slider.html\",\"
Basic
With prefix
With postfix
Two way range
With Steps
Decorating numbers
Using custom values array
Disabled
\");\n$templateCache.put(\"app/pages/ui/tabs/contextualAccordion.html\",\"Primary Success Info Warning Danger \");\n$templateCache.put(\"app/pages/ui/tabs/mainTabs.html\",\"

Take up one idea. Make that one idea your life--think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success.

People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed. Similarly, when someone is failing, the tendency is to get on a downward spiral that can even become a self-fulfilling prophecy.

The reason most people never reach their goals is that they don\\'t define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them.

You can\\'t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

The reason most people never reach their goals is that they don\\'t define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them.

Dropdown tab

Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others.

Failure is the condiment that gives success its flavor.

\");\n$templateCache.put(\"app/pages/ui/tabs/sampleAccordion.html\",\"This content is straight in the template.

The body of the uib-accordion group grows to fit the contents

HelloI can have markup, too! This is just some content to illustrate fancy headings.
\");\n$templateCache.put(\"app/pages/ui/tabs/sideTabs.html\",\"

Take up one idea.

People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed.

You can\\'t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

The reason most people never reach their goals is that they don\\'t define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them.

Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others.

Failure is the condiment that gives success its flavor.

Take up one idea.

People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed.

You can\\'t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

The reason most people never reach their goals is that they don\\'t define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them.

Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others.

Failure is the condiment that gives success its flavor.

\");\n$templateCache.put(\"app/pages/ui/tabs/tabs.html\",\"
\");\n$templateCache.put(\"app/pages/ui/typography/typography.html\",\"

H1. Heading 1

Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra, placerat vestibulum eleifend pellentesque.

H2. Heading 2

Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra, placerat vestibulum eleifend pellentesque.

H3. Heading 3

Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra, placerat vestibulum eleifend pellentesque.

H4. Heading 4

Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra,.

H5. Heading 5

Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis.

Curabitur bibendum ornare dolor, quis ullamcorper ligula dfgz`zzsodales at. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullam-corper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.

Secondary text. Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar,

lacinia scelerisque pharetra, placerat vestibulum eleifend

pellentesque, mi nam.

Unordered list:
  • Lorem ipsum dolor sit amet
  • Сlacinia scelerisque pharetra
    • Dui rhoncus quisque integer lorem
      • Libero iaculis vestibulum eu vitae
  • Nisl lectus nibh habitasse suspendisse ut
  • Posuere cursus hac, vestibulum wisi nulla bibendum
Ordered Lists:
  1. Eu non nec cursus quis mollis, amet quam nec
  2. Et suspendisse, adipiscing fringilla ornare sit ligula sed
    1. Interdum et justo nulla
      1. Magna amet, suscipit suscipit non amet
  3. Metus duis eu non eu ridiculus turpis
  4. Neque egestas id fringilla consectetuer justo curabitur, wisi magna neque commodo volutpat
Important text fragment. Lorem ipsum dolor sit amet, id mollis iaculis mi nisl pulvinar, lacinia scelerisque pharetra.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Curabitur bibendum ornare dolor, quis ullamcorper ligula dfgz`zzsodales at. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit. In sed ornare nulla.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.

\\\"\\\"

Simple Banner Text

Lorem ipsum dolor sit amet

Odio amet viverra rutrum

Columns

\\\"\\\"

Vel elit, eros elementum, id lacinia, duis non ut ut tortor blandit. Mauris dapibus magna rutrum. Ornare neque suspendisse phasellus wisi, quam cras pede rutrum suspendisse, felis amet eu. Congue magna elit quisque quia, nullam justo sagittis, ante erat libero placerat, proin condimentum consectetuer lacus. Velit condimentum velit, sed penatibus arcu nulla.

\\\"\\\"

Et suspendisse, adipiscing fringilla ornare sit ligula sed, vel nam. Interdum et justo nulla, fermentum lobortis purus ut eu, duis nibh dolor massa tristique elementum, nibh iste potenti risus fusce aliquet fusce, ullamcorper debitis primis arcu tellus vestibulum ac.

Column heading example

\\\"\\\"

Eget augue, lacus erat ante egestas scelerisque aliquam, metus molestie leo in habitasse magna maecenas

Lean more

Yet another column heading example

\\\"\\\"

Augue massa et parturient, suspendisse orci nec scelerisque sit, integer nam mauris pede consequat in velit

Lean more

Third column heading example

\\\"\\\"

Eget turpis, tortor lobortis porttitor, vestibulum nullam vehicula aliquam

Lean more
\");\n$templateCache.put(\"app/theme/components/baSidebar/ba-sidebar.html\",\"\");\n$templateCache.put(\"app/theme/components/baWizard/baWizard.html\",\"
{{t.title}}
\");\n$templateCache.put(\"app/theme/components/baWizard/baWizardStep.html\",\"
\");\n$templateCache.put(\"app/theme/components/baWizard/baWizard_customexam.html\",\"
{{t.title}}
\");\n$templateCache.put(\"app/theme/components/backTop/backTop.html\",\"\");\n$templateCache.put(\"app/theme/components/contentTop/contentTop.html\",\"
{{User.FirstName+\\' \\'+User.LastName+\\' (\\'+User.UserName+\\')\\'}}

{{ activePageTitle | removeHTMLTags }}

\");\n$templateCache.put(\"app/theme/components/msgCenter/msgCenter.html\",\"\");\n$templateCache.put(\"app/theme/components/pageTop/pageTop.html\",\"

Working, please wait...

\");\n$templateCache.put(\"app/theme/components/widgets/widgets.html\",\"
1}\\\">
\");\n$templateCache.put(\"app/pages/charts/amCharts/areaChart/areaChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/barChart/barChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/combinedChart/combinedChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/funnelChart/funnelChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/ganttChart/ganttChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/lineChart/lineChart.html\",\"
\");\n$templateCache.put(\"app/pages/charts/amCharts/pieChart/pieChart.html\",\"
\");\n$templateCache.put(\"app/pages/components/mail/composeBox/compose.html\",\"
New message
\");\n$templateCache.put(\"app/pages/components/mail/detail/mailDetail.html\",\"

{{detailCtrl.mail.name.split(\\' \\')[0]}}

{{detailCtrl.mail.name.split(\\' \\')[1]}}

{{detailCtrl.mail.tag}}
777-777-7777
{{detailCtrl.mail.email}}
{{detailCtrl.mail.position}}
12 Nezavisimosti st. Vilnius, Lithuania
{{detailCtrl.mail.subject}} • {{detailCtrl.mail.date | date : \\'h:mm a MMMM d \\'}}
1 Attachment - View | Download
{{detailCtrl.mail.attachment}}
Nothing to show
\");\n$templateCache.put(\"app/pages/components/mail/list/mailList.html\",\"
{{m.name}}
{{m.tag}}
{{m.subject}}
{{m.body | plainText}}
{{m.date | date : \\'MMM d HH:mm\\'}}
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/checkboxesRadios.html\",\"
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/inputGroups.html\",\"
@
@example.com
$ .00
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/standardFields.html\",\"
A block of help text that breaks onto a new line and may extend beyond one line.
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/validationStates.html\",\"
(success)
(warning)
(error)
@
(success)
\");\n$templateCache.put(\"app/pages/form/layouts/widgets/basicForm.html\",\"
\");\n$templateCache.put(\"app/pages/form/layouts/widgets/blockForm.html\",\"
\");\n$templateCache.put(\"app/pages/form/layouts/widgets/formWithoutLabels.html\",\"
\");\n$templateCache.put(\"app/pages/form/layouts/widgets/horizontalForm.html\",\"
\");\n$templateCache.put(\"app/pages/form/layouts/widgets/inlineForm.html\",\"
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/buttonGroups.html\",\"
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/buttons.html\",\"
Default button
Small button
Extra small button
Disabled button
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/dropdowns.html\",\"
Split button dropdowns
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/iconButtons.html\",\"
Buttons with icons
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/largeButtons.html\",\"
\");\n$templateCache.put(\"app/pages/ui/buttons/widgets/progressButtons.html\",\"
fill horizontal
fill vertical
shrink horizontal
shrink vertical
rotate-angle-bottom
perspective
rotate-angle-top
perspective
rotate-angle-left
perspective
rotate-angle-right
perspective
rotate-side-down
perspective
rotate-side-up
perspective
rotate-side-left
perspective
rotate-side-right
perspective
rotate-back
perspective
flip-open
perspective
slide-down
horizontal
move-up
horizontal
top-line
horizontal
lateral-lines
vertical
\");\n$templateCache.put(\"app/pages/ui/icons/widgets/fontAwesomeIcons.html\",\"
See all Font Awesome icons\");\n$templateCache.put(\"app/pages/ui/icons/widgets/ionicons.html\",\"
See all ionicons icons\");\n$templateCache.put(\"app/pages/ui/icons/widgets/kameleon.html\",\"
{{icon.name}}
See all Kamaleon icons\");\n$templateCache.put(\"app/pages/ui/icons/widgets/kameleonRounded.html\",\"
{{ icon.name }}
See all Kamaleon icons\");\n$templateCache.put(\"app/pages/ui/icons/widgets/socicon.html\",\"
{{ icon }}
See all Socicon icons\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/basicModal.html\",\"

Modal title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/dangerModal.html\",\"
Error
Your information hasn\\'t been saved!
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/infoModal.html\",\"
Information
You\\'ve got a new email!
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/largeModal.html\",\"

Modal title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/smallModal.html\",\"

Modal title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/successModal.html\",\"
Success
Your information has been saved successfully
\");\n$templateCache.put(\"app/pages/ui/modals/modalTemplates/warningModal.html\",\"
Warning
Your computer is about to explode!
\");\n$templateCache.put(\"app/pages/ui/modals/notifications/notifications.html\",\"
\");\n$templateCache.put(\"app/pages/ui/progressBars/widgets/animated.html\",\"
40% Complete (success)
20% Complete
60% Complete (warning)
80% Complete (danger)
\");\n$templateCache.put(\"app/pages/ui/progressBars/widgets/basic.html\",\"
40% Complete (success)
20% Complete
60% Complete (warning)
80% Complete (danger)
\");\n$templateCache.put(\"app/pages/ui/progressBars/widgets/label.html\",\"
40% Complete (success)
20% Complete
60% Complete (warning)
80% Complete (danger)
\");\n$templateCache.put(\"app/pages/ui/progressBars/widgets/stacked.html\",\"
35% Complete (success)
20% Complete (warning)
10% Complete (danger)
20% Complete (warning)
\");\n$templateCache.put(\"app/pages/ui/progressBars/widgets/striped.html\",\"
40% Complete (success)
20% Complete
60% Complete (warning)
80% Complete (danger)
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/select/select.html\",\"
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/switch/switch.html\",\"
\");\n$templateCache.put(\"app/pages/form/inputs/widgets/tagsInput/tagsInput.html\",\"
\");}]);"],"sourceRoot":"/source/"}