Skip to content

alexander-storozhenko/testlance-script

Repository files navigation

Readme

API

Global variables

  • Q_TITLE # question title
  • DESCRIPTION # question description
  • USER_STATUS # user status
  • NEXT_Q # next question number
  • Q_TYPE # question type
  • TEST_TITLE # test title
  • ANSWERS # answers format (table):
{1 = 'answer1', 2 = 'answer2'}
  • TRUE_ANSWERS # true answers format (table):
{1 = 'true'}
  • USER_ANSWERS # user answers format (table):
{1 = 'true'}

Global functions

  • date_now(time_zone = false) # current date format (string):
'mm/dd/yy'
  • time_now() # current time format (string):
'hh:mm:ss'

Helper functions

  • compare_dates(date_1, date_2) # compare 2 dates. Format: "mm/dd/yy" return (integer):

    • -1 if left more than right
    • 1 if right more than left
    • 0 if right equals left
  • compare_times(date_1, date_2) # compare 2 times. Format: "hh:mm:ss" return (integer):

    • -1 if left more than right
    • 1 if right more than left
    • 0 if right equals left
  • string_split(string, template) # split string by template, return (table)

  • string_join(table, value) # join string, return (string)

testlance-logo-title


MIT license Copyright (c) 2021 Alexander Storozhenko

About

gem for testlance-app

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published