Skip to content

Instantly share code, notes, and snippets.

View normansolutions's full-sized avatar

Clive Norman normansolutions

View GitHub Profile
@normansolutions
normansolutions / BMILoss.sql
Last active August 29, 2015 14:07
Query for establishing BMI weight loss in iSAMS MIS - compares last two measurements per student and selects where latest is less than previous, displaying total loss and days between. Ideally to be used as base for SSRS Report.
IF OBJECT_ID( 'tempdb..#TempBMI'
)IS NOT NULL
BEGIN
DROP TABLE #tempbmi;
END;
WITH cte
AS ( SELECT txtschoolid ,
txtbmidate ,
intweight ,
@normansolutions
normansolutions / isams-tutorial-groups-mis.config
Created October 21, 2014 15:07
Config file for displaying iSAMS Tutorial Groups in Firefly VLE
<?xml version="1.0" encoding="UTF-8"?>
<database name="YourDBName" friendlyName="iSAMS Tutorial Groups">
<querySets>
<!-- ## tutorial groups relationships ## -->
<querySet guidPrefix="Tutorial">
<!-- Return a list of groups for the specified member guid -->
<groupLists>
<groupList namePrefix="Tutorial Group ">
<query>
// Add this snippet to the ProcessForm() function in the reportingServicesReportSelection.asp
// located in "iSAMS\iSAMS.Framework\modules\StudentManagement\current"
//Get userName
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1);
<!--Add this line to the form with id="form1" in the reportingServicesReportSelection.asp
located in "iSAMS\iSAMS.Framework\modules\StudentManagement\current" -->
<input type="hidden" name="userName" id="userName" value="" />
#################################################
$smtpServer="Your SMTP Server"
$from = "Your From Email Address"
$emailaddress = "Your Send To Email Addressk"
$subject = "The reportingServicesReportSelection.asp file has changed"
$body = "The reportingServicesReportSelection.asp file has changed, you need to re-add the script"
$strReference = "Your Path To An Original Copy Of The File"
$strDifference = "Your Path To a Deployed Copy Of The File"
#################################################
@normansolutions
normansolutions / FFAnimationLoad.html
Created December 3, 2014 09:30
For use on blog post..
<!--Place the below code snippet just before the closing body tag
in the 'YourFFInstallation\Templates\YourTemplateFolder\defaul.xsl' file.-->
<!--Load Velocity.js - either from CDN (as below) or your preferred location (local etc).-->
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.1.0/velocity.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.1.0/velocity.ui.min.js"></script>
<script>
$(window).load(function () {
var images = $(".STMmenuBar a img ");
images.velocity("transition.flipYIn ", {
@normansolutions
normansolutions / FFAnimationHTML.html
Created December 3, 2014 09:32
For use on blog post..
<style>
.STMmenuBar {
min-height: 64px;
display: inline-block;
}
.STMmenuBar img {
display: none;
padding: 3px;
border: 1px solid black;
// How many hours to summarize
var hours = 1400;
// User to summarize
var user = "Ipad";
var users = db.user.find({
"hostname": new RegExp(user)
});
for (var j = 0; j < users.length(); j++) {
var user = users[j];
@normansolutions
normansolutions / DisplayiSAMSSchoolIDAsColumns.sql
Created December 12, 2014 10:41
Display iSAMS txtSchoolID as columns
DECLARE @FormName VARCHAR( 100 );
SET @FormName = 'Your Form Name';
DECLARE @Xmldata XML = (SELECT txtschoolid
FROM tblpupilmanagementpupils
WHERE intsystemstatus = '1'
AND txtform = @FormName
FOR xml path( '' ));
@normansolutions
normansolutions / CreateiSAMSPercentageDropDowns.ps1
Last active August 29, 2015 14:11
PowerShell to create iSAMS percentage drop-down lists for academic reports/work marks
$loop = '';
$print = '';
for ($loop = 0; $loop -le 100; $loop++)
{
$print += [string]$loop + '%@';
}
$print