Commit Graph

105 Commits

Author SHA1 Message Date
Ruslan Kabalin
91a485a040 MDL-65217 core_form: use defined element id for filemanager.
Removing unnamed input element (was introduced in ce47962), this has no
purpose apart of being label destination.
2019-04-29 14:23:27 +02:00
Guillermo Alvarez
e0dac0f4d7 MDL-63231 filepicker: Skype validation for null values
In file_get_all_files_in_draftarea function an integer could get
a null value so it is necessary to execute this function only
when is called with a valid integer value.
2018-09-11 09:03:23 -05:00
Adrian Greeve
f38766e166 MDL-62849 files lib: Add method to return all files.
Added a function which returns all the files from all directories
in the draftarea.
2018-07-17 10:25:11 +08:00
John Okely
320889c02b MDL-59299 filemanager: Display what filetypes are accepted 2017-07-31 09:58:21 +08:00
David Monllao
a2b326c232 Merge branch 'MDL-59544-master-filemanagervalidation' of git://github.com/mudrd8mz/moodle 2017-07-25 11:17:07 +02:00
Vladimir Zhirov
0398bbe675 MDL-59407 folder resource: remember view mode using preference API 2017-07-15 00:46:36 +04:00
David Mudrák
1661204a6c MDL-59544 forms: Implicit validation of the filemanager and filepicker
The patch adds an extra validation step against accepted file types.
Even if the repository checks are bypassed (as illustrated in the
Behat), the invalid file is still caught by the element's validation
rules.

It turns out there is no way to test the filepicker element easily via
Behat. Additionally, it provides the renaming features only with
disabled javascript. So the Behat tests are provided for the filemanager
only.

AMOS BEGIN
 CPY [err_wrongfileextension,mod_workshop],[err_wrongfileextension,core_form]
AMOS END
2017-07-14 20:38:54 +02:00
Damyon Wiese
151b0f9409 MDL-58132 repositories: Controlled link file type
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.

Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.

When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
344321e1ef MDL-55417 forms: Clean up form element template patch
Use a trait and a base mustache template for all form elements to reduce code
duplication and increase standardisation.

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Damyon Wiese
91bda4cd45 MDL-55417 forms: Render form elements with a template
This change allows form elements to be overridden with a mustache template.
The template can even listen for form validation errors and supply the JS to
change the look of the form element when there is/isn't a validation error.

Initial support is for all core form elements including:

