This file contains hidden or 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
    
  
  
    
  | headers = ['SIS ID','Section name','Name','Start Date','Completed Date'] | |
| document_root = "#{Rails.root}" | |
| csv_file_name = "learners-report-2079-a.csv" | |
| csv_document = "#{document_root}/#{csv_file_name}" | |
| CSV.open(csv_document, "w") do |csv| | |
| csv << headers | |
| course = Course.find(2079) | |
| enrollments = Enrollment.where(course_id: 2079,workflow_state: ["inactive","active"]) | |
| modules = course.context_modules.active | 
  
    
      This file contains hidden or 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
    
  
  
    
  | email_otp_users = [] | |
| google_otp_users = [] | |
| no_login_users =[] | |
| account = Account.find(70) | |
| courses = account.courses | |
| course_ids = courses.collect(&:id) | |
| enrollments = Enrollment.where(course_id: course_ids,workflow_state: ["inactive","active"]) | |
| user_ids = enrollments.collect(&:user_id).uniq | |
| users = User.where(id: user_ids) | |
| users.each do |user| | 
  
    
      This file contains hidden or 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
    
  
  
    
  | in_submissions = [] | |
| canva_docs = Canvadoc.where("created_at >= ? and created_at <= ?",'2018-03-26','2018-04-16').find_in_batches() do |group| | |
| group.each do |canva_doc| | |
| submission = Submission.where(attachment_ids: canva_doc.attachment.id).first | |
| if submission.present? && submission.graded_at.present? | |
| in_submissions << submission | |
| puts "submission" | |
| else | |
| puts "no submission" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | otp_users = [] | |
| no_login_users =[] | |
| account = Account.find(70) | |
| courses = account.courses | |
| course_ids = courses.collect(&:id) | |
| enrollments = Enrollment.where(course_id: course_ids,workflow_state: ["inactive","active"]) | |
| user_ids = enrollments.collect(&:user_id).uniq | |
| users = User.where(id: user_ids) | |
| users.each do |user| | |
| if user.otp_communication_channel_id || user.otp_secret_key_salt | 
  
    
      This file contains hidden or 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
    
  
  
    
  | include StudentDashboardHelper | |
| headers = ['Batch name', 'ID', 'Student email', 'Progress state'] | |
| document_root = "#{Rails.root}" | |
| csv_file_name = "completed_batch_students.csv" | |
| csv_document = "#{document_root}/#{csv_file_name}" | |
| CSV.open(csv_document, "w") do |csv| | |
| csv << headers | |
| programs = Program.where(code: ['PGPBA-BI', 'PGP-BDML']) | |
| programs.each do |program| | |
| program_group_details = ProgramGroupDetail.where("program_id = ? and ends_at < ?", program.id, Date.today) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | sections_not_found = [] | |
| course_ids = [1910,1911,1912,1913,1914,1915,1916,1917,1919,1920,1923,1926,1929,1930,1933,1934,1937,1938,1939,1940,1941,1942,1944,1945,1947,1948,1949,1957,1959,1961,1965,1966,1967,1968,1971,1972,1973,1974,1977,1978,1979,1984,1986,1989,1990,1992,1993,1996,1997,1998,1999,2001,2003,2004,2006,2007,2011,2012,2017,2018,2019,2020,2023,2024,2025,2026,2028,2029,2072,2073,2478,2479,2481,2482,2483,2484,2485,2486,2487,2488,2489,3472,3473,3474,3475,3477,3478,3479,3480,3481,3482,3483,3484,3485,3487,3488,3563,3721,3722,5064,5065,5066,5067,5068,5069,5071,5072,5738,5739,7233,7234,7235,7236,7330,7336,7337,7340,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7368,7369,7371,8105,11068,11070,11071,11072,11074,11075,11076,11077,11078,11080,11081,11082,11083,11084,11085,11086,11087,11088,11089,11090,11091,11092,11093,11375,11858,11859,11860,11861,11862,11863,11864,11865,11866,11867,11868,11869,11870,11871,11872,11873,11874,11875,11876,118 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | echo "checking for log4j vulnerability..." | |
| OUTPUT="$(locate log4j|grep -v log4js)" | |
| if [ "$OUTPUT" ]; then | |
| echo "[WARNING] maybe vulnerable, those files contain the name:" | |
| echo "$OUTPUT" | |
| fi | |
| OUTPUT="$(dpkg -l|grep log4j|grep -v log4js)" | |
| if [ "$OUTPUT" ]; then | |
| echo "[WARNING] maybe vulnerable, dpkg installed packages:" | |
| echo "$OUTPUT" | 
OlderNewer