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

« back to all changes in this revision

Viewing changes to lib/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-07-07 12:01:03 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:820
lib: Added new package pulldown_subj, a collection of modules designed to
    pull student subject enrolments from the server.
    Note that the actual code to do this is not included (since that is
    specific to the organisation running IVLE) - just a pluggable interface
    and an example plugin module.
configure.py: Added new config option: subject_pulldown_modules, which allows
    you to specify which modules are plugged in here.
    (Actually that was added accidentally in a previous commit; but this
    revision fixes some comments).

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enable_debuginfo = False
8
8
 
9
9
# Allow App objects
10
 
# Note: icon is a string of a file basename. The icon files are found in
 
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
11
14
# app_icon_dir, defined below.
12
15
class App:
13
 
    def __init__(self, dir, name, icon = None, requireauth = True,
14
 
        hashelp = False):
 
16
    def __init__(self, dir, name, desc=None, icon = None,
 
17
        requireauth = True, hashelp = False):
15
18
        self.dir = dir
16
19
        self.name = name
 
20
        self.desc = desc
17
21
        self.icon = icon
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),
 
28
                repr(self.hashelp)))
25
29
 
26
30
# Directory where app icons are stored, relative to the IVLE root.
27
31
app_icon_dir = "media/images/apps"
40
44
# Application definitions
41
45
 
42
46
app_browser =   App(dir = "browser",
43
 
                    name = "File Browser",
 
47
                    name = "Files",
 
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,
46
52
                    hashelp = True)
47
53
 
48
 
app_editor =   App(dir = "editor",
49
 
                    name = "Text Editor",
50
 
                    icon = "editor.png",
51
 
                    requireauth = True,
52
 
                    hashelp = True)
53
 
 
54
54
app_fileservice = App(dir = "fileservice",
55
55
                    name = "File Service (AJAX server)",
56
56
                    requireauth = True,
58
58
 
59
59
app_console =     App(dir = "console",
60
60
                    name = "Console",
 
61
                    desc = "A Python console where you can try out code "
 
62
                           "without having to save and run it.",
61
63
                    icon = "console.png",
62
64
                    requireauth = True,
63
65
                    hashelp = True)
68
70
                    hashelp = False)
69
71
 
70
72
app_tutorial =     App(dir = "tutorial",
71
 
                    name = "Tutorial",
 
73
                    name = "Worksheets",
 
74
                    desc = "Online tutorials and exercises for lab work.",
72
75
                    icon = "tutorial.png",
73
76
                    requireauth = True,
74
77
                    hashelp = True)
90
93
 
91
94
app_help =      App(dir = "help",
92
95
                    name = "Help",
 
96
                    desc = "IVLE help pages",
93
97
                    icon = "help.png",
94
98
                    requireauth = True,
95
99
                    hashelp = False)
101
105
 
102
106
app_forum = App(dir = "forum",
103
107
                    name = "Forum",
 
108
                    desc = "Discussion boards for material relating to "
 
109
                           "Informatics, IVLE and Python.",
104
110
                    icon = "forum.png",
105
111
                    requireauth = True,
106
112
                    hashelp = False)
128
134
                    hashelp = False)
129
135
 
130
136
app_subjects = App(dir = "subjects",
131
 
                    name = "Subject Homepages",
 
137
                    name = "Subjects",
 
138
                    desc = "Announcements and information about the subjects "
 
139
                           "you are enrolled in.",
 
140
                    icon = "subjects.png",
132
141
                    requireauth = False,
133
142
                    hashelp = False)
134
143
 
135
144
app_home = App(dir = "home",
136
145
                    name = "Home",
 
146
                    desc = "IVLE home page",
 
147
                    icon = "home.png",
137
148
                    requireauth = True,
138
149
                    hashelp = False)
139
150
 
141
152
 
142
153
app_url = {
143
154
    "files" : app_browser,
144
 
    "edit" : app_editor,
145
155
    "fileservice" : app_fileservice,
146
156
    "console" : app_console,
147
157
    "consoleservice" : app_consoleservice,
165
175
# (The others are hidden unless they are linked to)
166
176
# Note: The values in this list are the URL names as seen in app_url.
167
177
 
168
 
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]
 
178
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
 
179
                "forum", "help"]
 
180
 
 
181
# List of apps that go in the list on the home page
 
182
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]