text, select, selectyesno and checkboxes, groups, dateselector, datetimeselector,
autocomplete, modvisible, advcheckbox, button, duration, filemanager, filepicker, editor, static, grading,
warning, textarea, password, url, submit, questioncategory, recaptcha.

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Marina Glancy
de5009f4a2 MDL-43948 forms: setting types to filemanager and editor elements 2014-07-08 10:47:29 +01:00
Paul Nicholls
a0dc7da9b4 MDL-29835: filemanager - zero means zero, not unlimited
The form_filemanager constructor was using empty() rather than !isset(),
so overwrote maxfiles=0 with the default (-1).  In addition, the JS UI
treated 0 as unlimited - but the non-JS fallback UI treated it as zero.
This would result in a file manager which allowed files to be
chosen/uploaded, which would then vanish into the void when the backend
saw that the maximum number of files was 0.
2013-01-08 15:12:50 +13:00
Frederic Massart
68acd1157e MDL-33766 files: Improved validation of areamaxbytes 2012-11-01 16:47:06 +08:00
Frederic Massart
21e3ea77a3 MDL-33766 files: Support for userquota/size limit in draft areas 2012-11-01 16:46:42 +08:00
Adrian Greeve
b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Rajesh Taneja
c277b502ab MDL-31294 Forms Library: Removed deprecated functions from forms library 2012-07-24 15:09:39 +08:00
Andrew Davis
845c2ae110 MDL-27156 repositories: switched the file manager and the file picker over to using get_user_max_upload_file_size() 2012-06-14 09:19:26 +07:00
Marina Glancy
e709ddd29c MDL-31901: Allow FileManager to re-use FilePicker JS code for view modes:
- when loading core_filepicker we extend the Node element with functions necessary to display files list in different view modes;
- repository/filepicker.js is changed to use those functions;
- FileManager now has three different view modes (icon view, tree view and table view), JS code is re-used from FilePicker;
- files in FileManager no longer have context menu, they have one popup Widget with different actions instead;
- Added more templates for JS code to FileManager, use similar CSS class names as FilePicker;
- lib/filelib.php : fixed double slashes in path, return more data about files;
- lib/form/filemanager.php : pass information to FileManager about available licenses and default author;
- repository/draftfiles_ajax.php : return information about directory tree for file moving UI in FileManager, return formatted information;
- repository/lib.php : function repository::prepare_listing() now can work also with draftarea files listing;
2012-05-21 11:57:52 +08:00
Marina Glancy
906e7d89a5 MDL-31901: user renderer for filemanager, decrease html generation in filemanager.js and dndupload.js 2012-05-21 11:57:52 +08:00
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Davo Smith
adce023069 MDL-31642 added 'max attachments' to filemanager and 'drag and drop' message inside the box 2012-03-01 11:57:32 +00:00
Sun Zhigang
1ab8cd2e1c MDL-29523 filemanager: Fix a hardcode string 2012-02-27 09:35:11 +08:00
Sam Hemelryk
58b7d48f9a MDL-30974 forms: Last minute phpdoc fixes 2012-02-21 12:39:35 +13:00
Sam Hemelryk
ceaad88222 Merge branch 'wip-mdl-30974' of git://github.com/rajeshtaneja/moodle 2012-02-21 12:07:30 +13:00
Rajesh Taneja
6c1fd30484 MDL-30974 form: Checked and updated docblock for form library 2012-02-15 12:55:06 +08:00
Davo Smith
7d44996c2a MDL-31114 Filemanager drag and drop upload - displays 'drop here' message when dragging over page / highlights when over element 2012-02-14 10:12:58 +00:00
Eloy Lafuente (stronk7)
897e14e263 Merge branch 'MDL-31110_loading_animation' of git://github.com/davosmith/moodle 2012-01-25 01:02:30 +01:00
Davo Smith
4069ae323d MDL-31110 Filemanager drag and drop upload - always hide spinner, even when errors occur 2012-01-19 19:21:27 +00:00
sam marshall
ea47046689 MDL-31153 File manager drag and drop English text improvement 2012-01-19 14:49:21 +00:00
Davo Smith
f08fac7c89 MDL-29766 Add drag and drop upload to filemanager / filepicker elements 2012-01-09 17:27:32 +00:00
Rajesh Taneja
c6aa3670d0 MDL-25937 Froms Library: Added server side validation for filepicker and filemanager 2011-09-29 09:39:44 +08:00
Eloy Lafuente (stronk7)
ac4a2a8c08 MDL-29512 Revert "MDL-25937 Froms Library: Added server side validation for filepicker and filemanager"
This reverts commit f03a17bb09.
2011-09-25 17:13:40 +02:00
Eloy Lafuente (stronk7)
f0e2317087 MDL-29512 Revert "MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both"
This reverts commit 7dfe3c517b.
2011-09-25 17:10:27 +02:00
Rajesh Taneja
7dfe3c517b MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both 2011-09-16 09:17:20 +08:00
Rajesh Taneja
f03a17bb09 MDL-25937 Froms Library: Added server side validation for filepicker and filemanager 2011-09-16 09:17:19 +08:00
Petr Skoda
0958759dc2 MDL-28554 workaround for http://yuilibrary.com/projects/yui3/ticket/2530999
Do not load io-xdr and io-upload-iframe on the same page.
2011-08-25 11:38:34 +02:00
Dongsheng Cai
6d30723e41 MDL-27098
1. Fixed add file language string
2. Fixed hard-coded 'moving' string
3. Fixed hard-coded 'Files' string
2011-04-11 17:09:15 +08:00
Petr Skoda
6ef1402e3d MDL-24650 xhtml strict fix in forms 2010-10-13 17:35:21 +00:00
Dongsheng Cai
18e632593f MDL-24471, FILEMANAGER change <button> to <input type="button" />, moodle form may fire onclick event when enter pressed in other field 2010-10-04 04:09:02 +00:00
Petr Skoda
6bdfef5da9 MDL-24321 switching to standard stdClass() 2010-09-21 08:54:01 +00:00
Dongsheng Cai
c8f0b53409 MDL-23308, fixed maxbytes setting in filemanager 2010-09-13 09:01:27 +00:00
Dongsheng Cai
48041cd505 MDL-23619, fixed max files size in filemanager 2010-09-10 05:44:48 +00:00
Dongsheng Cai
fa7f2a4579 MDL-24108, display max file size in filepicker and filemanager 2010-09-07 10:06:57 +00:00
Dongsheng Cai
7126772325 "MDL-23786, added sesskey and added s() filter" 2010-08-13 06:53:28 +00:00
Dongsheng Cai
563d04175a MDL-23065, fix non js filepicker 2010-08-04 03:57:10 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
Dongsheng Cai
ce47962ed5 MDL-13766, added hidden elements to make label 'for' attribute happly 2010-05-31 05:57:35 +00:00
Dongsheng Cai
4d2ee4c2c0 MDL-16597, move print_filemanager to $OUTPUT->file_manager, now theme designers are able to costomize file manager. 2010-05-19 08:05:36 +00:00
Dongsheng Cai
1dce6261b7 "MDL-21146, adding file license support to repository api, first commit" 2010-03-29 03:39:08 +00:00