7
7
enable_debuginfo = False
11
# desc is a full description for the front page. It isn't required
12
# unless this app is in apps_on_home_page.
13
# icon is a string of a file basename. The icon files are found in
10
# Note: icon is a string of a file basename. The icon files are found in
14
11
# app_icon_dir, defined below.
16
def __init__(self, dir, name, desc=None, icon = None,
17
useconsole = False, requireauth = True, hashelp = False):
13
def __init__(self, dir, name, icon = None, requireauth = True,
22
self.useconsole = useconsole
23
18
self.requireauth = requireauth
24
19
self.hashelp = hashelp
25
20
def __repr__(self):
26
return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
27
"hashelp=%s)" % (repr(self.dir), repr(self.name),
28
repr(self.desc), repr(self.icon), repr(self.requireauth),
21
return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
22
", icon=" + repr(self.icon) +
23
", requireauth=" + repr(self.requireauth) + ", hashelp="
24
+ repr(self.hashelp) + ")")
31
26
# Directory where app icons are stored, relative to the IVLE root.
32
27
app_icon_dir = "media/images/apps"
37
32
# of the site). This is the app's URL name.
38
33
# Note that if this app requires authentication, the user will first be
39
34
# presented with the login screen.
41
36
# Which application to use for "public host" URLs.
43
38
public_app = "serve"
45
40
# Application definitions
47
42
app_browser = App(dir = "browser",
49
desc = "Gives you access to all of your files and lets "
50
"you download, upload, edit and run them.",
43
name = "File Browser",
51
44
icon = "browser.png",
48
app_editor = App(dir = "editor",
53
51
requireauth = True,
61
59
app_console = App(dir = "console",
63
desc = "A Python console where you can try out code "
64
"without having to save and run it.",
65
61
icon = "console.png",
66
useconsole = False, # We use a full console in this app
67
62
requireauth = True,
110
102
app_forum = App(dir = "forum",
112
desc = "Discussion boards for material relating to "
113
"Informatics, IVLE and Python.",
114
104
icon = "forum.png",
115
105
requireauth = True,
120
110
requireauth = False,
123
app_settings = App(dir = "settings",
124
name = "Account Settings",
125
icon = "settings.png",
129
113
app_userservice = App(dir = "userservice",
130
114
name = "User Management Service",
131
115
requireauth = False,
134
app_diff = App(dir = "diff",
140
app_svnlog = App(dir = "svnlog",
141
name = "Subversion Log",
145
app_subjects = App(dir = "subjects",
147
desc = "Announcements and information about the subjects "
148
"you are enrolled in.",
149
icon = "subjects.png",
153
app_home = App(dir = "home",
155
desc = "IVLE home page",
160
118
# Mapping URL names to apps
163
121
"files" : app_browser,
164
123
"fileservice" : app_fileservice,
165
124
"console" : app_console,
166
125
"consoleservice" : app_consoleservice,
171
130
"help" : app_help,
172
131
"forum" : app_forum,
174
"settings" : app_settings,
175
133
"userservice" : app_userservice,
177
"svnlog" : app_svnlog,
178
"subjects" : app_subjects,
181
135
if enable_debuginfo:
182
136
app_url["debuginfo"] = app_debuginfo
185
139
# (The others are hidden unless they are linked to)
186
140
# Note: The values in this list are the URL names as seen in app_url.
188
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
191
# List of apps that go in the list on the home page
192
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]
142
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]