This Moodle local plugin emits a Twitter summary card for courses.
The Twitter Summary Card in the course homepage will give kind of preview of the content of your Moodle course by using the information provided by mean of:
- the course title
- the course description
- an optional image, being the first added in Section #0. Beware that this image should be publicly available regardless the user being enrolled into that course
If you want to deepen what a Twitter Summary Card is, more details are available at:
- https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary
- https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup
- Moodle 3.4 (build 2017111300 or later)
To install using git, type this command in the root of your Moodle installation:
git clone git://github.com/scara/moodle-local_twittercard.git ./local/twittercard
Then add /local/twittercard
to your gitignore
or local exclude
files, e.g.:
echo '/local/twittercard' >> .git/info/exclude
Alternatively, download the tar.gz/zip respectively from:
- https://github.com/scara/moodle-local_twittercard/tarball/master
- https://github.com/scara/moodle-local_twittercard/zipball/master
and uncompress it into the local
folder.
Then rename the new folder into twittercard
.
Log into your Moodle instance as admin: the installation process will start. Alternatively, visit the Site administration > Notifications page.
After you have installed this local plugin, you'll need to configure it under Site administration -> Plugins -> Local plugins -> Twitter card in the Settings block.
The Twitter social icons used in the plugins list are licensed as described in https://about.twitter.com/en_us/company/brand-resources.html#social-icons
The Twitter card Moodle local plugin is licenced under the GNU GPL v3 or later.
Copyright (c) 2017 Matteo Scaramuccia moodle@matteoscaramuccia.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
- Creating the card, e.g. when extracting the first image in section 0, requires a bit of computation.
- The first image added into section 0 of a course must be publicly accessible.
- This plugin doesn't automagically log the
Twitterbot
User-Agent (
"Twitterbot/1.0"
) in (yet) so you need to take care of guest access in those courses exposed via a Twitter card. More details at MDL-61586.
- Investigate the opportunity to implement more Twitter cards.