Skip to content

Author: Anshu

PowerSchool – Getting Parents Username and Email from Access Accounts

With the above code, I have limited the result to only mother and father.

To add more into the result here is the list of relationship type ID in powerschool, you will need to edit line number 39 and add more relationship type ID’s.

 

Javascript – Capture Multiple Form Changes

On page load we can use a JavaScript function to capture the data in the forms – this can be done quite simply with jQuery’s serializeArray()

This assumes each form has a unique id – if your forms don’t have id’s we can modify the code to give the form an id.

Now you can do the following

 

Getting PowerSchool Access Token

PHP code to get PowerSchool access token:

jQuery code to get PowerSchool access token:

Client ID and Client Secret is available under “Data Provider Configuration” inside the plugin settings.

Search for string in php files (Including subdirectories)

While working on freelancing project, I was told to include a search functionality which would search all php file in a directory including its sub-directories. I used the file_get_contents function of PHP in this following way.

 

Room Availability Check According to Time

Table Structure:

conference_hall_floor
date
timefrom
timeto
username

Code to check the availability and show the status through message box

 

Apply theme throughout the network

Recently while working on a project, I was told to apply Twenty Eleven on all the sites in a wordpress network. Instead of hardcoding it, I made a plugin where you could select the theme you want to apply. This is just a one page plugin.

First I made a function which would add the page in the network admin section. This would call another function anshu_apply_theme_settings_form

aes_apply_theme_settings_form function

and the final code of my wordpress plugin was