option explicit class clsGlobalSettings private a__,b__,c__,d__,e__,f__,g__,h__,i__,j__,k__,l__,m__,n__,o__,p__ public property get Audio set Audio=f__ end property public property get Dates set Dates=g__ end property public property get Languages set Languages=h__ end property public property get LessonFeedback set LessonFeedback=i__ end property public property get LessonManager set LessonManager=j__ end property public property get PlayerLayout set PlayerLayout=k__ end property public property get Preview set Preview=l__ end property public property get Stats set Stats=m__ end property public property get Database set Database=n__ end property public property get UserInterface set UserInterface=o__ end property public property get SimpleSearch set SimpleSearch=p__ end property public property get DebugMode if not IsEmptyStr(b__) then DebugMode = b__ else dim q__ set q__=XML.SelectSingleNode("/set_settings/set_debug") if IsValidObject(q__) then DebugMode = (q__.Text = "1") :else: DebugMode = false end if end property public property let DebugMode(AValue) b__=AValue end property public property get FileName FileName=c__ end property public property let Password(Value) SetCookieValue "password", Value end property public property get Password Password=GetCookieValue("password") end property public property let RememberMe(Value) SetCookieValue "rememberme", Value end property public property get RememberMe RememberMe=GetCookieValue("rememberme") if IsEmptyStr(RememberMe) then RememberMe = False end property public property get StatsDisplayMode StatsDisplayMode=RetrieveString("/set_settings/set_stats_display/set_stats_display_mode") end property public property get ScormRepository ScormRepository=RetrieveBoolean("/set_settings/set_scorm") end property public property get STTDemoHack dim q__ set q__=XML.SelectSingleNode("/set_settings/set_sttdemohack") if IsValidObject(q__) then STTDemoHack = q__.Text = "1" :else: STTDemoHack = false end property public property let UserName(Value) SetCookieValue "username", Value end property public property get UserName UserName=GetCookieValue("username") end property public property get WriteCookie WriteCookie=d__ end property public property let WriteCookie(Value) d__=Value end property public property get XML set XML=a__ end property private sub class_initialize c__="" b__="" d__=false set e__=new clsDocumentLoader set f__=new clsAudioSettings set g__=new clsDateSettings set h__=new clsLanguageSettings set i__=new clsLessonFeedbackSettings set j__=new clsLessonManagerSettings set k__=new clsPlayerLayoutSettings set l__=new clsPreviewSettings set m__=new clsStatisticsSettings set n__=new clsDatabaseSettings set o__=new clsUserInterfaceSettings set p__=new clsSimpleSearchSettings end sub private sub class_terminate set e__=nothing set f__=nothing set g__=nothing set h__=nothing set i__=nothing set j__=nothing set k__=nothing set l__=nothing set m__=nothing set n__=nothing set o__=nothing set p__=nothing end sub public sub Load set a__=e__.LoadXML(csGlobalSettingsPath) c__=RelativeToAbsolutePath(GetFullFolderPath, csGlobalSettingsPath) f__.Load(me) g__.Load(me) h__.Load(me) i__.Load(me) j__.Load(me) k__.Load(me) l__.Load(me) m__.Load(me) n__.Load(me) o__.Load(me) p__.Load(me) end sub public function RetrieveBoolean(QueryString) if IsValidObject(XML.SelectSingleNode(QueryString)) then RetrieveBoolean = (XML.SelectSingleNode(QueryString).Text = "1") :else: RetrieveBoolean = false end function public function RetrieveInt(QueryString) if IsValidObject(XML.SelectSingleNode(QueryString)) then RetrieveInt = cint(XML.SelectSingleNode(QueryString).Text) :else: RetrieveInt = -1 end function public function RetrieveString(QueryString) if IsValidObject(XML.SelectSingleNode(QueryString)) then RetrieveString = XML.SelectSingleNode(QueryString).Text :else: RetrieveString = "" end function public function Loaded(QueryString) Loaded=IsValidObject(XML.SelectSingleNode(QueryString)) end function end class class clsLessonFeedbackSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get EmailAddress EmailAddress=Parent.RetrieveString("/set_settings/set_lesson_feedback/set_email") end property public property get Enabled Enabled=Parent.RetrieveBoolean("/set_settings/set_lesson_feedback/set_enabled") end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_lesson_feedback") and b__ end property end class class clsDateSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get AllowAnyValidDateSeparator AllowAnyValidDateSeparator=Parent.RetrieveBoolean("/set_settings/set_date/set_allow_any_valid_date_separator") end property public property get AssumeCurrentCentury AssumeCurrentCentury=Parent.RetrieveBoolean("/set_settings/set_date/set_assume_current_century") end property public property get DateFormat DateFormat=Parent.RetrieveString("/set_settings/set_date/set_date_format") end property public property get DateSeparator DateSeparator=Parent.RetrieveString("/set_settings/set_date/set_date_separator") end property public property get DateSeparatorOptional DateSeparatorOptional=Parent.RetrieveBoolean("/set_settings/set_date/set_date_separator_optional") end property public property get DayLeadingZero DayLeadingZero=Parent.RetrieveBoolean("/set_settings/set_date/set_day_leading_zero") end property public property get FourDigitYearRequired FourDigitYearRequired=Parent.RetrieveBoolean("/set_settings/set_date/set_four_digit_year_required") end property public property get MonthLeadingZero MonthLeadingZero=Parent.RetrieveBoolean("/set_settings/set_date/set_month_leading_zero") end property public property get TwoDigitYearRequired TwoDigitYearRequired=Parent.RetrieveBoolean("/set_settings/set_date/set_two_digit_year_required") end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_date") and b__ end property end class class clsStatisticsSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get HTTPPath on error resume next Err.Clear HTTPPath=Parent.RetrieveString("/set_settings/set_statistics/set_http_path") if Err.Number <> 0 then HTTPPath = "" end property public property get Enabled on error resume next Err.Clear Enabled=Parent.RetrieveBoolean("/set_settings/set_statistics/set_enabled") if Err.Number <> 0 then Enabled = false end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_statistics") and b__ end property end class class clsDatabaseSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get LoginType on error resume next Err.Clear LoginType=Parent.RetrieveString("/set_settings/set_database/set_login_type") if Err.Number <> 0 then LoginType = "" end property public property get ValidatePassword on error resume next Err.Clear ValidatePassword=Parent.RetrieveBoolean("/set_settings/set_database/set_validate_password") if Err.Number <> 0 then ValidatePassword = false end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_database") and b__ end property end class class clsLessonManagerSettings private a__,b__,c__ public property get XML set XML=c__ end property public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false set c__=nothing end sub private sub class_terminate set a__=nothing set c__=nothing end sub public property get AllowNaturalModePlay AllowNaturalModePlay=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_natural_mode_play") end property public property get AllowSpecificModePlay AllowSpecificModePlay=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_specific_mode_play") end property public property get OrderedModeList dim d__,li,e__ set d__=XML.SelectNodes("/set_settings/set_lesson_manager/set_ordered_mode_list/set_item") if IsValidObject(d__) then redim e__(cint(d__.Length)-1) for li=0 to d__.Length-1 e__(li)=d__.Item(li).Text next else redim e__(0) end if OrderedModeList=e__ end property public property get ShowAdditionalDocumentation ShowAdditionalDocumentation=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_add_docs") end property public property get ShowDocumentation ShowDocumentation=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_documentation") end property public property get ShowFullScreen ShowFullScreen=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_full_screen") end property public property get ShowLaunchLiveHelp ShowLaunchLiveHelp=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_enable_live_help") end property public property get ShowLaunchPreview ShowLaunchPreview=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_enable_preview") end property public property get ShowLessonDescription ShowLessonDescription=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_lesson_desc") end property public property get ShowLessonInformation ShowLessonInformation=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_lesson_info") end property public property get ShowLessonManagerAfterRunningALesson ShowLessonManagerAfterRunningALesson=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_lesson_manager_after_running") end property public property get ShowLessonManagerBeforeRunningALesson ShowLessonManagerBeforeRunningALesson=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_lesson_manager_before_running") end property public property get ShowLessonName ShowLessonName=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_lesson_name") end property public property get ShowResults ShowResults=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_performance_hist") end property public property get ShowRepository ShowRepository=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_repository") end property public property get ShowSettingsButton ShowSettingsButton=Parent.RetrieveBoolean("/set_settings/set_lesson_manager/set_show_settings_toolbar_btn") end property public function Load(AParent) set a__=AParent set c__=AParent.XML b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_lesson_manager") and b__ end property end class class clsSimpleSearchSettings private a__,b__,c__ public property get XML set XML=c__ end property public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false set c__=nothing end sub private sub class_terminate set a__=nothing set c__=nothing end sub public property get AllowSpecificModePlay AllowSpecificModePlay=Parent.RetrieveBoolean("/set_settings/set_simple_search/set_specific_mode_play") end property public property get OrderedModeList dim d__,li,e__ set d__=XML.SelectNodes("/set_settings/set_simple_search/set_ordered_mode_list/set_item") if IsValidObject(d__) then redim e__(cint(d__.Length)-1) for li=0 to d__.Length-1 e__(li)=d__.Item(li).Text next else redim e__(0) end if OrderedModeList=e__ end property public property get ShowAdditionalDocumentation ShowAdditionalDocumentation=Parent.RetrieveBoolean("/set_settings/set_simple_search/set_show_add_docs") end property public property get ShowDocumentation ShowDocumentation=Parent.RetrieveBoolean("/set_settings/set_simple_search/set_show_documentation") end property public property get ShowLaunchLiveHelp ShowLaunchLiveHelp=Parent.RetrieveBoolean("/set_settings/set_simple_search/set_enable_live_help") end property public property get ShowLaunchPreview ShowLaunchPreview=Parent.RetrieveBoolean("/set_settings/set_simple_search/set_enable_preview") end property public function Load(AParent) set a__=AParent set c__=AParent.XML b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_simple_search") and b__ end property end class class clsLanguageSettings private a__,b__,c__,d__,e__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false c__="" d__="" e__="" end sub private sub class_terminate set a__=nothing end sub public property get AllowOverride AllowOverride=Parent.RetrieveBoolean("/set_settings/set_languages/set_allow_override") end property public property get DefaultMessageSetLanguage dim f__ if not Parent.ScormRepository then f__ = GetCookieValue("msgsetlanguage") if not IsEmptyStr(c__) then DefaultMessageSetLanguage = c__ elseif not IsEmptyStr(f__) and AllowOverride then DefaultMessageSetLanguage=f__ else DefaultMessageSetLanguage=InternalDefaultMessageSetLanguage end if else DefaultMessageSetLanguage=InternalDefaultMessageSetLanguage end if end property public property let DefaultMessageSetLanguage(Value) c__=Value if Parent.WriteCookie then SetCookieValue "msgsetlanguage", Value end property public property get PresenterLanguage dim f__ if not Parent.ScormRepository then f__ = GetCookieValue("playerlanguage") if not IsEmptyStr(d__) then PresenterLanguage = d__ elseif not IsEmptyStr(f__) and AllowOverride then PresenterLanguage=f__ else PresenterLanguage=InternalPresenterLanguage end if else PresenterLanguage=InternalPresenterLanguage end if end property public property let PresenterLanguage(Value) d__=Value if Parent.WriteCookie then SetCookieValue "playerlanguage", Value end property public property get ShowLanguagesOnLogin dim f__ if not Parent.ScormRepository then f__ = GetCookieValue("showlanguagesonlogin") if not IsEmptyStr(e__) then ShowLanguagesOnLogin = e__ elseif not IsEmptyStr(f__) and AllowOverride then ShowLanguagesOnLogin=f__ else ShowLanguagesOnLogin=InternalShowLanguagesOnLogin end if else ShowLanguagesOnLogin=InternalShowLanguagesOnLogin end if end property public property let ShowLanguagesOnLogin(Value) e__=Value if Parent.WriteCookie then SetCookieValue "showlanguagesonlogin", Value end property private function InternalDefaultMessageSetLanguage InternalDefaultMessageSetLanguage=Parent.RetrieveString("/set_settings/set_languages/set_msgset_language") end function private function InternalPresenterLanguage InternalPresenterLanguage=Parent.RetrieveString("/set_settings/set_languages/set_presenter_language") if IsEmptyStr(InternalPresenterLanguage) then InternalPresenterLanguage = "english" end function private function InternalShowLanguagesOnLogin InternalShowLanguagesOnLogin=Parent.RetrieveBoolean("/set_settings/set_languages/set_show_in_login") end function public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_languages") and b__ end property end class class clsPreviewSettings private a__,b__,c__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false c__="" end sub private sub class_terminate set a__=nothing end sub public property get Speed if IsEmptyStr(c__) then c__ = Parent.RetrieveString("/set_settings/set_preview_player/set_speed") if IsEmptyStr(c__) then c__ = svMedium Speed=c__ else Speed=c__ end if end property public property let Speed(Value) c__=Value end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_preview_player") and b__ end property end class class clsUserInterfaceSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get BubbleWindowBorderColor BubbleWindowBorderColor=Parent.RetrieveString("/set_settings/set_userinterface/set_border_color") end property public property get BubbleWindowBackgroundColor BubbleWindowBackgroundColor=Parent.RetrieveString("/set_settings/set_userinterface/set_bubble_color") end property public property get LessonManagerCustomImage LessonManagerCustomImage=Parent.RetrieveString("/set_settings/set_userinterface/set_custom_image_component") end property public property get LessonManagerCustomImageEnabled LessonManagerCustomImageEnabled=Parent.RetrieveString("/set_settings/set_userinterface/set_custom_image") end property public property get Color Color=Parent.RetrieveString("/set_settings/set_userinterface/set_custom_player_color") end property public property get FontColor FontColor=Parent.RetrieveString("/set_settings/set_userinterface/set_custom_player_font_color") end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_userinterface") and b__ end property end class class clsPlayerLayoutSettings private a__,b__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false end sub private sub class_terminate set a__=nothing end sub public property get AutoHighlightIncompleteTask AutoHighlightIncompleteTask=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_enable_custom_task_highlight_color") end property public property get CustomTaskHighLightColor CustomTaskHighLightColor=Parent.RetrieveString("/set_settings/set_player_layout/set_custom_task_highlight_color") end property public property get EnableCustomTaskHighlightColor EnableCustomTaskHighlightColor=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_enable_custom_task_highlight_color") end property public property get CustomPlayerImage dim c__ c__=Parent.RetrieveString("/set_settings/set_player_layout/set_custom_player_image_component") c__=lCase(c__) c__=Replace(c__, "\", "/") CustomPlayerImage=c__ end property public property get InstructorHeight dim c__ c__=cint(Parent.RetrieveString("/set_settings/set_player_layout/set_wizard_height")) if c__ < 100 then c__ = 150 InstructorHeight=c__ end property public property get InstructorWidth dim c__ c__=cint(Parent.RetrieveString("/set_settings/set_player_layout/set_wizard_width")) if c__ < 200 then c__ = 350 InstructorWidth=c__ end property public property get RunLessonFullScreen RunLessonFullScreen=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_run_lesson_full_screen") end property public property get ShowCustomPlayerImage ShowCustomPlayerImage=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_custom_player_image") end property public property get ShowFrameIndex ShowFrameIndex=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_show_frame_index") end property public property get ShowFrameObjectivesInBubble ShowFrameObjectivesInBubble=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_frame_objectives_in_bubble") end property public property get ShowModeName ShowModeName=Parent.RetrieveBoolean("/set_settings/set_player_layout/set_show_mode_name") end property public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_player_layout") and b__ end property end class class clsAudioSettings private a__,b__,c__ public property get Parent set Parent=a__ end property private sub class_initialize set a__=nothing b__=false c__="" end sub private sub class_terminate set a__=nothing end sub public property get Enabled dim d__ if not Parent.ScormRepository then d__ = GetCookieValue("audioenabled") if not IsEmptyStr(c__) then Enabled = c__ elseif not IsEmptyStr(d__) and AllowOverride then Enabled=d__ else Enabled=InternalEnabled end if else Enabled=InternalEnabled end if end property public property let Enabled(Value) c__=Value if Parent.WriteCookie then SetCookieValue "audioenabled", Value end property public property get AllowOverride AllowOverride=Parent.RetrieveBoolean("/set_settings/set_audio/set_allow_override") end property private function InternalEnabled InternalEnabled=Parent.RetrieveBoolean("/set_settings/set_audio/set_audio_enabled") end function public function Load(AParent) set a__=AParent b__=true end function public property get Loaded Loaded=Parent.Loaded("/set_settings/set_audio") and b__ end property end class