alsmanager_lib 3.0.239 → 3.0.240

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/modules.js +25 -0
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -1537,6 +1537,28 @@ function getDocenteById(db_used, id_docente) {
1537
1537
 
1538
1538
 
1539
1539
  // End Anagrafica docenti
1540
+ // Anagrafica alunni
1541
+ function getAlunniCombo(id_place, id_site) {
1542
+ var query = "select id, concat(cognome, ' ', nome) as nominativo from anagrafica_alunni al ";
1543
+ query += "join anagrafica_alunni_site als on als.id_alunno = al.id "
1544
+ query += "where al.is_attivo = 1 "
1545
+ if (id_place) {
1546
+ query += "and als.id_place = '" + id_place + "' ";
1547
+ }
1548
+ if (id_site) {
1549
+ query += "and als.id_site = " + id_site + " ";
1550
+ }
1551
+ query += "order by cognome, nome";
1552
+ return query;
1553
+ }
1554
+
1555
+ function getAlunnoById(id_alunno) {
1556
+ var query = "select id, cognome, nome, email, is_attivo from anagrafica_alunni ";
1557
+ query += "where id = " + id_alunno;
1558
+ return query;
1559
+ }
1560
+
1561
+ //End anagrafica alunni
1540
1562
  // Device configurations
1541
1563
  function getDeviceConfigurationsSQLite(id_device) {
1542
1564
  var query = "select id, date_conf, note from device_changes ";
@@ -17679,6 +17701,9 @@ module.exports = {
17679
17701
  getDocentiCombo,
17680
17702
  getDocenteById,
17681
17703
  //
17704
+ getAlunniCombo,
17705
+ getAlunnoById,
17706
+ //
17682
17707
  getDeviceConfigurations,
17683
17708
  getLastDeviceConfiguration,
17684
17709
  getDeviceConfigurationById,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.239",
7
+ "version": "3.0.240",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",