} else {
$ctx = $COURSE->context;
}
- $ret = get_repository_client($ctx);
+ $ret = repository_get_client($ctx);
$suffix = $ret['suffix'];
$str = $this->_getTabs();
$str .= '<input type="hidden" value="" name="'.$this->_attributes['name'].'" id="'.$this->_attributes['id'].'_'.$suffix.'" />';
} else {
$ctx = $COURSE->context;
}
- $ret = get_repository_client($ctx);
+ $ret = repository_get_client($ctx);
$str .= $ret['css'].$ret['js'];
$suffix = $ret['suffix'];
$str .= '<div class="textareaicons">';
picker.
\*******************************************************/
-$ret = get_repository_client();
+$ret = repository_get_client();
?>
</head>
<body class=" yui-skin-sam">
* @param string filepath in file area
* @return array information of file in file pool
*/
-function move_to_filepool($path, $name, $itemid, $filearea = 'user_draft', $filepath = '/') {
+function repository_move_to_filepool($path, $name, $itemid, $filearea = 'user_draft', $filepath = '/') {
global $DB, $CFG, $USER;
$context = get_context_instance(CONTEXT_USER, $USER->id);
$entry = new object();
* @param object context
* @return array
*/
-function get_repository_client($context){
+function repository_get_client($context){
global $CFG, $USER;
$suffix = uniqid();
$strsaveas = get_string('saveas', 'repository').': ';
$path = $repo->get_file($file, $title);
$itemid = (int)substr(hexdec(uniqid()), 0, 9)+rand(1,100);
try {
- $info = move_to_filepool($path, $title, $itemid);
+ $info = repository_move_to_filepool($path, $title, $itemid);
if($env == 'form'){
echo json_encode($info['id']);
} elseif($env == 'editor') {