gestion 1.9.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +48 -0
  3. data/.project +14 -0
  4. data/Binaries/adduser_to_buzz +15 -0
  5. data/Binaries/backup +7 -0
  6. data/Binaries/check_gestion +8 -0
  7. data/Binaries/gestion.gnumail +22 -0
  8. data/Binaries/gestion.logrotate +34 -0
  9. data/Binaries/gestion.service +12 -0
  10. data/Binaries/gestion_update.rb +183 -0
  11. data/Binaries/gestion_update.service +10 -0
  12. data/Binaries/get_compta +11 -0
  13. data/Binaries/kill_gestion +16 -0
  14. data/Binaries/ldap/add_indexes +51 -0
  15. data/Binaries/ldap/backup +2 -0
  16. data/Binaries/ldap/install_ldap +92 -0
  17. data/Binaries/ldap/restore +7 -0
  18. data/Binaries/lib_backup +5 -0
  19. data/Binaries/log_scan_errors +8 -0
  20. data/Binaries/loop_gestion +64 -0
  21. data/Binaries/onetimers/sync_courses_from_compta.rb +74 -0
  22. data/Binaries/onetimers/transfer_cash_from_ldap_to_csv +26 -0
  23. data/Binaries/reboot +5 -0
  24. data/Binaries/restore +3 -0
  25. data/Binaries/restore_do +22 -0
  26. data/Binaries/sort_events +31 -0
  27. data/Binaries/start_gestion +18 -0
  28. data/Binaries/swipe_gestion +18 -0
  29. data/Binaries/update_africompta +21 -0
  30. data/Binaries/update_users +3 -0
  31. data/Diplomas.src/accredited.odg +0 -0
  32. data/Diplomas.src/diploma.odg +0 -0
  33. data/Diplomas.src/label.odg +0 -0
  34. data/Diplomas.src/presence_sheet.ods +0 -0
  35. data/Diplomas.src/presence_sheet_small.ods +0 -0
  36. data/Diplomas.src/student_card.odg +0 -0
  37. data/Doc/130514-it-ideas.odt +0 -0
  38. data/Doc/Compta-cash.mm +179 -0
  39. data/Doc/General.odt +0 -0
  40. data/Entities/AccessGroups.rb +117 -0
  41. data/Entities/Activity.rb +178 -0
  42. data/Entities/ChatMsg.rb +142 -0
  43. data/Entities/Classroom.rb +11 -0
  44. data/Entities/Client.rb +19 -0
  45. data/Entities/Computer.rb +21 -0
  46. data/Entities/ConfigBase.rb +280 -0
  47. data/Entities/Course.rb +1588 -0
  48. data/Entities/CourseType.rb +171 -0
  49. data/Entities/DFiles.rb +466 -0
  50. data/Entities/FilesManage.rb +226 -0
  51. data/Entities/Grade.rb +186 -0
  52. data/Entities/Internet.rb +300 -0
  53. data/Entities/Netdev.rb +10 -0
  54. data/Entities/Person.rb +1175 -0
  55. data/Entities/Plug.rb +98 -0
  56. data/Entities/Quiz.rb +33 -0
  57. data/Entities/Recharges.rb +37 -0
  58. data/Entities/Report.rb +136 -0
  59. data/Entities/Room.rb +12 -0
  60. data/Entities/SMS.rb +30 -0
  61. data/Entities/ScheduleType.rb +33 -0
  62. data/Entities/Share.rb +120 -0
  63. data/Entities/Task.rb +51 -0
  64. data/Entities/Ticket.rb +72 -0
  65. data/Entities/Usage.rb +143 -0
  66. data/Entities/Worker.rb +29 -0
  67. data/Files/apache-profeda.conf +36 -0
  68. data/Files/label.erb +121 -0
  69. data/Files/label_notfound.erb +64 -0
  70. data/Files/label_notpassed.erb +84 -0
  71. data/Files/mobileinfo.erb +115 -0
  72. data/Files/smb.conf +333 -0
  73. data/Files/timetable.html +36 -0
  74. data/Files/timetable.js +239 -0
  75. data/Gemfile +12 -0
  76. data/Gemfile.dev +12 -0
  77. data/Gemfile.dev.lock +127 -0
  78. data/Gemfile.lock +127 -0
  79. data/Gemfile.prod +8 -0
  80. data/Gestion +35 -0
  81. data/Gestion.rb +220 -0
  82. data/INSTALL +40 -0
  83. data/Images/connection.xcf +0 -0
  84. data/Images/connection_no.png +0 -0
  85. data/Images/connection_wait.png +0 -0
  86. data/Images/connection_yes.png +0 -0
  87. data/Paths/Exas.rb +13 -0
  88. data/Paths/Files.rb +19 -0
  89. data/Paths/GetDiplomas.rb +20 -0
  90. data/Paths/Info.rb +114 -0
  91. data/Paths/Label.rb +187 -0
  92. data/Paths/MobileInfo.rb +19 -0
  93. data/Paths/internetCash.rb +34 -0
  94. data/Paths/internetWifi.rb +54 -0
  95. data/README.md +60 -0
  96. data/Rakefile +13 -0
  97. data/TODO +1391 -0
  98. data/Test/.gitignore +3 -0
  99. data/Test/Diplomas/base_gestion.odt +0 -0
  100. data/Test/Diplomas/base_report.odt +0 -0
  101. data/Test/Diplomas/carte_etudiant.odg +0 -0
  102. data/Test/Diplomas/exam_language.odt +0 -0
  103. data/Test/Diplomas/label.odg +0 -0
  104. data/Test/Diplomas/presence_sheet.ods +0 -0
  105. data/Test/Diplomas/presence_sheet_small.ods +0 -0
  106. data/Test/Diplomas/student_card.odg +0 -0
  107. data/Test/Manual/testMerge +18 -0
  108. data/Test/config_test.yaml +26 -0
  109. data/Test/db.testGestion +0 -0
  110. data/Test/dfiles/descs/avg-rescue.desc +10 -0
  111. data/Test/dfiles/descs/avg.desc +8 -0
  112. data/Test/dfiles/descs/driver.desc +8 -0
  113. data/Test/dfiles/descs/linuxmint.desc +7 -0
  114. data/Test/dfiles/files/avg-160203.exe +1 -0
  115. data/Test/dfiles/files/avg.iso +1 -0
  116. data/Test/dfiles/files/driver.exe +1 -0
  117. data/Test/dfiles/index_post.html +3 -0
  118. data/Test/dfiles/index_pre.html +8 -0
  119. data/Test/dfiles/priorities +5 -0
  120. data/Test/ge_activity.rb +124 -0
  121. data/Test/ge_chat.rb +106 -0
  122. data/Test/ge_compta.rb +67 -0
  123. data/Test/ge_configbase.rb +54 -0
  124. data/Test/ge_course.rb +1114 -0
  125. data/Test/ge_dfiles.rb +121 -0
  126. data/Test/ge_filesmanage.rb +180 -0
  127. data/Test/ge_info.rb +27 -0
  128. data/Test/ge_internet.rb +246 -0
  129. data/Test/ge_login.rb +55 -0
  130. data/Test/ge_person.rb +373 -0
  131. data/Test/ge_qvinfo.rb +28 -0
  132. data/Test/ge_report.rb +97 -0
  133. data/Test/ge_share.rb +27 -0
  134. data/Test/ge_sms.rb +34 -0
  135. data/Test/ge_tasks.rb +19 -0
  136. data/Test/ge_usage.rb +168 -0
  137. data/Test/ge_view.rb +46 -0
  138. data/Test/multiconf-captive +29 -0
  139. data/Test/test.conf +7 -0
  140. data/Test/test.rb +49 -0
  141. data/Test/test_bytes.png +0 -0
  142. data/VERSION +140 -0
  143. data/Views/Admin/Backup.rb +91 -0
  144. data/Views/Admin/Configuration.rb +44 -0
  145. data/Views/Admin/Credit.rb +32 -0
  146. data/Views/Admin/FilesManage.rb +219 -0
  147. data/Views/Admin/Function.rb +39 -0
  148. data/Views/Admin/Power.rb +49 -0
  149. data/Views/Admin/Printer.rb +37 -0
  150. data/Views/Admin/Server.rb +252 -0
  151. data/Views/Admin/Tabs.rb +5 -0
  152. data/Views/Admin/Update.rb +73 -0
  153. data/Views/Admin/UpdateSystem.rb +26 -0
  154. data/Views/Cashbox/Activity.rb +191 -0
  155. data/Views/Cashbox/Course.rb +141 -0
  156. data/Views/Cashbox/Credit.rb +79 -0
  157. data/Views/Cashbox/Report.rb +115 -0
  158. data/Views/Cashbox/Service.rb +105 -0
  159. data/Views/Cashbox/Tabs.rb +10 -0
  160. data/Views/Compta/Accounts.rb +36 -0
  161. data/Views/Compta/Course.rb +96 -0
  162. data/Views/Compta/Show.rb +6 -0
  163. data/Views/Compta/Transfer.rb +66 -0
  164. data/Views/Course/Diploma.rb +203 -0
  165. data/Views/Course/Grade.rb +401 -0
  166. data/Views/Course/Modify.rb +447 -0
  167. data/Views/Course/Print.rb +94 -0
  168. data/Views/Course/Responsible.rb +44 -0
  169. data/Views/Course/Stats.rb +76 -0
  170. data/Views/Course/Students.rb +92 -0
  171. data/Views/Course/Tabs.rb +220 -0
  172. data/Views/Internet/Access.rb +134 -0
  173. data/Views/Internet/ClassEdit.rb +24 -0
  174. data/Views/Internet/ClassUsers.rb +81 -0
  175. data/Views/Internet/Config.rb +32 -0
  176. data/Views/Internet/Mobile.rb +213 -0
  177. data/Views/Internet/Recharges.rb +49 -0
  178. data/Views/Internet/Tabs.rb +6 -0
  179. data/Views/Inventory/Computer.rb +24 -0
  180. data/Views/Inventory/Room.rb +18 -0
  181. data/Views/Inventory/Tabs.rb +9 -0
  182. data/Views/Inventory/TicketClosed.rb +7 -0
  183. data/Views/Inventory/TicketOpen.rb +23 -0
  184. data/Views/Library/Person.rb +36 -0
  185. data/Views/Library/Tabs.rb +7 -0
  186. data/Views/Network/Block.rb +87 -0
  187. data/Views/Network/Netdevs.rb +21 -0
  188. data/Views/Network/Restriction.rb +37 -0
  189. data/Views/Network/Share.rb +167 -0
  190. data/Views/Network/Tables.rb +28 -0
  191. data/Views/Network/Tabs.rb +6 -0
  192. data/Views/Person/Admin.rb +99 -0
  193. data/Views/Person/Center.rb +48 -0
  194. data/Views/Person/Course.rb +72 -0
  195. data/Views/Person/Modify.rb +153 -0
  196. data/Views/Person/Tabs.rb +162 -0
  197. data/Views/Report/ComptaExecutive.rb +221 -0
  198. data/Views/Report/ComptaFlat.rb +79 -0
  199. data/Views/Report/ReportCourse.rb +47 -0
  200. data/Views/Report/Tabs.rb +8 -0
  201. data/Views/Report/Usage.rb +52 -0
  202. data/Views/Report/UsageCases.rb +59 -0
  203. data/Views/Self/Cash.rb +67 -0
  204. data/Views/Self/Chat.rb +55 -0
  205. data/Views/Self/Concours.rb +109 -0
  206. data/Views/Self/Email.rb +34 -0
  207. data/Views/Self/Internet.rb +255 -0
  208. data/Views/Self/Results.rb +17 -0
  209. data/Views/Self/Services.rb +85 -0
  210. data/Views/Self/Show.rb +47 -0
  211. data/Views/Self/Tabs.rb +5 -0
  212. data/Views/Special/DFileEdit.rb +13 -0
  213. data/Views/Special/PlugEdit.rb +56 -0
  214. data/Views/Special/Tabs.rb +6 -0
  215. data/Views/Special/Vnc.rb +39 -0
  216. data/Views/Task/Client.rb +21 -0
  217. data/Views/Task/Edit.rb +33 -0
  218. data/Views/Task/List.rb +55 -0
  219. data/Views/Task/Tabs.rb +9 -0
  220. data/Views/Task/Worker.rb +30 -0
  221. data/Views/Template/Activity.rb +33 -0
  222. data/Views/Template/CourseType.rb +63 -0
  223. data/Views/Template/ScheduleType.rb +29 -0
  224. data/Views/Template/Tabs.rb +5 -0
  225. data/Views/Welcome.rb +121 -0
  226. data/config.yaml.default +36 -0
  227. data/po/Gestion-ar.po +2356 -0
  228. data/po/Gestion-en.mo +0 -0
  229. data/po/Gestion-en.po +4363 -0
  230. data/po/Gestion-fr.mo +0 -0
  231. data/po/Gestion-fr.po +4345 -0
  232. data/po/traduction-ar.rtf +76 -0
  233. metadata +381 -0
