Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10513

Import a squence of images into a moodle lesson

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: Lesson
    • Labels:
      None
    • Environment:
      SuSE Linux, PHP 4.4.0, mySQL 4.1.13
    • Affected Branches:
      MOODLE_18_STABLE

      Description

      I wrote a lesson import module for a sequence of images based on the Powerpoint import module. After uploading a zip it will extracted to a temporary folder, and for all images found a lesson page is created. If image filenames contains a number, they will be sort numerical by this number, otherwise ascii (to ensure Powerpoint image exports (Save as->JPEG->All Slides) will handled correctly).
      Maybe it's useful. Files attached. Additional changes:

      1. cvs diff -c edit.php
        Index: edit.php
        ===================================================================
        RCS file: /cvsroot/moodle/moodle/mod/lesson/edit.php,v
        retrieving revision 1.12.2.1
        diff -c -r1.12.2.1 edit.php
          • edit.php 23 Feb 2007 20:17:36 -0000 1.12.2.1
          • edit.php 18 Jul 2007 11:57:18 -0000
            ***************
          • 48,53 ****
          • 48,55 ----
            get_string("importquestions", "lesson")."</a></td></tr><tr><td>".
            "<a href=\"importppt.php?id=$cm->id&pageid=0\">".
            get_string("importppt", "lesson")."</a></td></tr><tr><td>".
            + "<a href=\"importimg.php?id=$cm->id&pageid=0\">".
            + get_string("importimg", "lesson")."</a></td></tr><tr><td>".
            "<a href=\"lesson.php?id=$cm->id&action=addbranchtable&pageid=0&firstpage=1\">".
            get_string("addabranchtable", "lesson")."</a></td></tr><tr><td>".
            "<a href=\"lesson.php?id=$cm->id&action=addpage&pageid=0&firstpage=1\">".
      1. cvs diff -c lesson.php
        Index: lesson.php
        ===================================================================
        RCS file: /cvsroot/moodle/moodle/lang/en_utf8/lesson.php,v
        retrieving revision 1.22.2.2
        diff -c -r1.22.2.2 lesson.php
          • lesson.php 16 Mar 2007 04:33:31 -0000 1.22.2.2
          • lesson.php 18 Jul 2007 12:00:32 -0000
            ***************
          • 298,301 ****
          • 298,302 ----
            $string['yourcurrentgradeisoutof'] = 'Your current grade is $a->grade out of $a->total';
            $string['youshouldview'] = 'You should answer at least: $a';

      + $string['importimg'] = 'Import sequence of images';
      ?>

        Attachments

        1. importimg.html
          0.8 kB
        2. importimg.php
          14 kB
        3. MDL10513 test files.zip
          1.57 MB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              a1x Alexander Fleischer
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: