~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/common/tos.js

  • Committer: William Grant
  • Date: 2009-01-20 01:12:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: grantw@unimelb.edu.au-20090120011232-mvxq6n1p8e0pq5z2
ivle.db: insert_problem_attempt and write_problem_save now take a user object,
    not a login, so they don't need to call get_user_loginid. Thus we also
    remove get_user_login_id.
www/apps/tutorialservice: Call the two functions with req.user, not
    req.user.login.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    /* TEMP */
80
80
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
81
81
    dom_removechildren(tos_acceptbuttons);
82
 
    /* Refresh the page; as the user is now (apparently) logged in */
83
 
    window.location.href = window.location.href;
 
82
 
 
83
    try
 
84
    {
 
85
        response = JSON.parse(xhr.responseText);
 
86
    }
 
87
    catch (e)
 
88
    {
 
89
        response = {'response': 'parse-failure'};
 
90
    }
 
91
 
 
92
    if (response.response == 'usrmgt-failure')
 
93
    {
 
94
    tos_acceptbuttons.appendChild(dom_make_text_elem("p",
 
95
        "Error connecting to User Management server. Please try again later.")); 
 
96
    }
 
97
    else if (response.response == 'parse-failure')
 
98
    {
 
99
    tos_acceptbuttons.appendChild(dom_make_text_elem("p",
 
100
        "Error connecting to server. Please try again later. "));
 
101
    }
 
102
    else
 
103
    {
 
104
        /* Refresh the page; as the user is now (apparently) logged in */
 
105
        window.location.href = window.location.href;
 
106
    }
84
107
}
85
108
 
86
109
function decline_license()