Moodle - Hook events for customizing core functionality - listener

In moodle , is there a way to hook onto core functionality such as adding courses, creating users and adding our own custom code, so there is no core modifications.

There are events that trigger after users / courses have been updated, so you can take your own actions after these have taken place.
There isn't a way to override the original functionality, without making core modifications.
For Moodle versions before 2.7, the events API is documented at: http://docs.moodle.org/dev/Events_API
(Section 5 has a list of core events you can listen to)
For Moodle 2.7 onwards, the events API is documented at:
http://docs.moodle.org/dev/Event_2
(Section 4.5.1 has a list of core events you can listen to)

Related

Angular 9 Plugin Architecture

I have currently written an Angular 9 application, this consists of components and services.
The goal
I have in mind is to be able to override the existing html templates and/or the entire component using a plugin architecture.
I have been following the code located on GitHub here: https://github.com/apoprotsky/angular-plugin-architecture
The Problem
I am not able to use/import my services that deal with authentication, fetching data or dealing with forms etc.
Things I've Tried
Just importing it - doesn't work
Attempted to move all the relevant services to a separate module and load this into both the core app and the plugin, this works for the core app, but does not work for the plugin (it can't find it) - doesn't work
So, the question is, is what I'm trying to do at all possible - if so, what are the best methods for doing so, i feel like the github repo noted above is almost what I'm needing to achieve, but as stated, importing services etc do not work.

Polymer Starter Kit vs Polymer App Toolbox

What's the difference between Polymer Starter Kit and Polymer App Toolbox?
Both are collections of web components, build & testing tools, and Material Design templates for building Progressive Web Apps with Polymer.
Which one should I base my new project on?
Here are some details regarding both of them:
Toolbox
Pros:
Was built after Polymer team started focusing on app side of Polymer
rather than elements
Gets more updates than PSK
Has all the other required tools (server, linter, bower, tester)
built-in
In case of building an element (like to publish) it uses flat import
structure, where even though bower downloads are kept in
bower_components folder and element to be made is kept outside the
bower_components folder imports are still made as though both are
present in bower_components
Is made specifically to help developers in building their
application/element
Is more in line with Progressive Web app vision of the team.
Cons:
Still in beta phase just like all the app-elements it uses internally
PSK
PSK was built with the purpose of providing a starting point for the developers who are new to Polymer and are more in learning phase. It has some pre-built elements with hard-coded data. If you look inside index.html you will find <template is="dom-bind"> being used which Polymer team recommends not to use in production environment. It was built when Polymer team was still focusing more on the elements side of Polymer as a result it does not use any of the Polymer's app-elements using which Polymer team has built the shop demo. A newer version has not been released since March as team is currently working on version 2 of PSK.
The official Polymer blog post Should I Use Polymer Starter Kit or Polymer CLI states that if you’re starting a new project, use Polymer CLI (which is a part of Polymer App Toolbox). In fact, the Polymer Starter Toolkit 2 is just another template that you can use with Polymer CLI:

Yii2 - Upgrade from basic application to Advanced application

I have developed a Basic application in Yii2. It contains 3 models and respective controllers and views, no extension, no theme.
I now think that I should make that application with advanced template for future extend-ability.
Can I convert the basic app directly to advanced app or make a new one?
If I can convert the basic app, what are the steps?
I searched on google but can't find anything related to it except the comparison of the two.
You need modify this bootstrap file. It's make avalible use \common, \frontend, \backend and \console namespaces in project.
In this way you can create any quantity of applications in your project.

Sublime Text How to add package to global repository

I created a plugin for sublime and I called it "sublimecastling".
The main idea is to replace 2 selected fields.
So I'll be glad to know whether it's possible to add it to your Sublime repository in order users could install the plugin via package-control.
The github link is provided below,
https://github.com/unknownuser88/sublimecastling
If you want to make a plugin available via Package Control, visit the documentation page on the Package Control website and click on Submitting a Package. There are a number of steps, which can be summarized as follows:
Search Package Control to ensure your package fulfills an unmet need, or greatly improves upon an existing package - don't create a new one (especially a very simple one) when you could work with the author of an existing one to add a particular feature.
Pick a name - there are several requirements here.
Decide how to host - Github? Bitbucket? Your own SSL server?
my own note here: Github is easiest
Pick a versioning strategy using semantic versioning. Note that all new packages must release by using versioning tags, not by branches or commits.
Prepare your repo - several things to do here.
Fork the Package Control Channel on Github and add your repo to the default channel - detailed instructions included.
Run the ChannelRepositoryTools package in Sublime to make sure everything is OK.
Note: Test your package with both ST2 and ST3 to make sure it works with both versions of Sublime. If you can only support one version due to the language differences between Python 2.6 and 3.3, pick ST3 - it is the future of Sublime, has a very large user base already, and will get you maximum exposure. If you haven't personally upgraded to ST3, now is the time to do so. If you are a registered user—which you should be :)—test with both the public beta and the latest dev build.
Finally, you can submit your pull request.
Be patient, it may take a little while for it to be reviewed, and it is not uncommon at all for changes to be requested. It is by following strict procedures that the community maintains the high quality of the packages available for users.

MS CRM Development Projects

The shop that I am working part time with is new to Microsoft CRM. I just want to survey what projects have developers done to the system to extend its capabilities.
I can break the work I did into four sections:
Tailoring - Simple field level changes. A lot of this is just making sure the fields and language suited the business I was developing for.
Customisation - More complex changes, generally needing JavaScript and maybe ASP.NET. Some examples would be to use an IFrame and pass values to it from a CRM form. The IFrame would then do interesting things like mapping, charting or give you buttons to do other things. For buttons I would often times use JavaScript to replace the outerHTML in the HTML dom of an IFRAME to show a button rather.
Integration - using .NET to connect MSCRM to other systems. Connected it to Great Plains, Speech Server, SCOM (was called MOM back then), custom LOB systems etc... One interesting one I did was to develop a SSIS component that wrote into MSCRM via the web services.
Reporting - Building reports. In reporting services and in Excel. Excel made for great dashboards because of the dynamic update nature of it.
I have a few (war) stories up at http://www.sadev.co.za/taxonomy/term/7 if you are interested.
I (and others) have implemented a LINQ query provider for the web service layer http://www.codeplex.com/LinqtoCRM.
I did some work with CRM 3.0. My work enhanced the program and turned it into a Document Management app, where you could scan and upload documents based on a case, contact, customer, vendor etc. The .NET SDK back then could have used a bit more work, but I hear with newer versions of CRM it has gotten better. CRM allows for attachments but not at all levels, more at the case level.
We extended 3.0 to send text messages rather than email. There are tools available (for 4.0 at least) to do that now, though.
We also extended it to push service appointments through to Exchange, as due to the workforce being mostly mobile they did not have the CRM client for Outlook.
Two other major areas of development not yet mentioned are plugins and custom workflow assemblies.
Plugins allow you to intercept many of the messages that CRM processes to insert custom logic. The possibilities this gives you are endless because you can intercept all kinds of messages including Create, Update, Delete, and even Read!
Custom workflow assemblies are assemblies that you register with CRM that integrate with CRM's workflow UI. Often times, they perform simple tasks that are useful when modifying form data. Other times, they are more complex like sending status reports.
Custom workflow assemblies are always listed beneath the native options. In the screenshot, everything below "Stop Workflow" was added via a custom workflow assembly.