Skip to content

Commit

Permalink
MDL-22504 Drag and drop upload course - enables upload of files, text…
Browse files Browse the repository at this point in the history
… and urls to a course page
  • Loading branch information
davosmith committed Apr 30, 2012
1 parent aa753ac commit 32528f9
Show file tree
Hide file tree
Showing 15 changed files with 1,837 additions and 5 deletions.
4 changes: 4 additions & 0 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

require_once($CFG->libdir.'/completionlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/dnduploadlib.php');

define('COURSE_MAX_LOGS_PER_PAGE', 1000); // records
define('COURSE_MAX_RECENT_PERIOD', 172800); // Two days, in seconds
Expand Down Expand Up @@ -4557,4 +4558,7 @@ function include_course_ajax($course, $modules = array(), $config = null) {
foreach ($modules as $module => $modname) {
$PAGE->requires->string_for_js('pluginname', $module);
}

// Load drag and drop upload AJAX.
dndupload_add_to_course($course);
}
39 changes: 39 additions & 0 deletions lang/en/dndupload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Strings for component 'dndupload', language 'en', branch 'master'
*
* @package core
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['actionchoice'] = 'What do you want to do with the file \'{$a}\'?';
$string['addfilehere'] = 'Add file(s) here';
$string['addlinkhere'] = 'Add link here';
$string['addpagehere'] = 'Add page here';
$string['dndworking'] = 'Drag and drop files, text or links onto course sections to upload them';
$string['errorcreatingactivity'] = 'Unable to create an instance of activity \'{$a}\'';
$string['errorfiletoobig'] = 'The file was bigger than the limit of {$a} bytes';
$string['errornouploadrepo'] = 'There is no upload repository enabled for this site';
$string['filetoolarge'] = 'is too large to upload';
$string['nameforlink'] = 'What do you want to call this link?';
$string['nameforpage'] = 'What do you want to call this page?';
$string['noajax'] = 'AJAX course editing must be enabled for drag and drop upload to work';
$string['nofilereader'] = 'Your browser does not support drag and drop upload of files';
$string['noscript'] = 'Javascript must be enabled for drag and drop upload to work';
$string['servererror'] = 'An error occurred whilst communicating with the server';
Loading

0 comments on commit 32528f9

Please sign in to comment.