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

1079 by William Grant
Merge setup-refactor branch. This completely breaks existing installations;
1
# IVLE Configuration File
2
# conf/apps.py
3
# Configuration of plugin applications for IVLE
4
# These should not need to be modified by admins unless new applications are
5
# plugged in.
6
7
enable_debuginfo = False
8
9
# Allow App objects
10
# Notes:
11
# icon is a string of a file basename. The icon files are found in
12
# app_icon_dir, defined below.
13
class App:
14
    def __init__(self, dir, name, desc=None, icon = None,
15
        useconsole = False, requireauth = True, hashelp = False):
16
        self.dir = dir
17
        self.name = name
18
        self.desc = desc
19
        self.icon = icon
20
        self.useconsole = useconsole
21
        self.requireauth = requireauth
22
        self.hashelp = hashelp
23
    def __repr__(self):
24
        return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
25
                "hashelp=%s)" % (repr(self.dir), repr(self.name),
26
                repr(self.desc), repr(self.icon), repr(self.requireauth),
27
                repr(self.hashelp)))
28
29
# Directory where app icons are stored, relative to the IVLE root.
1099.1.68 by William Grant
Move the remaining images to the new framework, in the new ivle.webapp.core
30
app_icon_dir = "+media/ivle.webapp.core/images/apps"
1079 by William Grant
Merge setup-refactor branch. This completely breaks existing installations;
31
# Small version of icons (16x16, for favicon)
1099.1.68 by William Grant
Move the remaining images to the new framework, in the new ivle.webapp.core
32
app_icon_dir_small = "+media/ivle.webapp.core/images/apps/small"
1079 by William Grant
Merge setup-refactor branch. This completely breaks existing installations;
33
34
# Which application to load by default (if the user navigates to the top level
35
# of the site). This is the app's URL name.
36
# Note that if this app requires authentication, the user will first be
37
# presented with the login screen.
38
default_app = "files"
39
# Which application to use for "public host" URLs.
40
# (See conf.py)
41
public_app = "serve"
42
43
# Application definitions
44
45
app_browser =   App(dir = "browser",
46
                    name = "Files",
47
                    desc = "Gives you access to all of your files and lets "
48
                           "you download, upload, edit and run them.",
49
                    icon = "browser.png",
50
                    useconsole = True,
51
                    requireauth = True,
52
                    hashelp = True)
53
54
app_fileservice = App(dir = "fileservice",
55
                    name = "File Service (AJAX server)",
56
                    requireauth = True,
57
                    hashelp = False)
58
59
app_console =     App(dir = "console",
60
                    name = "Console",
61
                    desc = "A Python console where you can try out code "
62
                           "without having to save and run it.",
63
                    icon = "console.png",
64
                    useconsole = False, # We use a full console in this app
65
                    requireauth = True,
66
                    hashelp = True)
67
68
app_tutorial =     App(dir = "tutorial",
69
                    name = "Worksheets",
70
                    desc = "Online tutorials and exercises for lab work.",
71
                    icon = "tutorial.png",
72
                    useconsole = True,
73
                    requireauth = True,
74
                    hashelp = True)
75
76
app_server =    App(dir = "server",
77
                    name = "Server",
78
                    requireauth = True,
79
                    hashelp = False)
80
81
app_download =  App(dir = "download",
82
                    name = "Download",
83
                    requireauth = True,
84
                    hashelp = False)
85
86
app_help =      App(dir = "help",
87
                    name = "Help",
88
                    desc = "IVLE help pages",
89
                    icon = "help.png",
90
                    requireauth = True,
91
                    hashelp = False)
92
93
app_debuginfo = App(dir = "debuginfo",
94
                    name = "Debug Information",
95
                    requireauth = False,
96
                    hashelp = False)
97
98
app_forum = App(dir = "forum",
99
                    name = "Forum",
100
                    desc = "Discussion boards for material relating to "
101
                           "Informatics, IVLE and Python.",
102
                    icon = "forum.png",
103
                    requireauth = True,
104
                    hashelp = False)
105
106
app_tos = App(dir = "tos",
107
                    name = "Terms of Service",
108
                    requireauth = False,
109
                    hashelp = False)
110
111
app_userservice = App(dir = "userservice",
112
                    name = "User Management Service",
113
                    requireauth = False,
114
                    hashelp = False)
115
116
app_subjects = App(dir = "subjects",
117
                    name = "Subjects",
118
                    desc = "Announcements and information about the subjects "
119
                           "you are enrolled in.",
120
                    icon = "subjects.png",
121
                    requireauth = False,
122
                    hashelp = False)
123
124
# Mapping URL names to apps
125
126
app_url = {
127
    "files" : app_browser,
128
    "fileservice" : app_fileservice,
129
    "console" : app_console,
130
    "tutorial" : app_tutorial,
131
    "serve" : app_server,
132
    "download" : app_download,
133
    "help" : app_help,
134
    "forum" : app_forum,
135
    "tos" : app_tos,
136
    "userservice" : app_userservice,
137
    "subjects" : app_subjects,
138
}
139
if enable_debuginfo:
140
    app_url["debuginfo"] = app_debuginfo
141
142
# List of apps that go in the tabs at the top
143
# (The others are hidden unless they are linked to)
144
# Note: The values in this list are the URL names as seen in app_url.
145
146
apps_in_tabs = ["files", "tutorial", "console",
147
                "forum", "subjects", "help"]