Git Repository Public Repository

CPE_learningsite

URLs

Copy to Clipboard

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
$(document).ready(function () {
    var pcode,
        rcode;
    $('#onDemandCoursesTable').dataTable({
        "sPaginationType": "full_numbers",
        "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
        "iDisplayLength": 50,
        "aaSorting": [[1, "desc"]],
        "sDom": 'Tfrtlip',
        "oTableTools": {
            "sSwfPath": "/static/swf/copy.csv.xls.swf",
            "aButtons": ["copy", "csv"]
        },
        "initComplete": function() {

            var dialog = $('#dialog');

            dialog.dialog({
                autoOpen: false,
                modal: true,
                buttons: {
                    "Submit": function(e) {
                        var firstname = $("#firstName").val(),
                            lastname = $("#lastName").val(),
                            email = $("#email").val();

                        function getTicket() {
                            var link;
                            var contentUrl = pcode;
                            contentUrl += "-";
                            contentUrl += rcode;
                            var url = "/getTicket";
                            $.post(url, { firstname: firstname, lastname: lastname, email: email, contentUrl: contentUrl }, function(data) {
                                var emailBody = 'Thank you for purchasing our Self-Study Webcast. This email provides the access information.'
                                + '\r\n\r\n' + 'Follow the link below to access the course and enter the information displayed.'
                                + '\r\n\r\n' + 'First Name: '
                                + '\r\n' + 'Last Name: '
                                + '\r\n' + 'Email: '
                                + '\r\n' + 'Passcode: '
                                + '\r\n\r\n' + data
                                + '\r\n\r\n' + 'Your access will only be available for one year from the date of your purchase. By accessing the course, you agree to the terms and restrictions listed on our website.'
                                + '\r\n\r\n' + 'You will need to complete the course Final Examination with a score of 70% or greater to receive credit. If you complete the quiz only partially, your answers will not be saved. If you receive a final examination score of less than 70%, you may retake the final examination as many times as you need.'
                                + '\r\n\r\n' + 'This Self-Study Webcast contains important resources located under "Files" in the course menu.'
                                + '\r\n\r\n' + 'One of these resources is a searchable course manual, which contains the slides utilized by the speaker, along with a course glossary, for your convenience.'
                                + '\r\n\r\n' + 'Another important resource is a downloadable and printable copy of the final examination for the course. You may find it helpful to use it to take notes as you proceed through the course. This is especially helpful for those who do not wish to complete the final exam in a single setting.'
                                + '\r\n\r\n' + 'You need to connect directly to the webcast without going through a VPN.';

                                emailBody = encodeURIComponent(emailBody);
                                link = 'mailto:' + email
                                     + '?subject=' + escape('Your access link to our Self-Study Webcast')
                                     + '&body=' + emailBody;
                                win = window.open(link);
                            });
                            
                        }
                        
                        getTicket();
                        dialog.dialog("close");
                    },
                    Cancel: function() {
                        dialog.dialog("close");
                    }
                }
            });

            $('.btnGetLink').click(function(e) {
                pcode = $(e.target).data('pcode');
                rcode = $(e.target).data('rcode');
                dialog.dialog('open');
            });

        }


    });
});

Commits for CPE_learningsiteCPE/CPE.App/CPE.App.Web/static/js/index/elucidat.js

Diff revisions: vs.
Revision Author Commited Message
4cd176 ... v.shishlov Fri 27 Aug, 2021 14:33:17 +0000

initial commit