Created
September 29, 2017 11:42
-
-
Save radiokills/5fc3cf613c6e6406683192462a6d14c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# report 1: student orentation status | |
m1 = Course.find(302).context_modules[0].context_module_progressions.where(workflow_state: 'completed').pluck :user_id | |
m2 = Course.find(302).context_modules[1].context_module_progressions.where(workflow_state: 'completed').pluck :user_id | |
m3 = Course.find(302).context_modules[2].context_module_progressions.where(workflow_state: 'completed').pluck :user_id | |
students = Course.find(302).enrollments.where(type: 'StudentEnrollment').map{|e| [e.user.id, e.user.name, e.user.email]} | |
progress = students.map{|s| s + [m1.include?(s[0]).to_s, m2.include?(s[0]).to_s, m3.include?(s[0]).to_s] } | |
# report 2: sbc orientation status | |
m1 = Course.find(258).context_modules[0].context_module_progressions.where(workflow_state: 'completed').pluck :user_id | |
sbc_ids = [56,72,964,1021,1035,1148,1150,1312,1333,1341,1536,1624,1689,1694,1878,2045,2259,2392,2402,2342,2611,2828,2861,2873,2874,2914,2921,2923,2927,3029,3326,3555,3852,3891,4000,3955,4101,4108,4162,4191,4211,4224,4126,4275,4329,4412,4604,4701,5134,5474,5486,5794,5804,5806,6409,6416,6512,6512,6655,6685,6729,7001,7048,7270,7298,7300,7302,7330,7382,7419,7440,7524,7548,7571,7620,7725,7899,7932,8024,8025,8171,8200,8242,8249,8250,8251,8312,8314,8330,8331,8421,8441,8452,8511,8604,8682,8706,8855,8935,9196,9274,9280,9354,9386,9387,9388,9389,9394,9286,9327,9436,9473,9496,9500,9521,9537,9539,1944,665,1106,3385,124,3509,2947,137,5422,121,1628,105,588,1094,1702,5586,62,5605,2965,2909,2890,1927,1583,1127,3037,5831,3671,5505,1654,1919,127,3965,5607,5424,68,3021,1569,3587,2931,3888,4314,1120,89,5588,3684,88,3564,5817,4975,3760,503,1029,2981,5047,4287,76,2867,3557,5356,2985,2506,5283,54,2572,5577,2956,2906,2906,1186,5960,5142,6432,5608,3913,3395,3792,1326,1597,4040,4427,2857,553,3695,948,3835,1350,1209,122,1076,69,1320,1100,130,2959,1618,4955,1541,4049,91,91,5829,5423,874,178,131,854,5250,3950,3719,1039,5371,2879,5614,45,158,4352,1108,1136,4139,1952,3851,1058,3495,7246,4558,5818,1378,1140,81,1449,3345,6836,5815,1314,3765,1348,7004,7538,1306,4566,1130,4348,1151,5777,1020,1330,7734,65,1176,442,256,1475,1379,4077,7837,8313,6835,7266,7272,2436,97,2899,4100,7526,1112,7651,2883,4248,3518,132,7472,2364,7769,1128,1141,1565,2833,2649,1592,8026,7265,8177,610,3663,7121,1587,1138,3686,2958,3375,3375,2888,649,7338,7472,84,3574,134,7606,4294,6837,129,2865,2229,7837,5594,5392,5779,2933,3832,275,8795,3674,2941,6415,1332,4350,1380,570,7289,3489,1733,67,8691,107,8243,133,7280,7004,3547,7429,3890,152,7396,5013,1336,6895,7332,8790,2920,7104,8559,4700,6716,7840,1113,5735,99,3899,5369,9217,4086,1121,2999,1344,1490,6893,1657,3198,4076,3661,6676,49,1038,7667,939,8708,7355,5421,2953,4127,128,2964,2924,118,1342,7547,6894,4353,95,2940,541,1192,5609,5391,6535,2945,3059,1443,7045,8371,9281,1119,7619,7655,6902,7607,9162,381,8921,7322,7202,1656,1437,2581,125,7399,7399,8449,9253,4259,1047,7760,3911,63,1349,8803,93,1149,4233,1088,55,7668,1613,7931,8810,7573,7461,1976,1147,5848,7759,6977,8219,1972,6231,6435,8422,7666,9395,8707,7203,8621,6855,4269,8876,1173,1144,6511,2275,7395,7193,2903,6505,6501,7333,6639,9260,3552,3239,2502,1489,1280,7144,952,6639,2086,6936,8966,5538,2938,7299,1419,9435,7394,2957,9279,8499,7707,1111,732,5618,9320,241,8307,3798,4546,2469,7305,7271,2954,1292,1160,115,7299,8794,8329,6671,8082,267,9517,4339,7118,8503,7384,2912,1376,1201,8180,103,8274,5133,8789,2308,7724,1202,1545,8234,3836,7099,7450,6824,8153,8276,4331,4123,7550,2930,7420,7117,8791,2448,1137,138,7196,59,7340,1171,7190,6693,447,8905,2942,3346,8443,1070,9210,1064,7985,597,7262,77,2976,7656,7162,8270,7183,1177,6761,5372,3329,8328,7773,8875,75,7814,8606,9335,4286,4596,8608,85,438,1126,7492,671,9477,5537,64,1183,7226,7383,6533,8423,8117,2843,2934] | |
students = User.where(id: sbc_ids).map{|u| [u.id, u.name, u.email]} | |
progress = students.map{|s| s + [m1.include?(s[0]).to_s] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment