r''' ----------------------------------------------------------------------- webquiz_templates | html template file ----------------------------------------------------------------------- Copyright (C) Andrew Mathas, University of Sydney Distributed under the terms of the GNU General Public License (GPL) http://www.gnu.org/licenses/ This file is part of the WebQuiz system. ---------------------------------------------------------------------- ''' # -*- encoding: utf-8 -*- ## The quiz web pages are built using the following "template" strings # html meta statements html_meta = r''' ''' # javascript for setting up the questions questions_javascript = r''' ''' mathjs=r' ' webquiz_init = r'''
''' # Bread crumbs including a drop down menu for all of the quizzes for the unit. # The drop-down-menu is added by create_quizindex_menu() in webquiz.js breadcrumb_line_text = '
  • {text}
  • \n' breadcrumb_line_url = '
  • {text}
  • \n' breadcrumb_quizindex = r'''
  • {quizzes}
  • ''' create_quizindex_menu = r'''// construct the drop down menu if QuizTitles has some entries if (QuizTitles.length > 0 && quizindex_menu) { create_quizindex_menu(); } ''' breadcrumbs = r''' ''' # Should we add a menu to change the theme dynamically? If so then the code # below should be added to the breadcrumbs and then fixed a little. Perhaps the # trickiest bit is finding the current list of supported themes. theme_menu=r''' ''' # Add a drop-down menu to the navigation to dynamically change the theme? # question buttons button = r'
    {b}
    ' discuss = r'
  • {title}
  • ' side_menu = r'''
    {discussion_list}{question_buttons}
    {department}

    {institution}

    ''' question_buttons = r'''

    {buttons}
    {side_menu_star}
    {side_menu_tick}
    {side_menu_cross}
    ''' # quiz title and navigation arrows quiz_header = r'''
    {title}
    {arrows}
    ''' navigation_arrows = r''' {question} {question_number} {questions} ''' # discussion item discussion = r'''
    {heading}{discussion.text}
    ''' discussion_heading = r'''
    {}
    ''' #quiz index quiz_index_div = r'''
    ''' index_item = r'''
  • {title}
  • ''' # now we come to the question wrappers question_wrapper = r'''
    {question_number}{question} {feedback}
    ''' question_text = r''' {question_text}
    {question_options}

    {nextquestion}

    ''' nextquestion='' # Questions and feedback: input_answer = '{answer} {after_text}' choice_answer = '{choices}
    {after_text}' input_single = '\n' single_item = ''' {choice}
    {text}
    ''' multiple_item = ''' {choice}
    {text}
    ''' tf_feedback_text = r'''
    {correct_answer} {answer2}
    {text}
    ''' single_feedback = r'''
    {alpha_choice} {correct_answer}
    {feedback}
    ''' multiple_feedback = r'''
    {one_mistake}
    {multiple_choice_opener} {correct_answer}.
    {feedback}
    ''' multiple_feedback_correct = r'''
    {correct}
      {feedback}
    ''' multiple_feedback_answer = '
  • {correct_answer} {reason}
  • ' # no script error when javascript is not enabled no_script = r'''''' ###################################################################### # missing webquiz.ini file ###################################################################### missing_webquiz_ini = r''' webquiz installation error: unable to find webquiz.ini -> {} If you believe that WebQuiz has been installed correctly then please try rebuilding the TeX filename database. On TeXLive systems this can be done using the command mktexlsl, or using the TeXLive gui. On MiKTEX you can rebuild the database from the Tasks menu on the MiKTeX console. You may need to run this command using an administrator account or sudo, on unix systems. ''' ###################################################################### # the remaining templates prompt the user when initialising webquiz ###################################################################### initialise_invite = r'''WebQuiz needs to be initialised. Before WebQuiz can display quiz web pages on your system it first needs to copy some css and javascript files into a directory that is accessible from your webserver. Do you want to initialise WebQuiz now [Y/n]? ''' initialise_before_settings = r''' Before you can view the webquiz settings you need to initialise WebQuiz using the command: webquiz --initialise ''' initialise_introduction = r''' WebQuiz Initialisation ====================== If you want to install the web components of WebQuiz files into a "system" directory then you should quit this program (use control-C on unix-like systems) and then run webquiz --initialise from an administrators account or, on unix-like systems, use: sudo webquiz --initialise If you want to continue then WebQuiz will guide you through the initialisation process. For more information about the steps involved see Section 3.2 of the WebQuiz manual On many systems, you can open the webquiz manual using the command: texdoc webquiz ''' webroot_request = r'''---- To make files accessible from your web server WebQuiz needs: o A directory, or folder, on your server that is visible from your web server. This directory MUST be accessible from the web. It can either be a "system" directory or in your personal web directories. o The relative URL for accessing these files from the web. This is the part of the URL that you have to add to your "root" URL to access the files. For example, if the URL for your department is http://www.maths.usyd.edu.au/ and the WebQuiz files can be accessed as http://www.maths.usyd.edu.au/teaching/WebQuiz then the relative URL for the WebQuiz files is /teaching/WebQuiz It is recommended that you create a separate directory for WebQuiz on your web server. The location of the files on your web server will depend on your operating system and system configuration. A common sysem location for the WebQuiz web directory on a {platform} system is {webquiz_dir} ''' not_installed = r''' According to kpsewhich, the TeX components of WebQuiz are not installed on your system. If you have downloaded the WebQuiz zip file from ctan then try using: > webquiz --tex-install If the TeX components are already installed then something has gone horribly wrong. If you think this is a bug please report it by creating an issue at {} ''' oserror_copying = r'''There was a problem copying files to {web_dir} Error: {err} Please give a different directory ''' webquiz_url_message = r''' Please give the relative URL for the WebQuiz web directory. For example, if the base of your web server's directory is /var/www/html/ and the WebQuiz web directory is /var/www/html/courses/WebQuiz then the relative URL for the WebQuiz directory would be /courses/WebQuiz. WebQuiz relative URL [{}]: ''' initialise_ending = r''' You should now be able to build web pages using webquiz! As an initial test you can try to build the example files from the webquiz manual by going to the directory {web_dir}/doc/examples If pstricks and dvisgvm are properly configured (see Section 3.3 of the manual), then you can also try building the online manual, by going to the directory {web_dir}/doc/examples and typing: webquiz webquiz-online-manual If you want to change the default webquiz settings please use: webquiz --edit-settings ''' text_initialise_warning = r''' WebQuiz has not yet been initialised. To remove this warning please use webquiz --initialise to install the WebQuiz web files onto your system. ''' web_initialise_warning = r'''
    WebQuiz has not yet been initialised. To remove this warning box please use
    webquiz --initialise
    to install the WebQuiz web files on your system.
    ''' rc_permission_error = r''' Attempting to write the rcfile to {rcfile} resulted in the error: {error} To write the WebQuiz rcfile into this directory you may need to quit and run webquiz again, either using an administrator account, or using sudo on linux/macosx. Press the key 1-3, followed by RETURN, to: 1. Try to save to {rcfile} again 2. Save to the user rcfile {alt_rcfile} 3. Give a different location for the rcfile Press any other key to exit without saving. ''' permission_error = r''' You do not have permission to write to {}. To install WebQuiz files into this directory you may need to quit and run webquiz using either an administrator account, or using sudo on linux/macosx. Alternatively, please give a different directory. ''' insufficient_permissions = r''' Insufficient permissions. Try using sudo or using an admisitrator account. {} ''' webquiz_url_warning = r''' WARNING: most of the time, but not always, the relative URL will be a suffix of the web directory name, which is not the case with your settings. Your URL may well be correct, however, if you have made a mistake then you can change this at any time using the command: webquiz --initialise ''' edit_settings = r'''---- In the webquizrc file you can set global defaults for the following: breadrumbs colour theme department department_url engine institution institution language Leave these blank if you do not want default values. There are three additional "advanced: options: mathjax webquiz_layout webquiz_mk4 Please only change these settings if you know what you are doing because incorrect values for these settings will break WebQuiz. With each setting the default value is printed inside square brackets. For example, as [default]. Press RETURN to accept the default value. Except for the location of the WebQuiz web directory all of these settings are easy to change at any time using the command: webquiz --edit-settings ''' advanced_settings = r''' ** The remaining settings are advanced settings that you probably ** ** do not want to change at this time. Incorrect values for these ** ** settings will break WebQuiz so accept the defaults unless you ** ** know what you are doing. ** ''' # and now for the webquiz help message webquiz_help_message = r''' WebQuiz allows you to write interactive online quizzes using latex '''