PageSourceSearch

https://rekrutacja.pedagogium.pl/pdg-irk-app/content/script/irk/pa…/PytaniaDodatkoweController.js

js pedagogium.pl collected 2026-10-04 13:34:12 UTC 2,033 bytes, 54 lines download raw bytes

1(function() {
2    'use strict';
3    
4    angular
5        .module('irk')
6        .constant("PYTANIA_DODATKOWE_EVENTS", {
7            przeladuj: 'przeladujPytaniaDodatkowe'
8        })
9        .controller('PytaniaDodatkoweController', PytaniaDodatkoweController);
10
11    function PytaniaDodatkoweController($http, $scope, $rootScope, i18n, toaster, 
12        SIDEBAR_MENU_EVENTS, PYTANIA_DODATKOWE_EVENTS, Session) {
13        $scope.pule = [];
14        
15        var przeladujPytaniaDodatkowe = function() {
16            $http.get('REST/pytaniadodatkowe/pule', {
17                params: {typPuliTestow: $scope.typyAnkietPytanDodatkowych || []}
18            }).then(function (pule) {
19                $scope.pule = pule.data;
20            });
21        };
22        
23        $scope.zakonczAnkiete = function(pula) {
24            return $http.post('REST/testy/zakonczTest/' + pula.idSzablonuTestu, {}).then(function(result) {
25                if (result.status != 200) {
26                    popToaster('interfejs.irk.shared.error.SaveError', 'error');
27                }
28                else if (result.data.length == 0) {
29                    popToaster('interfejs.irk.shared.ZapisanoFormularz', 'success');
30                    pula.zakonczona = true;
31                    przeladujSidebarMenu();
32                }
33                else {
34                    var i18nSufix = result.data[0];
35                    popToaster('interfejs.irk.komponent.PytaniaDodatkowePanel.' + i18nSufix, 'error');
36                }
37            });
38        };
39
40        var popToaster = function(i18nKey, popupType) {
41            i18n.get(i18nKey).then(function(komunikat) {
42                toaster.pop(popupType, komunikat);
43            });
44        };
45        
46        var przeladujSidebarMenu = function() {
47            $rootScope.$broadcast(SIDEBAR_MENU_EVENTS.zmianaLiczbyZgodDoUzupelnienia);
48            Session.destroy();
49        };
50        
51        przeladujPytaniaDodatkowe();
52        $scope.$on(PYTANIA_DODATKOWE_EVENTS.przeladuj, przeladujPytaniaDodatkowe);
53    }
54})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.