Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Resource module file API migration: Difference between revisions

From MoodleDocs
No edit summary
Line 9: Line 9:


=Types of resources=
=Types of resources=
* Directory of files
* Resource page - using new editor element
* Resource page - using new editor element
* External resource link - some file stored elsewhere
* External resource link - some file stored elsewhere
* Single uploaded images and files
* Single uploaded images and files
* Packages and uploaded html files
* Packages and uploaded html files
* Directory of files
* Other 3rd party plugins
* Other 3rd party plugins


=Upgrade problems=
=Upgrade planning=
* Migration of files used by resources to resource file areas (linked files mainly)
Each type requires different upgrade code.
* Should we split resource into multiple modules and delegate more work to Repositories?
 
* Current repository/file api does not have suitable UI for selection of main/index file in case of packages and uploaded html files.
==Directory type==
# Recursively copy directory to resource area, skip backup and moddata contents
 
==Text and web page==
# Convert to one plug-in using new editor forms element
# Copy directly linked files that may not contain other relative links to resource area
# PROBLEM: deal somehow with html, flash, and java; maybe just warn and manual migration button
 
==Links to files==
# Links to external sites do not need any upgrade
# If link points to simple file (image, sound, pdf.) copy to resource area
# PROBLEM: links to different courses - already problem now, maybe just warn teachers
# PROBLEM: links to files that may contain other relative links (html, flash, java)
 
==IMS type==
# copy files to resource area
 
==hive==
# PROBLEM: remove from core completely?
 
==3rd party==
# ignore


=See also=
=See also=

Revision as of 20:07, 12 May 2009

Moodle 2.0


Current problems

  • text and html resource types separate
  • embedded images and files in general are stored in course files without appropriate access control
  • local files and Internet links mixed
  • is IMS plug-in maintained?
  • repository plug-in obsoleted

Types of resources

  • Directory of files
  • Resource page - using new editor element
  • External resource link - some file stored elsewhere
  • Single uploaded images and files
  • Packages and uploaded html files
  • Other 3rd party plugins

Upgrade planning

Each type requires different upgrade code.

Directory type

  1. Recursively copy directory to resource area, skip backup and moddata contents

Text and web page

  1. Convert to one plug-in using new editor forms element
  2. Copy directly linked files that may not contain other relative links to resource area
  3. PROBLEM: deal somehow with html, flash, and java; maybe just warn and manual migration button

Links to files

  1. Links to external sites do not need any upgrade
  2. If link points to simple file (image, sound, pdf.) copy to resource area
  3. PROBLEM: links to different courses - already problem now, maybe just warn teachers
  4. PROBLEM: links to files that may contain other relative links (html, flash, java)

IMS type

  1. copy files to resource area

hive

  1. PROBLEM: remove from core completely?

3rd party

  1. ignore

See also