7
7
enable_debuginfo = False
10
# Note: icon is a string of a file basename. The icon files are found in
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
11
14
# app_icon_dir, defined below.
13
def __init__(self, dir, name, icon = None, requireauth = True,
16
def __init__(self, dir, name, desc=None, icon = None,
17
requireauth = True, hashelp = False):
18
22
self.requireauth = requireauth
19
23
self.hashelp = hashelp
20
24
def __repr__(self):
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) + ")")
25
return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
26
"hashelp=%s)" % (repr(self.dir), repr(self.name),
27
repr(self.desc), repr(self.icon), repr(self.requireauth),
26
30
# Directory where app icons are stored, relative to the IVLE root.
27
31
app_icon_dir = "media/images/apps"
32
36
# of the site). This is the app's URL name.
33
37
# Note that if this app requires authentication, the user will first be
34
38
# presented with the login screen.
36
40
# Which application to use for "public host" URLs.
38
42
public_app = "serve"
40
44
# Application definitions
42
46
app_browser = App(dir = "browser",
43
name = "File Browser",
48
desc = "Gives you access to all of your files and lets "
49
"you download, upload, edit and run them.",
44
50
icon = "browser.png",
45
51
requireauth = True,
48
app_editor = App(dir = "editor",
54
54
app_fileservice = App(dir = "fileservice",
55
55
name = "File Service (AJAX server)",
56
56
requireauth = True,
102
106
app_forum = App(dir = "forum",
108
desc = "Discussion boards for material relating to "
109
"Informatics, IVLE and Python.",
104
110
icon = "forum.png",
105
111
requireauth = True,
110
116
requireauth = False,
119
app_settings = App(dir = "settings",
120
name = "Account Settings",
121
icon = "settings.png",
113
125
app_userservice = App(dir = "userservice",
114
126
name = "User Management Service",
115
127
requireauth = False,
130
app_diff = App(dir = "diff",
136
app_subjects = App(dir = "subjects",
138
desc = "Announcements and information about the subjects "
139
"you are enrolled in.",
140
icon = "subjects.png",
144
app_home = App(dir = "home",
146
desc = "IVLE home page",
118
151
# Mapping URL names to apps
121
154
"files" : app_browser,
123
155
"fileservice" : app_fileservice,
124
156
"console" : app_console,
125
157
"consoleservice" : app_consoleservice,
130
162
"help" : app_help,
131
163
"forum" : app_forum,
165
"settings" : app_settings,
133
166
"userservice" : app_userservice,
168
"subjects" : app_subjects,
135
171
if enable_debuginfo:
136
172
app_url["debuginfo"] = app_debuginfo
139
175
# (The others are hidden unless they are linked to)
140
176
# Note: The values in this list are the URL names as seen in app_url.
142
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]
178
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
181
# List of apps that go in the list on the home page
182
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]