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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/user.py

Fixed an oversight in the tutorial code which was printing <worksheet>
and <exercise> tags into the output

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from ivle.webapp.base.rest import JSONRESTView
21
21
from ivle.webapp.base.xhtml import XHTMLView
22
 
from ivle.webapp.base.plugins import ViewPlugin
 
22
from ivle.webapp.base.plugins import BasePlugin
23
23
import ivle.database
24
24
import ivle.util
25
25
 
75
75
        if not self.context:
76
76
            raise NotFound()
77
77
 
78
 
        self.plugin_scripts[Plugin] = ['settings.js']
79
 
        req.scripts_init = ['revert_settings']
80
 
 
 
78
        req.scripts = [
 
79
            "/media/settings/settings.js",
 
80
            "/media/common/json2.js",
 
81
            "/media/common/util.js",
 
82
        ]
 
83
        req.scripts_init = [
 
84
            "revert_settings"
 
85
        ]
81
86
        ctx['login'] = self.context.login
82
87
 
83
 
class Plugin(ViewPlugin):
 
88
class Plugin(BasePlugin):
84
89
    """
85
90
    The Plugin class for the user plugin.
86
91
    """
89
94
    # (regex str, handler class, kwargs dict)
90
95
    # The kwargs dict is passed to the __init__ of the view object
91
96
    urls = [
92
 
        ('~:login/+settings', UserSettingsView),
93
 
        ('api/~:login', UserRESTView),
 
97
        ('users/:login/+settings', UserSettingsView),
 
98
        ('api/users/:login', UserRESTView),
94
99
    ]
95
 
 
96
 
    media = 'user-media'