MDL-80203 courseformat: Fix some typos and PHPDoc
[moodle.git] / lib / portfolio / constants.php
blob0b620143a53916bc75899de56b602504b44a94d6
1 <?php
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.
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/>.
17 /**
18 * This file contains all the defined constants to do with portfolios.
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
25 defined('MOODLE_INTERNAL') || die();
27 //EXPORT STAGE CONSTANTS
30 /**
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.
34 define('PORTFOLIO_STAGE_CONFIG', 1);
36 /**
37 * PORTFOLIO_STAGE_CONFIRM - summarise the form and ask for confirmation
38 * if we skipped PORTFOLIO_STAGE_CONFIG,
39 * just confirm the send.
41 define('PORTFOLIO_STAGE_CONFIRM', 2);
43 /**
44 * PORTFOLIO_STAGE_QUEUEORWAIT - either queue the event and skip to PORTFOLIO_STAGE_FINISHED
46 define('PORTFOLIO_STAGE_QUEUEORWAIT', 3);
48 /**
49 * PORTFOLIO_STAGE_PACKAGE - package up the various bits during this stage both the caller
50 * and the plugin get their package methods called
52 define('PORTFOLIO_STAGE_PACKAGE', 4);
54 /**
55 * PORTFOLIO_STAGE_SEND - the portfolio plugin must send the file
57 define('PORTFOLIO_STAGE_SEND', 5);
59 /**
60 * PORTFOLIO_STAGE_CLEANUP - cleanup the temporary area
62 define('PORTFOLIO_STAGE_CLEANUP', 6);
64 /**
65 * PORTFOLIO_STAGE_FINISHED - display the "finished notification"
67 define('PORTFOLIO_STAGE_FINISHED', 7);
72 // EXPORT FORMAT CONSTANTS
73 // These should always correspond to a string in the portfolio module, called format_{$value}
76 /**
77 * PORTFOLIO_FORMAT_FILE - the most basic fallback format. this should always be supported
78 * in remote system.s
80 define('PORTFOLIO_FORMAT_FILE', 'file');
82 /**
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)
87 define('PORTFOLIO_FORMAT_MBKP', 'mbkp');
89 /**
90 * PORTFOLIO_FORMAT_RICHHTML - like html but with attachments.
92 define('PORTFOLIO_FORMAT_RICHHTML', 'richhtml');
94 /**
95 * PORTFOLIO_FORMAT_PLAINHTML - a single html representation - no attachments
97 define('PORTFOLIO_FORMAT_PLAINHTML', 'plainhtml');
99 /**
100 * PORTFOLIO_FORMAT_IMAGE - subtype of file
102 define('PORTFOLIO_FORMAT_IMAGE', 'image');
105 * PORTFOLIO_FORMAT_VIDEO - subtype of file
107 define('PORTFOLIO_FORMAT_VIDEO', 'video');
110 * PORTFOLIO_FORMAT_TEXT - subtype of file
112 define('PORTFOLIO_FORMAT_TEXT', 'text');
115 * PORTFOLIO_FORMAT_PDF - subtype of file
117 define('PORTFOLIO_FORMAT_PDF', 'pdf');
120 * PORTFOLIO_FORMAT_DOCUMENT - subtype of file
122 define('PORTFOLIO_FORMAT_DOCUMENT', 'document');
125 * PORTFOLIO_FORMAT_SPREADSHEET - subtype of file
127 define('PORTFOLIO_FORMAT_SPREADSHEET', 'spreadsheet');
130 * PORTFOLIO_FORMAT_PRESENTATION - subtype of file
132 define('PORTFOLIO_FORMAT_PRESENTATION', 'presentation');
135 * PORTFOLIO_FORMAT_RICH - just used to say, "we support all these"
137 define('PORTFOLIO_FORMAT_RICH', 'rich');
140 * PORTFOLIO_FORMAT_LEAP2A - supported by mahara and and others {http://wiki.cetis.ac.uk/LEAP_2.0}
142 define('PORTFOLIO_FORMAT_LEAP2A', 'leap2a');
144 // EXPORT TIME LEVELS
145 // These should correspond to a string in the portfolio module, called time_{$value}
148 * PORTFOLIO_TIME_LOW - no delay. don't even offer the user the option
149 * of not waiting for the transfer
151 define('PORTFOLIO_TIME_LOW', 'low');
154 * PORTFOLIO_TIME_MODERATE - a small delay. user can still easily opt to
155 * watch this transfer and wait.
157 define('PORTFOLIO_TIME_MODERATE', 'moderate');
160 * PORTFOLIO_TIME_HIGH - slow. the user really should not be given the option
161 * to choose this.
163 define('PORTFOLIO_TIME_HIGH', 'high');
166 * PORTFOLIO_TIME_FORCEQUEUE - very slow, or immediate transfers not supported
168 define('PORTFOLIO_TIME_FORCEQUEUE', 'queue');
170 // BUTTON FORMATS
171 // Available ways to add the portfolio export to a page
174 * PORTFOLIO_ADD_FULL_FORM - a whole form, containing a drop down menu (where necessary)
175 * and a submit button
177 define('PORTFOLIO_ADD_FULL_FORM', 1);
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
184 define('PORTFOLIO_ADD_ICON_FORM', 2);
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)
190 define('PORTFOLIO_ADD_ICON_LINK', 3);
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)
196 define('PORTFOLIO_ADD_TEXT_LINK', 4);
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
202 define('PORTFOLIO_ADD_FAKE_URL', 5);
205 * PORTFOLIO_ADD_MOODULE_URL - hacky way to turn the button class into a moodle_url to redirect to
206 * this replaces the old portfolio_fake_add_url function
208 define('PORTFOLIO_ADD_MOODLE_URL', 6);