MDL-33552 - portfolio api E_STRICT fixes
[moodle.git] / lib / portfolio / constants.php
CommitLineData
87fcac8d 1<?php
93dd2725
RW
2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
87fcac8d 17/**
87fcac8d 18 * This file contains all the defined constants to do with portfolios.
93dd2725
RW
19 *
20 * @package core_portfolio
21 * @copyright 2008 Penny Leach <penny@catalyst.net.nz>, Martin Dougiamas
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
87fcac8d 23 */
24
0972665f
PS
25defined('MOODLE_INTERNAL') || die();
26
93dd2725
RW
27//EXPORT STAGE CONSTANTS
28
87fcac8d 29
30/**
93dd2725
RW
31 * PORTFOLIO_STAGE_CONFIG - display a form to the user this one might not be
32 * used if neither the plugin, or the caller has any config.
33 */
87fcac8d 34define('PORTFOLIO_STAGE_CONFIG', 1);
35
36/**
93dd2725
RW
37 * PORTFOLIO_STAGE_CONFIRM - summarise the form and ask for confirmation
38 * if we skipped PORTFOLIO_STAGE_CONFIG,
39 * just confirm the send.
40 */
87fcac8d 41define('PORTFOLIO_STAGE_CONFIRM', 2);
42
43/**
93dd2725
RW
44 * PORTFOLIO_STAGE_QUEUEORWAIT - either queue the event and skip to PORTFOLIO_STAGE_FINISHED
45 */
87fcac8d 46define('PORTFOLIO_STAGE_QUEUEORWAIT', 3);
47
48/**
93dd2725
RW
49 * PORTFOLIO_STAGE_PACKAGE - package up the various bits during this stage both the caller
50 * and the plugin get their package methods called
51 */
87fcac8d 52define('PORTFOLIO_STAGE_PACKAGE', 4);
53
93dd2725
RW
54/**
55 * PORTFOLIO_STAGE_SEND - the portfolio plugin must send the file
56 */
87fcac8d 57define('PORTFOLIO_STAGE_SEND', 5);
58
59/**
93dd2725
RW
60 * PORTFOLIO_STAGE_CLEANUP - cleanup the temporary area
61 */
87fcac8d 62define('PORTFOLIO_STAGE_CLEANUP', 6);
63
64/**
93dd2725
RW
65 * PORTFOLIO_STAGE_FINISHED - display the "finished notification"
66 */
87fcac8d 67define('PORTFOLIO_STAGE_FINISHED', 7);
68
69
70
93dd2725 71
87fcac8d 72// EXPORT FORMAT CONSTANTS
93dd2725 73// These should always correspond to a string in the portfolio module, called format_{$value}
87fcac8d 74
75
76/**
93dd2725
RW
77 * PORTFOLIO_FORMAT_FILE - the most basic fallback format. this should always be supported
78 * in remote system.s
79 */
87fcac8d 80define('PORTFOLIO_FORMAT_FILE', 'file');
81
82/**
93dd2725
RW
83 * PORTFOLIO_FORMAT_MBKP - the plugin needs to be able to write a complete backup
84 * the caller need to be able to export the particular XML bits to insert
85 * into moodle.xml (?and the file bits if necessary)
86 */
87fcac8d 87define('PORTFOLIO_FORMAT_MBKP', 'mbkp');
88
89/**
93dd2725
RW
90 * PORTFOLIO_FORMAT_RICHHTML - like html but with attachments.
91 */
6be1dcae 92define('PORTFOLIO_FORMAT_RICHHTML', 'richhtml');
93
6be1dcae 94/**
93dd2725
RW
95 * PORTFOLIO_FORMAT_PLAINHTML - a single html representation - no attachments
96 */
6be1dcae 97define('PORTFOLIO_FORMAT_PLAINHTML', 'plainhtml');
87fcac8d 98
99/**
93dd2725
RW
100 * PORTFOLIO_FORMAT_IMAGE - subtype of file
101 */
87fcac8d 102define('PORTFOLIO_FORMAT_IMAGE', 'image');
103
104/**
93dd2725
RW
105 * PORTFOLIO_FORMAT_VIDEO - subtype of file
106 */
87fcac8d 107define('PORTFOLIO_FORMAT_VIDEO', 'video');
108
109/**
93dd2725
RW
110 * PORTFOLIO_FORMAT_TEXT - subtype of file
111 */
87fcac8d 112define('PORTFOLIO_FORMAT_TEXT', 'text');
113
a9ec9031 114/**
93dd2725
RW
115 * PORTFOLIO_FORMAT_PDF - subtype of file
116 */
a9ec9031
DP
117define('PORTFOLIO_FORMAT_PDF', 'pdf');
118
119/**
93dd2725
RW
120 * PORTFOLIO_FORMAT_DOCUMENT - subtype of file
121 */
a9ec9031
DP
122define('PORTFOLIO_FORMAT_DOCUMENT', 'document');
123
124/**
93dd2725
RW
125 * PORTFOLIO_FORMAT_SPREADSHEET - subtype of file
126 */
a9ec9031
DP
127define('PORTFOLIO_FORMAT_SPREADSHEET', 'spreadsheet');
128
129/**
93dd2725
RW
130 * PORTFOLIO_FORMAT_PRESENTATION - subtype of file
131 */
a9ec9031 132define('PORTFOLIO_FORMAT_PRESENTATION', 'presentation');
87fcac8d 133
59dd457e 134/**
93dd2725 135 * PORTFOLIO_FORMAT_RICH - just used to say, "we support all these"
59dd457e
PL
136 */
137define('PORTFOLIO_FORMAT_RICH', 'rich');
138
139/**
93dd2725 140 * PORTFOLIO_FORMAT_LEAP2A - supported by mahara and and others {http://wiki.cetis.ac.uk/LEAP_2.0}
59dd457e
PL
141 */
142define('PORTFOLIO_FORMAT_LEAP2A', 'leap2a');
143
93dd2725
RW
144// EXPORT TIME LEVELS
145// These should correspond to a string in the portfolio module, called time_{$value}
87fcac8d 146
147/**
93dd2725
RW
148 * PORTFOLIO_TIME_LOW - no delay. don't even offer the user the option
149 * of not waiting for the transfer
150 */
87fcac8d 151define('PORTFOLIO_TIME_LOW', 'low');
152
153/**
93dd2725
RW
154 * PORTFOLIO_TIME_MODERATE - a small delay. user can still easily opt to
155 * watch this transfer and wait.
156 */
87fcac8d 157define('PORTFOLIO_TIME_MODERATE', 'moderate');
158
159/**
93dd2725
RW
160 * PORTFOLIO_TIME_HIGH - slow. the user really should not be given the option
161 * to choose this.
162 */
87fcac8d 163define('PORTFOLIO_TIME_HIGH', 'high');
164
165/**
93dd2725
RW
166 * PORTFOLIO_TIME_FORCEQUEUE - very slow, or immediate transfers not supported
167 */
87fcac8d 168define('PORTFOLIO_TIME_FORCEQUEUE', 'queue');
169
93dd2725
RW
170 // BUTTON FORMATS
171 // Available ways to add the portfolio export to a page
87fcac8d 172
173/**
93dd2725
RW
174 * PORTFOLIO_ADD_FULL_FORM - a whole form, containing a drop down menu (where necessary)
175 * and a submit button
176 */
87fcac8d 177define('PORTFOLIO_ADD_FULL_FORM', 1);
178
179
180/**
93dd2725
RW
181 * PORTFOLIO_ADD_ICON_FORM - a whole form, containing a drop down menu (where necessary)
182 * but has an icon instead of a button to submit
183 */
87fcac8d 184define('PORTFOLIO_ADD_ICON_FORM', 2);
185
186/**
93dd2725
RW
187 * PORTFOLIO_ADD_ICON_LINK - just an icon with a link around it (yuk, as will result in a long url
188 * only use where necessary)
189 */
87fcac8d 190define('PORTFOLIO_ADD_ICON_LINK', 3);
191
192/**
93dd2725
RW
193 * PORTFOLIO_ADD_TEXT_LINK - just some text with a link around it (yuk, as will result in a long url
194 * only use where necessary)
195 */
87fcac8d 196define('PORTFOLIO_ADD_TEXT_LINK', 4);
197
521a6ab0 198/**
93dd2725
RW
199 * PORTFOLIO_ADD_FAKE_URL - hacky way to turn the button class into a url to redirect to
200 * this replaces the old portfolio_fake_add_url function
521a6ab0
PL
201 */
202define('PORTFOLIO_ADD_FAKE_URL', 5);