rahools

Result Software Promo Logic Code

Sep 27th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 KB | None | 0 0
  1. sem track // Get From 'semtrack' Table
  2. current session // Get From 'semtrack' Table
  3. start session // Get From 'semtrack' Table
  4. number of fails // Get From 'nofs' Table | corrosponding to lastest sem in 'sem track'
  5. failed sem // Get From 'nofs' Table | array returning subject in which failed
  6. current group // Get From 'stgrp' Table | corrosponding to lastest sem in 'sem track'
  7. exam registration // Get From 'exam_registration'
  8.  
  9. // No Exam Registration
  10. if (exam registration == False){
  11. sem track += blank // comma seperated
  12. }
  13.  
  14. // [AB] Group Cases
  15. if ( current group == [AB] ) {
  16.  
  17. // No Backs
  18. if ( number of fails == 0 ) {
  19. // Promote to next sem
  20. sem track += sem track[-1]++ // Comma Seperated | Serially Increase 'sem track' | Example : 1, 2, 3, 4
  21. }
  22.  
  23. // Atleast 1 back and less than 6
  24. if ( number of fails > 0 and number of fails < 6) {
  25. sem track += failed sem + sem track[-1]++ // Comma Seperated | Serially Increase 'sem track' and add failed sem | Example : 1, 2, 23, 34
  26. }
  27.  
  28. // Gets more than 6 Backs
  29. // Change group to [BA], only if next session is Odd
  30. if ( number of fails >= 6 && current session == even ) {
  31. current group = [BA]
  32.  
  33. if (failed sem != 0) {
  34. sem track += failed sem + sem track[-1] // Comma Seperated | lastest sem reapeated in 'sem tack' | Example : 1, 2, 23, 234, 24
  35. }
  36. else {
  37. sem track += sem track[-1] // Comma Seperated | lastest sem reapeated in 'sem tack' | Example : 1, 2, 3, 4, 4
  38. }
  39.  
  40. }
  41. }
  42.  
  43. // [BA] Group Cases
  44. else if ( current group == [BA] ) {
  45.  
  46. // Backs reduced to less than 6
  47. if ( number of fails < 6 ) {
  48. // Calculate if student was [AB], his next theoritical sem
  49. theoritical sem = length( sem track ) + 1
  50.  
  51. // Promote to next Sem with Same Batch if current session was Odd
  52. if ( current session == odd ) {
  53. if (failed sem != 0) {
  54. sem track += failed sem + theoritical sem // (theoritical sem ) gives same Batch's session | Example : 1, 2, 23, 24, 24, 46
  55. }
  56. else {
  57. sem track += theoritical sem // (theoritical sem ) gives same Batch's session | Example : 1, 2, 3, 4, 4, 6
  58. }
  59. }
  60. // Promote to next Sem with Jr Batch if current session was Even
  61. if ( current session == even ) {
  62. if (failed sem != 0) {
  63. sem track += theoritical sem - 2 // (theoritical sem - 2) gives Jr Batch's session | Example : 1, 2 3, 34, 34, 46, 45
  64. }
  65. else {
  66. sem track += theoritical sem - 2 // (theoritical sem - 2) gives Jr Batch's session | Example : 1, 2 3, 4, 4, 6, 5
  67. }
  68.  
  69. }
  70. }
  71.  
  72. // Backs Not Cleared
  73. // Change group to [YB], only if next session is Odd
  74. if ( number of fails >= 6 && current session == even ) {
  75. if (failed sem != 0) {
  76.  
  77. }
  78. else {
  79.  
  80. }
  81. current group = [YB]
  82. sem track += sem track[-1] // lastest sem reapeated in 'sem tack' | Example : 12 34 44
  83. }
  84. }
  85.  
  86. // [YB] Group Cases
  87. else if ( current group == [YB] ) {
  88.  
  89. // Backs reduced to less than 6
  90. if ( number of fails < 6 ) {
  91. // Calculate if student was [AB], his theoritical sem
  92. theoritical sem = length( sem track ) + 1
  93.  
  94. // Promote to next Sem with Jr Batch
  95. sem track += theoritical sem - 2 // (theoritical sem - 2) gives Jr Batch's session | Example : 12 34 44 5
  96. }
  97.  
  98. // Backs Not Cleared
  99. // Change group to [BA], only if next session is Odd
  100. if ( number of fails >= 6 && current session == even ) {
  101.  
  102. // figuring out how to futher update
  103. // use of multiplier flag ??? | Would require additional col
  104. // semtrack pattern detection ??? | Would require additional logics
  105.  
  106. }
  107. }
  108.  
  109. /////////////////////////////////
  110.  
  111. Questions
  112. > Can odd sems be registered at even sem ? What about 1st year and rest ?
Add Comment
Please, Sign In to add comment