NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
<?php ///Class file for text field, extends field_picture
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// //
|
|
|
|
// NOTICE OF COPYRIGHT //
|
|
|
|
// //
|
|
|
|
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
|
|
|
// http://moodle.org //
|
|
|
|
// //
|
|
|
|
// Copyright (C) 2005 Martin Dougiamas http://dougiamas.com //
|
|
|
|
// //
|
|
|
|
// This program 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 2 of the License, or //
|
|
|
|
// (at your option) any later version. //
|
|
|
|
// //
|
|
|
|
// This program 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: //
|
|
|
|
// //
|
|
|
|
// http://www.gnu.org/copyleft/gpl.html //
|
|
|
|
// //
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/// Please refer to lib.php for method comments
|
|
|
|
global $CFG;
|
|
|
|
|
|
|
|
//load base class
|
|
|
|
require_once($CFG->dirroot.'/mod/data/lib.php');
|
|
|
|
|
|
|
|
class data_field_file extends data_field_base {// extends
|
|
|
|
|
|
|
|
function data_field_file($fid=0){
|
|
|
|
parent::data_field_base($fid);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* the content field is store as this
|
|
|
|
* content = a ## b where a is the filename,
|
|
|
|
* b is the display file name
|
|
|
|
*/
|
|
|
|
|
|
|
|
var $type = 'file';
|
|
|
|
var $id;
|
|
|
|
|
2006-02-09 04:44:56 +00:00
|
|
|
function insert_field($dataid, $type='file', $name, $des) {
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
$newfield = new object;
|
|
|
|
$newfield->dataid = $dataid;
|
|
|
|
$newfield->type = $type;
|
|
|
|
$newfield->name = $name;
|
|
|
|
$newfield->description = $des;
|
|
|
|
if (!insert_record('data_fields',$newfield)){
|
|
|
|
notify('Insertion of new field failed!');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function display_add_field($id, $rid=0){
|
|
|
|
global $CFG, $course;
|
|
|
|
if (!$field = get_record('data_fields','id',$id)){
|
|
|
|
notify("that is not a valid field id!");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($rid){
|
|
|
|
|
|
|
|
$datacontent = get_record('data_content','fieldid',$id,'recordid',$rid);
|
|
|
|
if (isset($datacontent->content)){
|
|
|
|
$content = $datacontent->content;
|
2006-01-31 04:25:46 +00:00
|
|
|
$contents[0] = $datacontent->content;
|
|
|
|
$contents[1] = $datacontent->content1;
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
}else {
|
|
|
|
$contents = array();
|
|
|
|
$contents[0]='';
|
|
|
|
$contents[1]='';
|
|
|
|
}
|
|
|
|
|
|
|
|
$src = empty($contents[0])? '':$contents[0];
|
|
|
|
$name = empty($contents[1])? $src:$contents[1];
|
|
|
|
$displayname = empty($contents[1])? '':$contents[1];
|
|
|
|
|
|
|
|
if ($CFG->slasharguments) {
|
|
|
|
$source = $CFG->wwwroot.'/file.php/'.$course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$rid;
|
|
|
|
} else {
|
|
|
|
$source = $CFG->wwwroot.'/file.php?file=/'.$course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$rid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$displayname = '';
|
|
|
|
$name = '';
|
|
|
|
$src = '';
|
|
|
|
$source = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$str = '';
|
2006-02-09 04:44:56 +00:00
|
|
|
/*
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
if ($field->description){
|
|
|
|
$str .= '<img src="'.$CFG->pixpath.'/help.gif" alt="'.$field->description.'" title="'.$field->description.'"> ';
|
|
|
|
}
|
2006-02-09 04:44:56 +00:00
|
|
|
*/
|
|
|
|
$str .= '<div title="' . $field->description . '">';
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
$str .= '<input type="hidden" name ="field_'.$field->id.'_0" id="field_'.$field->id.'"_0 value="fakevalue" />';
|
2006-02-09 04:44:56 +00:00
|
|
|
$str .= get_string('file','data'). ': <input type="file" name ="field_'.$field->id.'" id="field_'.$field->id.'" title="'.$field->description.'" /><br />';
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
$str .= get_string('optionalfilename','data').': <input type="text" name="field_'
|
|
|
|
.$field->id.'_1" id="field_'.$field->id.'_1" value="'.$displayname.'" /><br />';
|
|
|
|
$str .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.$field->param4.'" />';
|
2006-02-09 04:44:56 +00:00
|
|
|
$str .= '</div>';
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
|
|
|
|
//print icon
|
|
|
|
if ($rid and isset($content)){
|
|
|
|
require_once($CFG->libdir.'/filelib.php');
|
|
|
|
$icon = mimeinfo('icon', $src);
|
|
|
|
$str .= '<img align="absmiddle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" /> '.
|
|
|
|
'<a href="'.$source.'/'.$src.'" >'.$name.'</a>';
|
|
|
|
}
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
|
|
|
|
function display_edit_field($id, $mode=0){
|
|
|
|
parent::display_edit_field($id, $mode);
|
|
|
|
}
|
|
|
|
|
2006-02-06 02:49:46 +00:00
|
|
|
function display_browse_field($fieldid, $recordid, $template) {
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
|
|
|
|
global $CFG, $USER, $course;
|
|
|
|
|
|
|
|
$field = get_record('data_fields', 'id', $fieldid);
|
|
|
|
|
|
|
|
if ($content = get_record('data_content', 'fieldid', $fieldid, 'recordid', $recordid)){
|
2006-01-31 04:25:46 +00:00
|
|
|
$contents[0] = $content->content;
|
|
|
|
$contents[1] = $content->content1;
|
|
|
|
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
$src = empty($contents[0])? '':$contents[0];
|
|
|
|
$name = empty($contents[1])? $src:$contents[1];
|
|
|
|
|
|
|
|
|
|
|
|
if ($CFG->slasharguments) {
|
|
|
|
$source = $CFG->wwwroot.'/file.php/'.$course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$recordid;
|
|
|
|
} else {
|
|
|
|
$source = $CFG->wwwroot.'/file.php?file=/'.$course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$recordid;
|
|
|
|
}
|
|
|
|
|
|
|
|
$width = $field->param1 ? ' width = "'.$field->param1.'" ':' ';
|
|
|
|
$height = $field->param2 ? ' height = "'.$field->param2.'" ':' ';
|
|
|
|
|
|
|
|
require_once($CFG->libdir.'/filelib.php');
|
|
|
|
$icon = mimeinfo('icon', $src);
|
|
|
|
$str = '<img align="absmiddle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" /> '.
|
|
|
|
'<a href="'.$source.'/'.$src.'" >'.$name.'</a>';
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function update($fieldobject){
|
|
|
|
if (!update_record('data_fields',$fieldobject)){
|
|
|
|
notify ('upate failed');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function store_data_content($fieldid, $recordid, $value, $name=''){
|
|
|
|
global $CFG, $course;
|
|
|
|
|
|
|
|
$content = new object;
|
|
|
|
$content->fieldid = $fieldid;
|
|
|
|
$content->recordid = $recordid;
|
|
|
|
|
|
|
|
$field = get_record('data_fields','id',$fieldid);
|
|
|
|
|
|
|
|
$names = explode('_',$name);
|
|
|
|
switch ($names[2]){
|
|
|
|
case 0: //file just uploaded
|
|
|
|
$filename = $_FILES[$names[0].'_'.$names[1]];
|
|
|
|
$filename = $filename['name'];
|
|
|
|
$dir = $course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$recordid;
|
|
|
|
|
|
|
|
/************ FILE MANAGER HERE ***************/
|
|
|
|
require_once('../../lib/uploadlib.php');
|
|
|
|
|
|
|
|
$um = new upload_manager($names[0].'_'.$names[1],true,false,$course,false,$field->param3);
|
|
|
|
if ($um->process_file_uploads($dir)) { //write to content
|
|
|
|
$newfile_name = $um->get_new_filename();
|
2006-01-31 04:25:46 +00:00
|
|
|
$content->content = $newfile_name;
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
insert_record('data_content',$content);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 1: //only changing alt tag
|
|
|
|
if ($oldcontent = get_record('data_content','fieldid', $fieldid, 'recordid', $recordid)){
|
|
|
|
$content->id = $oldcontent ->id;
|
2006-01-31 04:25:46 +00:00
|
|
|
$content->content1 = clean_param($value, PARAM_NOTAGS);
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
update_record('data_content',$content);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
} //close switch
|
|
|
|
}
|
|
|
|
|
|
|
|
function update_data_content($fieldid, $recordid, $value, $name){
|
|
|
|
//if data_content already exit, we update
|
|
|
|
global $CFG,$course;
|
|
|
|
if ($oldcontent = get_record('data_content','fieldid', $fieldid, 'recordid', $recordid)){
|
|
|
|
|
|
|
|
$content = new object;
|
|
|
|
$content->fieldid = $fieldid;
|
|
|
|
$content->recordid = $recordid;
|
2006-01-31 04:25:46 +00:00
|
|
|
$content->id = $oldcontent->id;
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
$names = explode('_',$name);
|
|
|
|
|
|
|
|
$field = get_record('data_fields','id',$fieldid);
|
2006-01-31 04:25:46 +00:00
|
|
|
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
switch ($names[2]){
|
|
|
|
case 0: //file just uploaded
|
|
|
|
$filename = $_FILES[$names[0].'_'.$names[1]];
|
|
|
|
$filename = $filename['name'];
|
|
|
|
|
|
|
|
$dir = $course->id.'/'.$CFG->moddata.'/data/'.$field->dataid.'/'.$field->id.'/'.$recordid;
|
|
|
|
|
|
|
|
//only use the manager if file is present, to avoid "are you sure you selected a file to upload" msg
|
|
|
|
if ($filename){
|
|
|
|
/************ FILE MANAGER HERE ***************/
|
|
|
|
require_once('../../lib/uploadlib.php');
|
|
|
|
$um = new upload_manager($names[0].'_'.$names[1],true,false,$course,false,$field->param3);
|
|
|
|
if ($um->process_file_uploads($dir)) {
|
|
|
|
//write to content
|
|
|
|
$newfile_name = $um->get_new_filename();
|
2006-01-31 04:25:46 +00:00
|
|
|
$content->content = $newfile_name;
|
|
|
|
$content->content1 = $oldcontent->content1;
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
update_record('data_content',$content);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 1: //only changing alt tag
|
2006-01-31 04:25:46 +00:00
|
|
|
$content->content = $oldcontent->content;
|
|
|
|
$content->content1 = clean_param($value, PARAM_NOTAGS);
|
|
|
|
update_record('data_content', $content);
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
} //close switch
|
|
|
|
}
|
|
|
|
else { //make 1 if there isn't one already
|
|
|
|
$this->store_data_content($fieldid, $recordid, $value, $name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function notemptyfield($value, $name){
|
|
|
|
$names = explode('_',$name);
|
|
|
|
if ($names[2] == '0'){
|
|
|
|
$filename = $_FILES[$names[0].'_'.$names[1]];
|
|
|
|
return !empty($filename['name']); //if there's a file in $_FILES, not empty
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2006-02-06 09:13:37 +00:00
|
|
|
|
|
|
|
function delete_data_contents() {
|
|
|
|
// Delete the content files first.
|
|
|
|
$sql = 'SELECT dc.content AS content, '.
|
|
|
|
'df.dataid AS dataid, '.
|
|
|
|
'dc.recordid AS recordid '.
|
|
|
|
'FROM data_fields AS df, '.
|
|
|
|
'data_content AS dc '.
|
|
|
|
"WHERE df.id = {$this->id} ".
|
|
|
|
"AND dc.fieldid = {$this->id}";
|
|
|
|
|
|
|
|
if (!$results = recordset_to_array(get_recordset_sql($sql))) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
foreach ($results as $result) {
|
|
|
|
$this->delete_data_content_files($result->dataid, $result->recordid, $result->content);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Then delete the data_content records.
|
|
|
|
return delete_records('data_content', 'fieldid', $this->id);
|
|
|
|
}
|
|
|
|
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
function delete_data_content_files($dataid, $recordid, $content){
|
|
|
|
global $CFG, $course;
|
|
|
|
$filepath = $CFG->dataroot.'/'.$course->id.'/'.$CFG->moddata.'/data/'.$dataid.'/'.$this->id.'/'.$recordid;
|
2006-01-31 04:25:46 +00:00
|
|
|
unlink($filepath . '/' . $content);
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
rmdir($filepath);
|
2006-02-09 04:44:56 +00:00
|
|
|
notify (get_string('file', 'data') . ' ' . $content . ' ' . get_string('deleted', 'data'));
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|