data/Entities/Usage.rb ADDED
@@ -0,0 +1,143 @@
1
+ # Handles a usage-reporter for any date / name / resource file
2
+ # This class only holds the configuration necessary to fetch
3
+ # all data from the files
4
+
5
+ require 'zlib'
6
+
7
+ class Usages < Entities
8
+ def setup_data
9
+ value_str :name
10
+ value_str :file_dir
11
+ value_str :file_glob
12
+ # The filter can start with s, g, v - f is used to denote fields:
13
+ # s/search/replace/
14
+ # gstring_needed
15
+ # vstring_not_wanted
16
+ # fs::regexp::arg
17
+ # where s is
18
+ # - date - arg is a strptime compatible interpretation
19
+ # - name - who accessed it - arg can give a command to translate
20
+ # - element - what has been accessed
21
+ value_str :file_filter
22
+ end
23
+ end
24
+
25
+ class Usage < Entity
26
+ def fetch_files
27
+ return [] unless File.exists? file_dir.to_s
28
+ Dir.glob("#{file_dir}/#{file_glob}")
29
+ end
30
+
31
+ def filter_files
32
+ #dputs_func
33
+ dputs(3){"#{fetch_files}"}
34
+ fetch_files.sort.reverse.map { |logfile|
35
+ dputs(4){"Using file #{logfile}"}
36
+ filter_file(logfile)
37
+ }.flatten
38
+ end
39
+
40
+ def readlines(file)
41
+ File.open(file, 'r') { |f|
42
+ if file =~ /gz$/
43
+ gz = Zlib::GzipReader.new(f)
44
+ result = gz.readlines
45
+ else
46
+ f.readlines
47
+ end
48
+ }
49
+ end
50
+
51
+ def filter_file(logfile)
52
+ dputs(3) { "Filtering file #{logfile}" }
53
+ filters = file_filter.to_s.split(/\n/)
54
+ case filters.first
55
+ when /^g/
56
+ reg = /#{filters.shift[1..-1]}/
57
+ readlines(logfile).select { |l|
58
+ l =~ reg
59
+ }
60
+ when /^v/
61
+ reg = /#{filters.shift[1..-1]}/
62
+ f.readlines(logfile).select { |l|
63
+ !l =~ reg
64
+ }
65
+ else
66
+ log_msg :Usage, "Attention: #{filters.join(':')} doesn't start with grep!"
67
+ readlines(logfile)
68
+ end.map { |l|
69
+ l.chomp!
70
+ fields = {}
71
+ dputs(4) { "Filtering line #{l}" }
72
+ file_filter.to_s.split(/\n/).each { |filter|
73
+ dputs(4) { "Applying filter #{filter.inspect} to #{l.inspect}" }
74
+ case filter
75
+ when /^[sgv]/
76
+ l = Usage.filter_line(l, filter) or break
77
+ when /^f/
78
+ field, regex, arg = filter.split('::')
79
+ fields.merge! Usage.filter_field(l, field[1..-1], regex, arg)
80
+ end
81
+ dputs(4) { "l is now #{l}" }
82
+ }
83
+ (fields).size > 0 ? fields : nil
84
+ }.compact
85
+ end
86
+
87
+ def filter_files_cache
88
+ @filter_data ||= filter_files
89
+ end
90
+
91
+ def collect_data(from = Date.today - 7, to = Date.today)
92
+ count = Hash.new(0)
93
+ filter_files_cache.select { |f|
94
+ f._date and f._date >= from and f._date <= to
95
+ }.each { |f|
96
+ count[f._element] += 1
97
+ }
98
+ count.to_a.sort { |a, b| b[1] <=> a[1] }
99
+ end
100
+
101
+ def self.filter_line(line, filter)
102
+ case filter
103
+ when /^s/
104
+ reg, rep = filter.split('/')[1, 2]
105
+ dputs(4) { "Replacing #{reg.inspect} with #{rep.inspect}" }
106
+ return line.sub(/#{reg}/, rep.to_s)
107
+ when /^g/
108
+ dputs(4) { "grepping #{filter} on #{line}" }
109
+ if !(line =~ /#{filter[1..-1]}/)
110
+ dputs(4) { "Didn't find - bail out" }
111
+ return nil
112
+ end
113
+ when /^v/
114
+ dputs(4) { "grepping -v #{filter}" }
115
+ if line =~ /#{filter[1..-1]}/
116
+ dputs(4) { 'Found it - bail out' }
117
+ return nil
118
+ end
119
+ end
120
+ line
121
+ end
122
+
123
+ def self.filter_field(line, field, regex, arg = nil)
124
+ (match = line.match(/#{regex}/) and match.size > 1) or return {}
125
+ dputs(3) { "Found a match: #{match.size} - #{match.inspect}" }
126
+ match = match[1..-1]
127
+ field.split(',').map { |f|
128
+ value = match.shift
129
+ case f
130
+ when /date/
131
+ begin
132
+ {date: Time.strptime(value, arg)}
133
+ rescue ArgumentError => e
134
+ {date: Time.now}
135
+ end
136
+ when /name/
137
+ {name: value}
138
+ when /element/
139
+ {element: value}
140
+ end
141
+ }.inject(:update)
142
+ end
143
+ end
@@ -0,0 +1,29 @@
1
+ class Workers < Entities
2
+ def setup_data
3
+ value_block :person
4
+ value_int :person_id
5
+ value_str :login_name
6
+
7
+ value_block :work
8
+ value_list_drop :function, "%w( assistant expert )"
9
+ value_date :start
10
+ value_date :end
11
+ end
12
+
13
+ def list_full_name
14
+ @data.values.collect{|d|
15
+ p = Entities.Persons.match_by_person_id( d[:person_id] )
16
+ String( p.first_name ) + " " + String( p.family_name )
17
+ }
18
+ end
19
+
20
+ def find_full_name( name )
21
+ person = @data.values.select{|d|
22
+ p = Entities.Persons.match_by_person_id( d[:person_id] )
23
+ n = String( p.first_name ) + " " + String( p.family_name )
24
+ dputs( 3 ){ "#{d[:person_id].inspect} - #{name} - #{n} - #{name == n} - #{name == n}" }
25
+ name == n
26
+ }.first
27
+ Entities.Workers.match_by_person_id( person[:person_id] )
28
+ end
29
+ end
@@ -0,0 +1,36 @@
1
+ NameVirtualHost *
2
+
3
+ <VirtualHost *>
4
+ CustomLog /var/log/apache2/access.log combined
5
+ ErrorLog /var/log/apache2/error.log
6
+ UseCanonicalName Off
7
+ ServerName label.profeda.org
8
+
9
+ <Proxy *>
10
+ Order Deny,Allow
11
+ Allow from all
12
+ </Proxy>
13
+
14
+ ProxyRequests Off
15
+ ProxyPass / http://localhost:3302/label/
16
+ ProxyPassReverse / http://localhost:3302/label/
17
+ </VirtualHost>
18
+
19
+
20
+ <VirtualHost *>
21
+ CustomLog /var/log/apache2/access.log combined
22
+ ErrorLog /var/log/apache2/error.log
23
+ UseCanonicalName Off
24
+ ServerName gestion.profeda.org
25
+
26
+ <Proxy *>
27
+ Order Deny,Allow
28
+ Allow from all
29
+ </Proxy>
30
+
31
+ ProxyRequests Off
32
+ ProxyPass / http://localhost:3302/
33
+ ProxyPassReverse / http://localhost:3302/
34
+
35
+ </VirtualHost>
36
+
data/Files/label.erb ADDED
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html "-//W3C//DTD 1.0 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title>Référence Profeda pour un étudiant</title>
7
+ <style>
8
+ body {
9
+ background-color: #607860;
10
+ }
11
+
12
+ .center {
13
+ text-align: center;
14
+ }
15
+
16
+ .right {
17
+ text-align: right;
18
+ }
19
+
20
+ .main {
21
+ margin-left: auto;
22
+ margin-right: auto;
23
+ padding: 10px;
24
+ width: 70%;
25
+ background-color: #b0deb0;
26
+ }
27
+
28
+ a:link {
29
+ text-decoration: none;
30
+ color: #000000;
31
+ }
32
+
33
+ a:visited {
34
+ text-decoration: none;
35
+ color: #000000;
36
+ }
37
+
38
+ a:hover {
39
+ text-decoration: underline;
40
+ }
41
+
42
+ a:active {
43
+ text-decoration: underline;
44
+ }
45
+
46
+ .big {
47
+ font-size: 30px;
48
+ }
49
+
50
+ .medium {
51
+ font-size: 20px;
52
+ }
53
+
54
+ .small {
55
+ font-size: 10px;
56
+ }
57
+ </style>
58
+ </head>
59
+ <body>
60
+ <div class="main">
61
+ <div class="center">
62
+ <h1><a href="http://profeda.org">Profeda.org</a></h1>
63
+
64
+ <h2><%= center %></h2>
65
+
66
+ <p>Ceci est pour confirmer que</p>
67
+
68
+ <div class="big"><%= grade.student.full_name %></div>
69
+ <p>a terminé avec succès</p>
70
+
71
+ <div class="medium"><%= grade.course.ctype.name %> -
72
+ <%= grade.course.ctype.description %> </div>
73
+ <p>Avec mention</p>
74
+
75
+ <div class="medium"><%= grade.mention %></div>
76
+ </div>
77
+
78
+ <br/><br/><br/>
79
+
80
+ <div align="center">
81
+ <table width="60%">
82
+ <tr>
83
+ <td>
84
+ <table border="1">
85
+ <tr>
86
+ <td>Début</td>
87
+ <td class="right"><%= grade.course.start %></td>
88
+ </tr>
89
+ <tr>
90
+ <td>Fin</td>
91
+ <td class="right"><%= grade.course.end %></td>
92
+ </tr>
93
+ <tr>
94
+ <td>Signature</td>
95
+ <td class="right"><%= grade.course.sign %></td>
96
+ </tr>
97
+ <tr>
98
+ <td>Durée(heures)</td>
99
+ <td class="right"><%= grade.course.duration %></td>
100
+ </tr>
101
+ </table>
102
+ </td>
103
+ <td>
104
+ <p>Le contenu du cours est le suivant:</p>
105
+ <pre><%= grade.course.ctype.contents %></pre>
106
+ <p><%= remark %></p>
107
+ <td>
108
+ </tr>
109
+ </table>
110
+ </div>
111
+
112
+ <div class="center">
113
+ <p class="small">
114
+ Ce site est seulement disponible pour vérifier la justesse d'une
115
+ attestation et ne peut être utilisé en tant que copie pour remplacer
116
+ une attestation.
117
+ </p>
118
+ </div>
119
+ </div>
120
+ </body>
121
+ </html>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html "-//W3C//DTD 1.0 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title>Référence Profeda pour un étudiant</title>
7
+ <style>
8
+ body {
9
+ background-color: #607860;
10
+ }
11
+
12
+ .center {
13
+ text-align: center;
14
+ }
15
+
16
+ .main {
17
+ margin-left: auto;
18
+ margin-right: auto;
19
+ padding: 10px;
20
+ width: 70%;
21
+ background-color: #b0deb0;
22
+ }
23
+
24
+ a:link {
25
+ text-decoration: none;
26
+ color: #000000;
27
+ }
28
+
29
+ a:visited {
30
+ text-decoration: none;
31
+ color: #000000;
32
+ }
33
+
34
+ a:hover {
35
+ text-decoration: underline;
36
+ }
37
+
38
+ a:active {
39
+ text-decoration: underline;
40
+ }
41
+
42
+ .big {
43
+ font-size: 30px;
44
+ }
45
+
46
+ .medium {
47
+ font-size: 20px;
48
+ }
49
+
50
+ .small {
51
+ font-size: 10px;
52
+ }
53
+ </style>
54
+ </head>
55
+ <body>
56
+ <div class="main">
57
+ <div class="center">
58
+ <h1><a href="http://profeda.org">Profeda.org</a></h1>
59
+
60
+ <p class="medium">Cet identifiant n'est malheureusement pas connu.</p>
61
+ </div>
62
+ </div>
63
+ </body>
64
+ </html>
@@ -0,0 +1,84 @@
1
+ <!DOCTYPE html "-//W3C//DTD 1.0 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title>Référence Profeda pour un étudiant</title>
7
+ <style>
8
+ body {background-color:#607860;}
9
+
10
+ .center {text-align: center;}
11
+
12
+ .right {text-align: right;}
13
+
14
+ .main {
15
+ margin-left:auto;
16
+ margin-right:auto;
17
+ padding: 10px;
18
+ width:70%;
19
+ background-color:#b0deb0;
20
+ }
21
+
22
+ a:link {
23
+ text-decoration:none;
24
+ color: #000000;
25
+ }
26
+ a:visited {
27
+ text-decoration:none;
28
+ color: #000000;
29
+ }
30
+ a:hover {
31
+ text-decoration:underline;
32
+ }
33
+ a:active {
34
+ text-decoration:underline;
35
+ }
36
+
37
+ .big {font-size: 30px;}
38
+ .medium {font-size: 20px;}
39
+ .small {font-size: 10px;}
40
+ </style>
41
+ </head>
42
+ <body>
43
+ <div class="main">
44
+ <div class="center">
45
+ <h1><a href="http://profeda.org">Profeda.org</a></h1>
46
+ <h2><%= center %></h2>
47
+ <p>Ceci est pour confirmer que</p>
48
+ <div class="big"><%= grade.student.full_name %></div>
49
+ <p>n'a pas réussi l'examen du cours</p>
50
+ <div class="medium"><%= grade.course.ctype.name %> -
51
+ <%= grade.course.ctype.description %> </div>
52
+ </div>
53
+
54
+ <br/><br/><br/>
55
+
56
+ <div align="center">
57
+ <table width="60%">
58
+ <tr>
59
+ <td>
60
+ <table border="1">
61
+ <tr><td>Début</td><td class="right"><%= grade.course.start %></td></tr>
62
+ <tr><td>Fin</td><td class="right"><%= grade.course.end %></td></tr>
63
+ <tr><td>Signature</td><td class="right"><%= grade.course.sign %></td></tr>
64
+ <tr><td>Durée(heures)</td><td class="right"><%= grade.course.duration %></td></tr>
65
+ </table>
66
+ </td><td>
67
+ <p>Le contenu du cours est le suivant:</p>
68
+ <pre><%= grade.course.ctype.contents %></pre>
69
+ <p><%= remark %></p>
70
+ <td>
71
+ </tr>
72
+ </table>
73
+ </div>
74
+
75
+ <div class="center">
76
+ <p class="small">
77
+ Ce site est seulement disponible pour vérifier la justesse d'une
78
+ attestation et ne peut être utilisé en tant que copie pour remplacer
79
+ une attestation.
80
+ </p>
81
+ </div>
82
+ </div>
83
+ </body>
84
+ </html>
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html "-//W3C//DTD 1.0 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <meta http-equiv="refresh" content="15"/>
7
+ <title>Statistiques sur la clé Internet</title>
8
+ <style>
9
+ body {
10
+ background-color: #607860;
11
+ }
12
+
13
+ .center {
14
+ text-align: center;
15
+ }
16
+
17
+ .right {
18
+ text-align: right;
19
+ }
20
+
21
+ .main {
22
+ margin-left: auto;
23
+ margin-right: auto;
24
+ padding: 10px;
25
+ width: 70%;
26
+ background-color: #b0deb0;
27
+ }
28
+
29
+ a:link {
30
+ text-decoration: none;
31
+ color: #000000;
32
+ }
33
+
34
+ a:visited {
35
+ text-decoration: none;
36
+ color: #000000;
37
+ }
38
+
39
+ a:hover {
40
+ text-decoration: underline;
41
+ }
42
+
43
+ a:active {
44
+ text-decoration: underline;
45
+ }
46
+
47
+ .big {
48
+ font-size: 30px;
49
+ }
50
+
51
+ .medium {
52
+ font-size: 20px;
53
+ }
54
+
55
+ .small {
56
+ font-size: 10px;
57
+ }
58
+ </style>
59
+ </head>
60
+ <body>
61
+ <div class="main">
62
+ <h1>Information about Mobile-connection</h1>
63
+
64
+ <h2>Gestion-version: <%= VERSION_GESTION %></h2>
65
+ <% if $MobileControl %>
66
+ <ul>
67
+ <li>USB-modem is
68
+ <%= $MobileControl.device ? 'Present' : 'MISSING' %>
69
+ </li>
70
+ <li>Operator is
71
+ <%= begin
72
+ $MobileControl.operator.name
73
+ rescue NoMethodError
74
+ 'MISSING'
75
+ end %></li>
76
+ <li>Promotion left: <%= begin
77
+ "#{($MobileControl.operator.internet_left / 1000).separator("'")}k"
78
+ rescue NoMethodError
79
+ 'MISSING'
80
+ end %>
81
+ </li>
82
+ <li>Credit left: <%= begin
83
+ "#{$MobileControl.operator.credit_left}CFA"
84
+ rescue NoMethodError
85
+ 'MISSING'
86
+ end %>
87
+ </li>
88
+ <li>Internet is
89
+ <%= begin
90
+ $MobileControl.is_connected ? 'Connected' : 'Disconnected'
91
+ rescue NoMethodError
92
+ 'MISSING'
93
+ end %></li>
94
+ <li>Last SMS received:
95
+ <ul>
96
+ <%=
97
+ SMSs.last(5).reverse.collect { |sms|
98
+ "<li>#{sms.date}::#{sms.phone}:: ::#{sms.text}</li>"
99
+ }.join
100
+ %></ul>
101
+ </li>
102
+ <li>
103
+ <%= if mails = /.* ([0-9]+) Request.*/.match(%x[ postqueue -p | tail -n 1 ])
104
+ "#{mails[1]} mails in queue"
105
+ else
106
+ 'No mails in queue'
107
+ end
108
+ %></li>
109
+ </ul>
110
+ <% else %>
111
+ <h2>MobileControl is disabled</h2>
112
+ <% end %>
113
+ </div>
114
+ </body>
115
+ </html>