|
/* MODE OF ATTENDANCE. /*Uses Current Year Guided Learning Hours to determine a learners mode of attendance.
*/Compute new variables that copy across the Learning actual end date, Learning planned end date and Learning start date. */ Where the actual or planned end dates are after the end of the current academic year 31/07 is used in the calculation. */ Where the start date is before the start of the current academic year, 01/08 is used in the calculation. comp A31_1=A31. comp A28_1=A28. comp A27_1=A27. if A31>DATE.DMY(31,7,current academic year+1) A31_1=DATE.DMY(31,7,current academic year+1). if A28>DATE.DMY(31,7,current academic year+1) A28_1=DATE.DMY(31,7,current academic year+1). if A27<DATE.DMY(1,8,current academic year) A27_1=DATE.DMY(1,8,current academic year).
*/Only incude those where staus for inclusion of aim is ‘include’. DO IF A_ACTIVE=1.
*/ When the learning actual end date is not missing the total actual days are used (TOTACT). */If the Learning actual end date is not missing. */if the end date falls within Period 1 then Set ACTPER1 = Difference in days between the start and the actual end date divided by the Total Actual Days of the whole course multiplied by the Actual In Year Guided Learning Hours. */Repeat calculation for periods 2 and 3. */If the Learning actual end date is missing the same calculations as above are performed but the planned end date and total expected days are used (TOTEXP). DO IF NOT MISSING(A31).
DO IF RANGE(A31_1, DATE.DMY(1,8,current academic year), DATE.DMY(31,12,current academic year)). COMP ActPer1=(MAX((DATEDIFF(A31_1,A27_1,"days")+1),0)/totact)*A_InYr_Actual_GLH. ELSE IF RANGE(A31_1, DATE.DMY(1,1,current academic year+1), DATE.DMY(31,3,current academic year+1)). COMP ActPer2=(MAX(MIN((DATEDIFF(A31_1,A27_1,"days")+1),(DATEDIFF(A31_1,DATE.DMY(1,1,current academic year+1),"days")+1)),0)/totact)*A_InYr_Actual_GLH. ELSE IF RANGE(A31_1, DATE.DMY(1,4,current academic year+1), DATE.DMY(31,7,current academic year+1)). COMP ActPer3=(MAX(MIN((DATEDIFF(A31_1, A27_1, "days")+1), (DATEDIFF(A31_1, DATE.DMY(1,4,current academic year+1), "days")+1)),0)/totact)*A_InYr_Actual_GLH. END IF. ELSE. DO IF RANGE(A28_1, DATE.DMY(1,8,current academic year), DATE.DMY(31,12,current academic year)). COMP ActPer1=((MAX((DATEDIFF(A28_1,A27_1,"days")+1),0))/totexp)*A_InYr_Expected_GLH. ELSE IF RANGE(A28_1, DATE.DMY(1,1,current academic year+1), DATE.DMY(31,3,current academic year+1)). COMP ActPer2=(MAX(MIN((DATEDIFF(A28_1,A27_1,"days")+1),(DATEDIFF(A28_1,DATE.DMY(1,1,current academic year+1),"days")+1)),0)/totexp)*A_InYr_Expected_GLH. ELSE IF RANGE(A28_1, DATE.DMY(1,4,current academic year+1), DATE.DMY(31,7,current academic year+1)). COMP ActPer3=(MAX(MIN((DATEDIFF(A28_1,A27_1,"days")+1),(DATEDIFF(A28_1,DATE.DMY(1,4,current academic year+1),"days")+1)),0)/totexp)*A_InYr_Expected_GLH. END IF. END IF. END IF.
*/New variable showing those aims that have been completed. comp A_COMPLETE=(A34=2).
/* Create a temporary variable tempmode, and if the main delivery method is set to open learning, the value is set to to 3, /* if the delivery method is set to distance learning it is assigned the value 3, /* if neither of these conditions are relevant and the delivery mode is set to evening only the value is set to 1.
COMPUTE A_TEMPMODE=0.
DO IF A_ACTIVE=1. DO IF A18=2. COMPUTE A_TEMPMODE=3. ELSE IF A18=3. COMPUTE A_TEMPMODE=2. ELSE IF A17=2. COMPUTE A_TEMPMODE=1. END IF. END IF.
SELECT IF A_ACTIVE=1. AGGREGATE OUT * OVER=YES /BREAK=L01 L03 /L_InYr_Actual_GLH=sum(A_InYr_Actual_GLH) /L_InYr_Expected_GLH=sum(A_InYr_Expected_GLH) /L_ACTIVE=max(A_ACTIVE) /L_ACTPER1=SUM(ACTPER1) /L_ACTPER2=SUM(ACTPER2) /L_ACTPER3=SUM(ACTPER3) /L_A27_1=MAX(A27_1) /L_A28_1=MAX(A28_1) /L_A31_1=MAX(A31_1) /L_COMPLETE=sum(A_COMPLETE) /N=sum(A_ACTIVE) /L_TEMPMODE=max(A_TEMPMODE).
/* A new variable L_MODE_B is created with the default value -1. COMPUTE L_MODE_B=-1.
*/Only incude active learners. DO IF L_ACTIVE=1.
/* Assign a value of 3 to all learners who are active COMPUTE L_MODE_B=3.
*/If learner has completed aims and the difference between the Leaners maximum start and actual end dates is for more than 16 GLH per week then the mode of attendance is full time part year. DO IF L_COMPLETE=n. IF L_InYr_Actual_GLH/(DATEDIFF(L_A31_1, L_A27_1, "Weeks")+1)>16 L_MODE_B=2. END IF.
*/If for the learner the difference between the Leaners maximum start and expected end dates is more than 16 glh per week then the mode of attendance is full time part year. IF L_InYr_Expected_GLH/(DATEDIFF(L_A28_1, L_A27_1, "Weeks")+1)>16 L_MODE_B=2.
*/If a learners is undertaking 150 plus GLH in any period then the mode of attendance is full time part year. IF L_ACTPER1>150 OR L_ACTPER2>150 OR L_ACTPER3>150 L_MODE_B=2.
*/Adjustment to learners If the Mode of attendance is set to ‘Part-time - other including e-learning’ and any of the following are true */If Main delivery method is ‘Open Learning’, Mode of attendance equals ‘Part-time – Open’. */If Main delivery method is ‘distance learning (other than e-learning)’, Mode of attendance equals 'Part-time - distance learning'. */If delivery mode is ‘continuous delivery – evening only’, Mode of attendance equals 'Part-time - evening'. DO IF (L_MODE_B)=3. DO IF (L_TEMPMODE =3). COMPUTE L_MODE_B=4. ELSE IF (L_TEMPMODE =2). COMPUTE L_MODE_B=5. ELSE IF (L_TEMPMODE =1). COMPUTE L_MODE_B=6. END IF. END IF.
*/Where Learner level Expected or Actual CYGLH is greater than or equal to 450, Mode of attendance is Full-time full year. IF L_InYr_Expected_GLH GE 450 L_MODE_B=1. IF L_InYr_Actual_GLH GE 450 L_MODE_B=1.
END IF.
IF L_ACTIVE=-L_MODE_B=-1 RECODE L_MODE_B(SYSMIS=-1)
VARIABLE LABELS L_MODE_B ' L_MODE_B Learners mode of attendance'.
VALUE LABELS L_MODE_B -1 'Not Applicable/Not Known 1 'Full-time full-year' 2 'Full-time part-year' 3 'Part-time - other including e-learning' 4 'Part-time - open' 5 'Part-time - distance learning' 6 'Part-time - evening'. |