Can edit files in administration
This commit is contained in:
parent
3f731fb8e0
commit
8e7d652688
4 changed files with 44 additions and 12 deletions
|
|
@ -259,7 +259,10 @@ class Exercice
|
|||
|
||||
foreach ($this->files as $k => $file)
|
||||
{
|
||||
$path = $file['path'];
|
||||
if (!empty($file['path_orig']))
|
||||
$path = $file['path_orig'];
|
||||
else
|
||||
$path = $file['path'];
|
||||
$name = $file['name'];
|
||||
$sha1 = $file['sha1'];
|
||||
|
||||
|
|
@ -296,6 +299,15 @@ class Exercice
|
|||
update(true);
|
||||
}
|
||||
|
||||
function flush_keys()
|
||||
{
|
||||
$db = new BDD();
|
||||
$db->query("DELETE FROM exercice_keys WHERE id_exercice = ".intval($this->id));
|
||||
$db->deconnexion();
|
||||
|
||||
$this->keys = array();
|
||||
}
|
||||
|
||||
function add_key($format, $value)
|
||||
{
|
||||
if ($format == "raw")
|
||||
|
|
|
|||
Reference in a new issue