Atto: Templates

atto_templates
Maintained by Picture of Mark Sharp Mark Sharp
This is an atto plugin for Moodle which allows the administrator to define a set of predefined templates which a teacher can insert into their course pages
143 sites
123 downloads
22 fans

This is an atto plugin for Moodle which allows the administrator to define a set of predefined templates which a teacher can insert into their course pages.

It behaves in a very similar way as the TinyMCE templates function (https://www.tinymce.com/docs-3x/reference/plugins/Plugin3x@template/). Rather than storing the templates as stand-alone files, they are stored as settings in Moodle.


Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4

Contributors

Picture of Mark Sharp
Mark Sharp (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Tue, 4 Apr 2017, 5:10 PM
    Approval issue created: CONTRIB-6832
  • Picture of scott hallman
    Tue, 19 Sep 2017, 6:04 AM
    Hi Mark, we added your plugin to 3.4. Works well except for the templates we have added html to get tables and plain text too. The plain text strips the formatting and the tables don't load to the page. Is the template add area meant to have no editor? How do I format the tables if it is just a plain text box. Also does it not handle a big table, could this be why it fails to load? it looks fine in preview. Cheers Scott
  • Picture of Mark Sharp
    Tue, 19 Sep 2017, 4:36 PM
    When you're doing a table, make sure you have the table plugin on your atto task bar.
    I'll add an image above to show that in action. In your template, you design your table the with the number of rows and columns you want. The preview just shows what you have created and what will be inserted.
  • Picture of Polaris Lee
    Fri, 9 Feb 2018, 6:52 AM
    The following error occurs during installation.
    What is the problem?
    (moodle ver 3.4)

    Debugging output enabled
    ZIP /var/www/moodledata/temp/tool_installaddon/928e147a-445c-4ba8-90b8-6efd44b6ff4c/plugin.zip
    Validating atto_templates ... error
       [error] Unpacked file not found [{"file": "templates \ / tests \ /"}]
    Installation aborted due to validation failure
  • Picture of Mark Sharp
    Fri, 9 Feb 2018, 5:11 PM
    Hi Polaris,
    thanks for bringing that to my attention. The test folder was empty, so I removed it and it should now work for you.
    Mark
  • Picture of Polaris Lee
    Mon, 12 Feb 2018, 7:52 AM
    Thanks for the quick fix.
  • Picture of Cheryl Tsai
    Tue, 10 Apr 2018, 5:55 PM
    Hi, I finished the setting of the plugin(create new templates), but there is nothing appearing on the editor. How can I add the template into my text? My moodle version is 3.3
  • Picture of Mark Sharp
    Tue, 10 Apr 2018, 9:12 PM
    Hi Cheryl,
    did you add the templates toolbar to atto? Go to http://www.yoursite.com/admin/category.php?category=editoratto and add "templates" to the "Toolbar config".

    for example, mine says something like:
    style1 = title, bold, italic, styles, templates
  • Picture of Cheryl Tsai
    Wed, 11 Apr 2018, 10:19 AM
    Hi Mark,
    Thank you so much! I solve the problem! I didn't set the "style1 = title, bold, italic, styles, templates".
    Best wishes
  • Picture of stefan weber
    Thu, 3 May 2018, 9:25 PM
    I like this plugin, but for some reason, it does not take ALL the html that I enter.

    For example, it dropped "!important" and "border-radius" from my style tags

    Is there any reason for this behaviour?
  • Picture of Mark Sharp
    Thu, 3 May 2018, 9:46 PM
    Curious. Not sure why. I'm just using standard insert methods in atto - i.e. I'm not doing any filtering. I've only ever really used in with classes, rather than inline styling. Is that a possibility for you?
  • Picture of Andreas Brandt
    Wed, 16 May 2018, 2:20 PM
    I like the pulgin, too, But I've got a similar problem. I'm using IDs in the html code. But when inseting the template, all IDs are gone.

    Working without IDs isn't possible, cause I'd like to provide the bootstrap 4 collapse classes.

    Do you've got a hint, a workaround or a bugfix for me? THX
  • Picture of Mark Sharp
    Thu, 17 May 2018, 11:16 PM
    @stefan and @andreas I've put an update up on my git repo (link above). Would you mind trying that out to see if that fixes anything for you. Also, if you have any example code of what you're trying to insert as a template, please report it as an issue on the github page rather than here. thanks.
Please login to post comments