Skip to content

Instantly share code, notes, and snippets.

View normansolutions's full-sized avatar

Clive Norman normansolutions

View GitHub Profile
// 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);
@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>
@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 ,
var mobile = $('#home_template').hasClass('mobile');
if (!mobile) {
var iPadAgent = navigator.userAgent.match(/iPad/i) === null;
var iPodAgent = navigator.userAgent.match(/iPhone/i) === null;
var AndroidAgent = navigator.userAgent.match(/Android/i) === null;
var webOSAgent = navigator.userAgent.match(/webOS/i) === null;
var hasFlash = false;
if (iPadAgent && iPodAgent && AndroidAgent && webOSAgent) {
<link rel="stylesheet" href="@CacheBust.FingerPrint("/css/mainStyle.css")" />
<link rel="shortcut icon" href="@CacheBust.FingerPrint("/favicon.ico")" type="image/x-icon" />
<script src="@CacheBust.FingerPrint("/scripts/mainScripts.js")"></script>
<rules>
<rule name="fingerprint" stopProcessing="true">
<match url="(.*)(v-[0-9]+/)([\S]+)"/>
<action type="Rewrite" url="{R:1}/{R:3}"/>
</rule>
</rules>
public static string FingerPrint(string rootRelativePath, string cdnPath = "")
{
if (!string.IsNullOrEmpty(cdnPath) && !HttpContext.Current.IsDebuggingEnabled)
{
return cdnPath;
}
if (HttpRuntime.Cache[rootRelativePath] == null)
{
string relative = VirtualPathUtility.ToAbsolute("~" + rootRelativePath);
string absolute = HostingEnvironment.MapPath(relative);
//Colour Lightening 10%
$blueLighten10:lighten( $blue, 10% );
$redLighten10:lighten( $red, 10% );
$greenLighten10:lighten( $green, 10% );
//Colour Darkening 10%
$blueDarkening10:darken( $blue, 10% );
$redDarkening10:darken( $red, 10% );
$greenDarkening10:darken( $green, 10% );
#cookie-bar .cb-enable {
background: $greenDarkening10;
}
#cookie-bar .cb-enable:hover {
background: $green;
}
#cookie-bar .cb-disable {
background: $red;
CREATE VIEW DBA_RandSView
AS
SELECT TOP (100) PERCENT Sanctions.Sanction
,Pupil.Pu_Surname
,Pupil.Pu_GivenName
,Years.YearDesc
,PupSanction.PupSanDate
,PupSanction.PupSanCount
,PupSanction.PupNewNote
,Staff.UserName