Atto: question

Maintained by Richard Jones Richard Jones
Creates a button visible to teachers that inserts a text link, question number and display mode into Moodle editable text with delimiter tags which will be picked up by moodle_filter_simplequestion.
58 sites
6 fans

This plugin adds an editor button to the ATTO editor toolbar.  The button can be used to enter a code for the Moodle Simple Question plugin, this button is not available to students.

The button activates a dialog requiring the link text for the question, the question number and the display mode (embed or popup). 

You can find the question number by looking at the questions in your question bank.  Click the preview question link and look in the URL, the first id is the question's id number.

Question number xxx is replaced by a simple encryption technique such that the original id number is not displayed to the user in the popup URL.

The button requires filter_simplequestion to be installed.

Potential privacy issues

None known.


Screenshot #0


Richard Jones
Richard Jones (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Mon, 27 Nov 2017, 8:50 AM
    Approval issue created: CONTRIB-7131
  • Picture of Polaris Lee
    Sat, 24 Mar 2018, 8:11 PM
    Thanks for good plugin.
    I got a problem.
    When applying 'question' plugin to atto toolbar config, I get an error when registering new e-mail user as below.
    (moodle.3.4.2 php7.0 centos7 mariadb10.1
    Debug info: SELECT id FROM {user} WHERE id = ? AND deleted = ?
    [array (
    0 => 0,
    1 => 0,
    Error code: invaliduser

    Stack trace: •line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
    •line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
    •line 6015 of /lib/accesslib.php: call to moodle_database->get_record()
    •line 59 of /lib/editor/atto/plugins/question/lib.php: call to context_user::instance()
    •line 7678 of /lib/moodlelib.php: call to atto_question_params_for_js()
    •line 131 of /lib/editor/atto/lib.php: call to component_callback()
    •line 406 of /lib/form/editor.php: call to atto_texteditor->use_editor()
    •line 192 of /lib/pear/HTML/QuickForm/Renderer/Tableless.php: call to MoodleQuickForm_editor->toHtml()
    •line 3061 of /lib/formslib.php: call to HTML_QuickForm_Renderer_Tableless->renderElement()
    •line 418 of /lib/pear/HTML/QuickForm/element.php: call to MoodleQuickForm_Renderer->renderElement()
    •line 1643 of /lib/pear/HTML/QuickForm.php: call to HTML_QuickForm_element->accept()
    •line 1802 of /lib/formslib.php: call to HTML_QuickForm->accept()
    •line 1686 of /lib/pear/HTML/QuickForm.php: call to MoodleQuickForm->accept()
    •line 445 of /lib/pear/HTML/Common.php: call to HTML_QuickForm->toHtml()
    •line 964 of /lib/formslib.php: call to HTML_Common->display()
    •line 156 of /login/signup_form.php: call to moodleform->display()
    •line 480 of /theme/boost/classes/output/core_renderer.php: call to login_signup_form->export_for_template()
    •line 210 of /lib/outputrenderers.php: call to theme_boost\output\core_renderer->render_login_signup_form()
    •line 114 of /login/signup.php: call to renderer_base->render()
  • Richard Jones
    Tue, 27 Mar 2018, 10:20 AM
    Hi Polaris. That's weird but I will take a look and see if I can reproduce that. I assume that it doesn't prevent any user registration or use of Atto editor?
  • Richard Jones
    Tue, 27 Mar 2018, 11:29 AM
    So the registration process includes a call to find the editor preferences it seems. The atto question button has a check to see if the user is permitted to use that button. If the user is in the process of authentication they won't be logged on yet. As long as the editor button is working for them as expected when they are logged on I can fix that.

Commenting temporarily disabled