regaez / moodle-local_sidebar_contact Goto Github PK
View Code? Open in Web Editor NEWA pop out sidebar contact form for moodle
A pop out sidebar contact form for moodle
moodle-sidebar_contact ===================== Moodle Local - sidebar_contact Developed by - Thomas Threadgold - LearningWorks Ltd This local plug-in adds a popout sidebar contact form to moodle VERSION UPDATES =============== Version 2014102801, Initial release
The following code in js/scripts.js is not correct:
var ajaxURL = window.location.origin + '/local/sidebar_contact/index.php';
If the Moodle instance is running in a subdirectory of the webserver, it produces invalid URL. Ideally, this URL should be passed directly from the PHP. This is easy with YUI, not that easy with jQuery in Moodle framework.
The current code for including your js/scripts.js in lib.php is overcomplicated. It can be easily written in more safe way as
$PAGE->requires->js('/local/sidebar_contact/js/scripts.js');
As I can see, the JS function isEmail(email)
is defined in the global scope. Why not to have it inside your closure?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.