Procedural File: hotpotatoes.lib.php
Source Location: /main/exercice/hotpotatoes.lib.php
Page Details:
Code library for HotPotatoes integration.
Tags:
CheckImageName [line 312]
mixed CheckImageName(
reference &$imgparams, string $string)
|
|
Look for the image name into an array
Tags:
Parameters
| reference |
&$imgparams |
Reference to an array to search |
| string |
$string |
String to look for |
CheckSubFolder [line 428]
integer CheckSubFolder(
string $path)
|
|
Checks if there are subfolders
Tags:
Parameters
FillFolderName [line 352]
string FillFolderName(
string $name, integer $nsize)
|
|
Fills the folder name up to a certain length with "0"
Tags:
Parameters
| string |
$name |
Original folder name |
| integer |
$nsize |
Length to reach |
GenerateHiddenList [line 270]
string GenerateHiddenList(
array $imgparams)
|
|
Generates a list of hidden fields with the image params given as parameter to this function
Tags:
Parameters
| array |
$imgparams |
List of image parameters |
GenerateHpFolder [line 368]
string GenerateHpFolder(
string $folder)
|
|
Generates the HotPotato folder tree
Tags:
Parameters
| string |
$folder |
Folder path |
GetComment [line 105]
string GetComment(
string $path)
|
|
Gets the comment about a file from the corresponding database record
Tags:
Parameters
GetFileName [line 138]
string GetFileName(
string $fname)
|
|
Get the name of the file from a path (without the extension) This assumes the path is made of elements split by '/', not '\' or '\\'
Tags:
Parameters
GetFolderName [line 402]
string GetFolderName(
string $fname)
|
|
Gets the folder name (strip down path)
Tags:
Parameters
GetFolderPath [line 414]
string GetFolderPath(
string $fname)
|
|
Gets the folder path (withouth the name of the folder itself) ?
Tags:
Parameters
GetImgName [line 181]
string GetImgName(
string $imgtag)
|
|
Gets the name of an img whose path is given (without directories or extensions)
Tags:
Parameters
| string |
$imgtag |
An image tag (<img src="...." ...>) |
GetImgParams [line 243]
void GetImgParams(
string $fname, string $fpath, reference &$imgparams, reference &$imgcount)
|
|
Gets the image parameters from an image path
Parameters
| string |
$fname |
File name |
| string |
$fpath |
File path |
| reference |
&$imgparams |
Reference to a list of image parameters (emptied, then used to return results) |
| reference |
&$imgcount |
Reference to a counter of images (emptied, then used to return results) |
GetQuizName [line 71]
string GetQuizName(
string $fname, string $fpath)
|
|
Gets the title of the quizz file given as parameter
Tags:
Parameters
| string |
$fname |
File name |
| string |
$fpath |
File path |
GetSrcName [line 219]
string GetSrcName(
string $imgtag)
|
|
Gets the source path of an image tag
Tags:
Parameters
| string |
$imgtag |
An image tag |
hotpotatoes_init [line 39]
boolean hotpotatoes_init(
string $baseWorkDir)
|
|
Creates a hotpotato directory If a directory of that name already exists, don't create any. If a file of that name exists, remove it and create a directory
Tags:
Parameters
| string |
$baseWorkDir |
Wanted path |
HotPotGCt [line 454]
void HotPotGCt(
string $folder, integer $flag, integer $userID)
|
|
Hotpotato Garbage Collector
Tags:
Parameters
| string |
$folder |
Path |
| integer |
$flag |
Flag |
| integer |
$userID |
User id |
myarraysearch [line 288]
mixed myarraysearch(
reference &$array, string $node)
|
|
Searches for a node in the given array
Tags:
Parameters
| reference |
&$array |
Reference to the array to search |
| string |
$node |
Node we are looking for in the array |
ReadFileCont [line 150]
string ReadFileCont(
string $full_file_path)
|
|
Reads the file contents into a string
Tags:
Parameters
| string |
$full_file_path |
Urlencoded path |
ReplaceImgTag [line 323]
string ReplaceImgTag(
string $content)
|
|
Replaces an image tag by ???
Tags:
Parameters
| string |
$content |
The content to replace |
SetComment [line 123]
string SetComment(
string $path, string $comment)
|
|
Sets the comment in the database for a particular path
Tags:
Parameters
| string |
$path |
File path |
| string |
$comment |
Comment to set |
WriteFileCont [line 166]
void WriteFileCont(
string $full_file_path, string $content)
|
|
Writes the file contents into the file given
Parameters
| string |
$full_file_path |
Urlencoded path |
| string |
$content |
The file contents |
|