Skip to content

Commit

Permalink
Merge branch 'MDL-42429_master' of https://github.com/markn86/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Nov 4, 2013
2 parents 8e23283 + 66dbece commit 23f13c5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions mod/lesson/mod_form.php
Expand Up @@ -309,21 +309,15 @@ function definition() {
* @return void
**/
function data_preprocessing(&$default_values) {
global $DB;
global $module;
if (isset($default_values['conditions'])) {
$conditions = unserialize($default_values['conditions']);
$default_values['timespent'] = $conditions->timespent;
$default_values['completed'] = $conditions->completed;
$default_values['gradebetterthan'] = $conditions->gradebetterthan;
}
// after this passwords are clear text, MDL-11090
if (isset($default_values['password']) and ($module->version<2008112600)) {
unset($default_values['password']);
}

if ($this->current->instance) {
// editing existing instance - copy existing files into draft area
// Editing existing instance - copy existing files into draft area.
$draftitemid = file_get_submitted_draft_itemid('mediafile');
file_prepare_draft_area($draftitemid, $this->context->id, 'mod_lesson', 'mediafile', 0, array('subdirs'=>0, 'maxbytes' => $this->course->maxbytes, 'maxfiles' => 1));
$default_values['mediafile'] = $draftitemid;
Expand Down

0 comments on commit 23f13c5

Please sign in to comment.