This is the main ONO Apps Framework Core Module, which is responsible for the entire logic as well as the look and feel (UI) behind most apps.
action_url_form();
Deprecated here, moved to ONO_FW_Apps_Core_ToolBox.
ONO::FW::Apps::Core->action_url_form( );
returns: ONO::FW::Apps::Core::ToolBox->action_url_form()
action_url_vars();
Deprecated here, moved to ONO_FW_Apps_Core_ToolBox.
ONO::FW::Apps::Core->action_url_vars( );
returns: ONO::FW::Apps::Core::ToolBox->action_url_vars($_[1])
blockbackbutton();
Code used to block the browser back button in certain situations.
ONO::FW::Apps::Core->blockbackbutton( $BASE, $vars_ref );
check_multi();
Deprecated here, moved to ONO_FW_Apps_Core_Check.
ONO::FW::Apps::Core->check_multi( $BLK_ref, $remaining, $page, $pages, $switches, $vars_ref );
returns: ONO::FW::Apps::Core::Check->check_multi( $BLK_ref, $remaining, $page, $pages, $switches, $vars_ref, )
check_rightwrong();
Deprecated here, moved to ONO_FW_Apps_Core_Check.
ONO::FW::Apps::Core->check_rightwrong( $is_wrong, $BLK_ref );
returns: ONO::FW::Apps::Core::Check->check_rightwrong($is_wrong,$BLK_ref)
check_single();
Deprecated here, moved to ONO_FW_Apps_Core_Check.
ONO::FW::Apps::Core->check_single( );
returns: ONO::FW::Apps::Core::Check->check_single(@_)
clean_answer_math();
Clean up math / number inputs.
ONO::FW::Apps::Core->clean_answer_math( );
returns: $answer
comma_limit();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->comma_limit( $num, $limit );
returns: $num
conf_box();
This is the main app configuration screen logic, used to build the initial app interface that lets users customize exercises and worksheets.
Switches:
-a print option: auto eval
-A print option: -a selected by default
-b print option: black and white
-c print option: corrections
-C print option: -c selected by default (recommended)
-d print option: date
-D print option: -d selected by default (recommended)
-F folder generator mode
-g show game button
-G bigger game button
-h web option: allow hints, checked by default
-H web option: allow Hints, not checked by default
-i print option: item numbers
-I print option: -i selected by default (recommended)
-K allow self-(K)correction (resulthints)
-l allow loading settings (also see 's' and 'u')
-L margin left 10px
-m multiple choice (web mode, auto-toggle with -N)
-M multiple choice (print mode)
-n print option: number of unique copies
-N number of questions (web/online mode only, also see -X)
-o show online button
-O one by one, or 20 questions per page
-p show print button + options
-P custom print button
-Q print option: no code, no title
-s allow saving settings (also see 'l' and 'u')
-S use 'Setup' instead of 'Configure exercise' as title
-t replace Title by $vars{'conf_box_title'} and/or $vars{'conf_box_icon'}
-T margin top 10px
-u save PDF to server (also see 'l' and 's')
-U print option: unique copies disabled
-W maxwidth is app_conf_box_maxwidth
-X only one by one, no multiply questions allowed
ONO::FW::Apps::Core->conf_box( $db, $community, $app, $form, $input, $action_url, $CONF, $lang, $BLK_ref, $vars_ref, $switches, $OVERLAY );
conf_box_title();
Generate the configuration box title.
ONO::FW::Apps::Core->conf_box_title( );
returns: qq~<table class="default_table mb5"> <tr class="vtop"> <td><img class="block24" src="/ono/osr/images/icons/crystal/32x32/$_[1].png" style="margin-right:3px" alt=""></td> <td><h3 class="m0 $COL">$_[2]</h3></td> </tr> </table> ~
conf_input();
Deprecated here, moved to ONO_FW_Apps_ToolBox.
ONO::FW::Apps::Core->conf_input( $type, $BLK_ref, $vars_ref, $switches, @data );
detect_local();
Detect where we are located (using domain).
ONO::FW::Apps::Core->detect_local( );
returns: $local
domain();
Return site domain.
ONO::FW::Apps::Core->domain( );
fix_fp_rounding();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->fix_fp_rounding( );
returns: $num
float_to_decimal();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->float_to_decimal( );
returns: $num
flush_cache();
Not used yet (deprecated?)
ONO::FW::Apps::Core->flush_cache( );
returns: \%vars
generate_add();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->generate_add( $i, $num1, $num2, $op, $res, $cache1, $cache2, $vars_ref, $force_flush );
returns: ($num1,$num2,$res,$cache1,$cache2,$DEBUG)
generate_muldiv();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->generate_muldiv( $i, $num1, $num2, $op, $res, $cache1, $cache2, $vars_ref, $force_flush );
returns: ($num1,$num2,$res,$cache1,$cache2,$DEBUG)
generate_sub();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->generate_sub( $i, $num1, $num2, $op, $res, $cache1, $cache2, $vars_ref, $force_flush );
returns: ($num1,$num2,$res,$cache1,$cache2,$DEBUG)
get_operations();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->get_operations( );
returns: ONO::FW::Apps::Core::Math->get_operations($_[1])
headers();
PDF header options.
Switches:
-c is correction sheet
-C alternative copyright
-E alternative copyright: evaluation
-N alternative copyright: notes
-X no copyright, no name, no date
ONO::FW::Apps::Core->headers( $vars_ref, $format, $switches );
headers_options();
PDF header helper.
ONO::FW::Apps::Core->headers_options( );
returns: $RET
hint_script();
Deprecated.
ONO::FW::Apps::Core->hint_script( );
returns: ""
hint_script_v2();
Display online hints helper.
ONO::FW::Apps::Core->hint_script_v2( $math1, $math2, $hints, $TARGET );
html_exponent();
Exponent to HTML.
ONO::FW::Apps::Core->html_exponent( );
returns: $num
info();
Get info for nfo display.
ONO::FW::Apps::Core->info( $item, $lang );
returns: ONO::FW::Apps::Core::LangKit->info($item,$lang)
info_display();
Info display.
ONO::FW::Apps::Core->info_display( );
returns: qq~<div class="hide900 italic fr p10 center" style="width:400px">$_[1]$_[2]</div>~
infopics();
Infopics generator.
ONO::FW::Apps::Core->infopics( );
returns: qq~<div class="hide600">~.ONO::Lib::UI::Image->collection("400:420:60::10:abs",@IMG2)."</div>"
infopics_core();
Infopics generator.
ONO::FW::Apps::Core->infopics_core( );
returns: @IMG2
infopics_simple();
Infopics generator. This version does NOT set any sizes, the result may need to be fitted in a div using width and height!
ONO::FW::Apps::Core->infopics_simple( );
returns: ONO::Lib::UI::Image->collection("0:0:0:0:0",@IMG2)
init();
Deprecated here, moved to ONO_FW_Apps_Core_ToolBox.
ONO::FW::Apps::Core->init( $vars_ref );
returns: ONO::FW::Apps::Core::ToolBox->init($vars_ref)
input_vars();
Deprecated here, moved to ONO_FW_Apps_Core_ToolBox.
Switches:
-f first question is 1 as first step, not 2
-r reload app with same settings mode
-R include Report variables
-x incluce exercise code and ID (incompatible with -r)
ONO::FW::Apps::Core->input_vars( $vars_ref, $switches );
returns: ONO::FW::Apps::Core::ToolBox->input_vars($vars_ref,$switches)
lang_check();
Check lang codes.
ONO::FW::Apps::Core->lang_check( @langs );
returns: ($langs[0],$langs[1])
lang_check_unique();
Check and make sure lang codes are unique.
ONO::FW::Apps::Core->lang_check_unique( @langs );
lang_tenses();
Deprecated here, moved to ONO_FW_Apps_Core_Lang.
ONO::FW::Apps::Core->lang_tenses( );
returns: ($ref1,$ref2,$ref3,$ref4,$ref5)
lang_verbs_add();
Deprecated here, moved to ONO_FW_Apps_Core_Lang.
ONO::FW::Apps::Core->lang_verbs_add( $db, $community, $option, $lang, $BLK_ref, $vars_ref );
returns: $ADD
lang_verbs_default();
Deprecated here, moved to ONO_FW_Apps_Core_Lang.
ONO::FW::Apps::Core->lang_verbs_default( );
returns: $verbs
lang_verbs_persons();
Deprecated here, moved to ONO_FW_Apps_Core_Lang.
ONO::FW::Apps::Core->lang_verbs_persons( );
returns: @persons
lang_verbs_persons_list();
Deprecated here, moved to ONO_FW_Apps_Core_Lang.
ONO::FW::Apps::Core->lang_verbs_persons_list( );
returns: "$persons[0];$persons[1];$persons[2];$persons[3];$persons[4];$persons[5];"
local_comma_delimiter();
Set comma delimiter (US/EU).
ONO::FW::Apps::Core->local_comma_delimiter( $local, $vars_ref );
returns: ($num_comma,$num_delimiter)
make_human_readable();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->make_human_readable( $num, $num_comma, $num_delimiter );
returns: ONO::FW::Apps::Core::Math->make_human_readable($num,$num_comma,$num_delimiter)
mkpdf();
Deprecated here, moved to ONO_FW_Apps_Core_Graphics.
ONO::FW::Apps::Core->mkpdf( $BLK_ref, $vars_ref, $HTTP, $BASE );
returns: ONO::FW::Apps::Core::Graphics->mkpdf( $BLK_ref, $vars_ref, $HTTP, $BASE, )
multi_frame_end();
Logic for splitting am exercise into two rows.
ONO::FW::Apps::Core->multi_frame_end( );
multi_frame_split();
Logic for splitting am exercise into two rows.
ONO::FW::Apps::Core->multi_frame_split( );
returns: qq~</table></div><div class="$width fl w100_900 fn_900"><table class="wide_table bt bb">~
multi_frame_start();
Logic for splitting am exercise into two rows.
ONO::FW::Apps::Core->multi_frame_start( );
multi_page_logic();
Mulit-page logic for online exercises.
Switches:
-p page can't be zero
-P pages can't be zero
ONO::FW::Apps::Core->multi_page_logic( $page, $vars_ref, $force_questions_per_page, $switches );
returns: ($stats_switches,$questions_per_page,$page,$pages)
now();
Deprecated.
ONO::FW::Apps::Core->now( );
number_length();
Detect the string length of a number.
ONO::FW::Apps::Core->number_length( $max, $comma );
returns: (length $max) + $comma
numsys();
Translate number systems (decimal, roman, hex).
ONO::FW::Apps::Core->numsys( $num1, $num2, $num3, $numsys );
returns: @num
operation_symbol();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
Switches:
-c colorize
-p print / pdf mode
-s use slash as division symbol
-x executable (simple code)
ONO::FW::Apps::Core->operation_symbol( );
returns: ONO::FW::Apps::Core::Math->operation_symbol($_[1],$_[2])
output_paper();
Deprecated here, moved to ONO_FW_Apps_Core_Graphics.
ONO::FW::Apps::Core->output_paper( $pdfkey, $BLK_ref, $vars_ref, $HTTP, $BASE, $switches );
returns: ONO::FW::Apps::Core::Graphics->output_paper( $pdfkey, $BLK_ref, $vars_ref, $HTTP, $BASE, $switches, )
output_paper_save();
Save a PDF file.
ONO::FW::Apps::Core->output_paper_save( $pdfkey, $BLK_ref, $vars_ref, $HTTP, $BASE, $yearmonmday );
pdf_draw_house();
Deprecated here, moved to ONO_FW_Apps_Core_Graphics.
ONO::FW::Apps::Core->pdf_draw_house( $canvas, $x, $y, $cols, $res, $op, $corr );
returns: ONO::FW::Apps::Core::Graphics->pdf_draw_house( $canvas, $x, $y, $cols, $res, $op, $corr, )
pdf_draw_wall();
Deprecated here, moved to ONO_FW_Apps_Core_Graphics.
ONO::FW::Apps::Core->pdf_draw_wall( $canvas, $x, $y, $rows, $nums_ref, $op, $numsys, $mode, $vars_ref, $num_comma );
returns: ONO::FW::Apps::Core::Graphics->pdf_draw_wall( $canvas, $x, $y, $rows, $nums_ref, $op, $numsys, $mode, $vars_ref, $num_comma, )
print_corrections();
Print corrections helper.
ONO::FW::Apps::Core->print_corrections( $file, $template, $format, $vars_ref );
print_design();
Select preferred print design (PDF).
ONO::FW::Apps::Core->print_design( $id, $lang, $BLK_ref, $switches );
returns: $WEB
print_options();
Deprecated.
ONO::FW::Apps::Core->print_options( );
returns: ""
question_number();
ONO::FW::Apps::Core->question_number( );
question_progress();
Deprecated here, moved to ONO_FW_Apps_Core_Question.
ONO::FW::Apps::Core->question_progress( $total, $question, $MORE, $switches );
returns: ONO::FW::Apps::Core::Question->question_progress( $total, $question, $MORE, $switches, )
question_progress_done();
Deprecated here, moved to ONO_FW_Apps_Core_Question.
ONO::FW::Apps::Core->question_progress_done( );
returns: ONO::FW::Apps::Core::Question->question_progress_done($_[1],$_[2])
question_progress_done_msg();
Deprecated here, moved to ONO_FW_Apps_Core_Question.
ONO::FW::Apps::Core->question_progress_done_msg( $app, $db, $community, $form, $action_url, $questions, $mistakes, $lang, $BLK_ref, $vars_ref, $switches );
returns: ONO::FW::Apps::Core::Question->question_progress_done_msg( $app, $db, $community, $form, $action_url, $questions, $mistakes, $lang, $BLK_ref, $vars_ref, $switches, )
random_number();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->random_number( $from, $to, $min, $max, $vars_ref );
returns: ONO::FW::Apps::Core::Math->random_number( $from, $to, $min, $max, $vars_ref, )
random_operation();
Select random operation.
ONO::FW::Apps::Core->random_operation( );
returns: $_[int(rand($num-1))+1]
range_check();
Check number range - deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->range_check( $max_from, $max_to, $from, $to, $negative, $numsys );
returns: ONO::FW::Apps::Core::Math->range_check( $max_from, $max_to, $from, $to, $negative, $numsys, )
round_up();
Deprecated here, moved to ONO_FW_Apps_Core_Math.
ONO::FW::Apps::Core->round_up( $num, $vars_ref );
returns: ONO::FW::Apps::Core::Math->round_up($num,$vars_ref)
running();
Check if an app is currently in "exercise run" mode.
ONO::FW::Apps::Core->running( );
site();
Return site domain.
ONO::FW::Apps::Core->site( );
returns: $site
sitename();
Return site name.
ONO::FW::Apps::Core->sitename( );
returns: $name
stats();
Deprecated here, moved to ONO_FW_Apps_Core_Stats.
ONO::FW::Apps::Core->stats( $MORE, $BLK_ref, $switches );
stats_multi_pages();
Deprecated here, moved to ONO_FW_Apps_Core_Stats.
ONO::FW::Apps::Core->stats_multi_pages( $questions, $stat_correct, $stat_wrong, $page, $pages, $questions_per_page );
stats_replace();
Deprecated here, moved to ONO_FW_Apps_Core_Stats.
ONO::FW::Apps::Core->stats_replace( );
returns: ONO::FW::Apps::Core::Stats->stats_replace( $data[1],$data[2],$data[3],$data[4],$data[5],$data[6],$data[7],$data[8],$data[9] )
subtitles();
Deprecated here, moved to ONO_FW_Apps_Core_LangKit.
ONO::FW::Apps::Core->subtitles( );
returns: ONO::FW::Apps::Core::LangKit->subtitles($_[1])
timer();
Transmit timer code (online exercising mode).
ONO::FW::Apps::Core->timer( $output_web, $output_web_timer_start );
unique_copies();
Logic to allow the generation of multiple page copies.
ONO::FW::Apps::Core->unique_copies( $num, $multiplexer );
returns: @copies
unique_copies_info();
Logic to allow the generation of multiple page copies.
ONO::FW::Apps::Core->unique_copies_info( $canvas, $copy, $vars_ref );
vardump();
Dump vars on developer station (debugging mode).
ONO::FW::Apps::Core->vardump( );
variation();
Detect platform variation.
ONO::FW::Apps::Core->variation( );
returns: $VAR
varstore();
Store exercise for later restart logic.
ONO::FW::Apps::Core->varstore( $username, $virclass, $anonymous, $vars_ref );
varstoreaction();
Store exercise for later restart logic.
ONO::FW::Apps::Core->varstoreaction( );
returns: (\%vars,%vars)
varstoreapp();
Store exercise for later restart logic.
ONO::FW::Apps::Core->varstoreapp( );
returns: $2
varstoredir();
Store exercise for later restart logic.
ONO::FW::Apps::Core->varstoredir( $username, $virclass, $anonymous, $timestamp );
win();
Configuration window generator.
Switches:
-o online
-p print
ONO::FW::Apps::Core->win( $form, $FORM, $BLK_ref, $switches );