~ubuntu-branches/ubuntu/natty/moodle/natty

« back to all changes in this revision

Viewing changes to mod/lesson/importppt.php

  • Committer: Bazaar Package Importer
  • Author(s): Tomasz Muras
  • Date: 2010-10-30 12:19:28 UTC
  • mfrom: (1.1.12 upstream) (3.1.10 squeeze)
  • Revision ID: james.westby@ubuntu.com-20101030121928-qzobi6mctpnk4dif
Tags: 1.9.9.dfsg2-2
* Added Romanian translation
* Updated Japanese translation (closes: #596820)
* Backporting security fixes from Moodle 1.9.10 (closes: #601384)
   - Updated embedded CAS to 1.1.3
   - Added patch for MDL-24523:
     clean_text() not filtering text in markdown format
   - Added patch for MDL-24810 and upgraded customized HTML Purifier to 4.2.0 
   - Added patch for MDL-24258:
     students can delete their forum posts later than $CFG->maxeditingtime 
     under certain conditions
   - Added patch for MDL-23377:
     Can't delete quiz attempts in course without enrolled students

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php // $Id: importppt.php,v 1.22.2.2 2008/07/10 09:48:47 scyrma Exp $
 
1
<?php // $Id: importppt.php,v 1.22.2.3 2009/05/06 16:10:15 skodak Exp $
2
2
/**
3
3
 * This is a very rough importer for powerpoint slides
4
4
 * Export a powerpoint presentation with powerpoint as html pages
8
8
 * 
9
9
 * The script supports book and lesson.
10
10
 *
11
 
 * @version $Id: importppt.php,v 1.22.2.2 2008/07/10 09:48:47 scyrma Exp $
 
11
 * @version $Id: importppt.php,v 1.22.2.3 2009/05/06 16:10:15 skodak Exp $
12
12
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
13
13
 * @package lesson
14
14
 **/
126
126
    $path_parts = pathinfo($zipfile);
127
127
    $dirname = substr($zipfile, 0, strpos($zipfile, '.'.$path_parts['extension'])); // take off the extension
128
128
    if (!file_exists($base.$dirname)) {
129
 
        mkdir($base.$dirname);
 
129
        mkdir($base.$dirname, $CFG->directorypermissions);
130
130
    }
131
131
 
132
132
    // move our uploaded file to temp/lesson
204
204
    while(true) {
205
205
        if (!file_exists($imagedir.'/'.$lessonname.$i)) {
206
206
            // ok doesnt exist so make the directory and update our paths
207
 
            mkdir($imagedir.'/'.$lessonname.$i);
 
207
            mkdir($imagedir.'/'.$lessonname.$i, $CFG->directorypermissions);
208
208
            $imagedir = $imagedir.'/'.$lessonname.$i;
209
209
            $imagelink = $imagelink.'/'.$lessonname.$i;
210
210
            break;