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