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"
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,
107
99
requireauth = False,
110
app_forum = App(dir = "forum",
112
desc = "Discussion boards for material relating to "
113
"Informatics, IVLE and Python.",
118
app_tos = App(dir = "tos",
119
name = "Terms of Service",
123
app_settings = App(dir = "settings",
124
name = "Account Settings",
125
icon = "settings.png",
129
app_groups = App(dir = "groups",
130
name = "Group Management",
135
app_userservice = App(dir = "userservice",
136
name = "User Management Service",
140
app_diff = App(dir = "diff",
146
app_svnlog = App(dir = "svnlog",
147
name = "Subversion Log",
151
app_subjects = App(dir = "subjects",
153
desc = "Announcements and information about the subjects "
154
"you are enrolled in.",
155
icon = "subjects.png",
159
app_home = App(dir = "home",
161
desc = "IVLE home page",
166
102
# Mapping URL names to apps
169
105
"files" : app_browser,
170
107
"fileservice" : app_fileservice,
171
108
"console" : app_console,
172
109
"consoleservice" : app_consoleservice,
175
112
"serve" : app_server,
176
113
"download" : app_download,
177
114
"help" : app_help,
180
"settings" : app_settings,
181
"groups" : app_groups,
182
"userservice" : app_userservice,
184
"svnlog" : app_svnlog,
185
"subjects" : app_subjects,
188
116
if enable_debuginfo:
189
117
app_url["debuginfo"] = app_debuginfo
192
120
# (The others are hidden unless they are linked to)
193
121
# Note: The values in this list are the URL names as seen in app_url.
195
apps_in_tabs = ["files", "tutorial", "console",
196
"forum", "subjects", "help"]
198
# List of apps that go in the list on the home page
199
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]
123
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]