Minor - Adapting code comments to phpdoc

skala
Yannick Warnier 14 years ago
parent 0c80565d9c
commit 9f535715a9
  1. 107
      main/exercice/GC.php
  2. 5
      main/exercice/Hpdownload.php
  3. 6
      main/exercice/addlimits.php
  4. 5
      main/exercice/admin.php
  5. 68
      main/exercice/adminhp.php
  6. 4
      main/exercice/exercice.php
  7. 5
      main/exercice/exercise.class.php
  8. 33
      main/exercice/exercise.lib.php
  9. 15
      main/exercice/exercise_admin.php
  10. 13
      main/exercice/exercise_history.php
  11. 4
      main/exercice/exercise_show.php
  12. 4
      main/exercice/exercise_submit.php
  13. 3
      main/exercice/exercise_submit_modal.php
  14. 9
      main/exercice/export/exercise_import.php
  15. 18
      main/exercice/export/qti/qti_export.php
  16. 38
      main/exercice/export/qti2/qti2_classes.php
  17. 27
      main/exercice/export/qti2/qti2_export.php
  18. 21
      main/exercice/export/scorm/scorm_classes.php
  19. 14
      main/exercice/export/scorm/scorm_export.php
  20. 6
      main/exercice/feedback.php
  21. 6
      main/exercice/hotpotatoes.php
  22. 5
      main/exercice/hotspot.inc.php
  23. 5
      main/exercice/hotspot_actionscript.as.php
  24. 6
      main/exercice/hotspot_actionscript_admin.as.php
  25. 15
      main/exercice/hotspot_admin.inc.php
  26. 13
      main/exercice/hotspot_answers.as.php
  27. 6
      main/exercice/hotspot_lang_conversion.php
  28. 11
      main/exercice/hotspot_save.inc.php
  29. 8
      main/exercice/hotspot_savescore.inc.php
  30. 23
      main/exercice/hotspot_updatescore.inc.php
  31. 10
      main/exercice/mark_free_answer.php
  32. 7
      main/exercice/multiple_answer_combination_true_false.class.php
  33. 4
      main/exercice/qti2.php
  34. 5
      main/exercice/question.class.php
  35. 6
      main/exercice/question_admin.inc.php
  36. 8
      main/exercice/question_create.php
  37. 5
      main/exercice/savescores.php
  38. 15
      main/exercice/showinframes.php
  39. 5
      main/exercice/testheaderpage.php
  40. 4
      main/exercice/upload_exercise.php

@ -1,84 +1,67 @@
<?php
/*
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
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.
See "documentation/licence.html" more details.
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
Tel. +32 (2) 211 34 56
*/
/* For licensing terms, see /license.txt */
/**
* Code library for HotPotatoes integration.
* @package dokeos.exercise
* @package chamilo.exercise
* @author Istvan Mandak
* @version $Id: GC.php 20451 2009-05-10 12:02:22Z ivantcholakov $
*/
/**
* Code
*/
// usage: HotPotGC($_configuration['root_sys'],$flag);
// working recursively, flag[0,1] print or delete the HotPotatoes temp files (.t.html)
// usage: HotPotGC($_configuration['root_sys'],$flag);
// working recursively, flag[0,1] print or delete the HotPotatoes temp files (.t.html)
echo "Garbage Collector<BR>";
HotPotGC($_configuration['root_sys'],1,1);
echo "Garbage Collector<BR>";
HotPotGC($_configuration['root_sys'],1,1);
// functions
function HotPotGC($root_sys,$flag,$userID)
{
// flag[0,1] - print or delete the HotPotatoes temp files (.t.html)
$documentPath = $root_sys."courses";
require_once(api_get_path(LIBRARY_PATH)."fileManage.lib.php");
HotPotGCt($documentPath,$flag,$userID);
}
/**
* functions
*/
/**
* Garbage collector
*/
function HotPotGC($root_sys,$flag,$userID) {
// flag[0,1] - print or delete the HotPotatoes temp files (.t.html)
$documentPath = $root_sys."courses";
require_once(api_get_path(LIBRARY_PATH)."fileManage.lib.php");
HotPotGCt($documentPath,$flag,$userID);
}
function HotPotGCt($folder,$flag,$userID)
{ // Garbage Collector
$filelist = array();
function HotPotGCt($folder,$flag,$userID) { // Garbage Collector
$filelist = array();
if ($dir = @opendir($folder)) {
while (($file = readdir($dir)) !== false) {
if ( $file != ".") {
if ($file != "..")
{
{
$full_name = $folder."/".$file;
if (is_dir($full_name))
{
HotPotGCt($folder."/".$file,$flag);
}
else
{
$filelist[] = $file;
if (is_dir($full_name))
{
HotPotGCt($folder."/".$file,$flag);
}
else
{
$filelist[] = $file;
}
}
}
}
closedir($dir);
}
while (list ($key, $val) = each ($filelist))
{
if (stristr($val,$userID.".t.html"))
{ if ($flag == 1)
{
my_delete($folder."/".$val);
}
else
{
echo $folder."/".$val."<br />";
}
}
}
}
?>
while (list ($key, $val) = each ($filelist))
{
if (stristr($val,$userID.".t.html"))
{ if ($flag == 1)
{
my_delete($folder."/".$val);
}
else
{
echo $folder."/".$val."<br />";
}
}
}
}

@ -1,13 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script shows the list of exercises for administrators and students.
* @package chamilo.exercise
* @author Istvan Mandak
* @version $Id: Hpdownload.php 22201 2009-07-17 19:57:03Z cfasanando $
*/
/**
* Code
*/
session_cache_limiter('public');
require_once '../inc/global.inc.php';

@ -6,9 +6,9 @@
* @author
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/*
including the global file
*/
/**
* including the global file
*/
require_once '../inc/global.inc.php';
/*

@ -1,6 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise administration
* This script allows to manage (create, modify) an exercise and its questions
@ -44,7 +43,9 @@
* @package chamilo.exercise
* @author Olivier Brouckaert
*/
/**
* Code
*/
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';

@ -1,33 +1,28 @@
<?php
/* For licensing terms, see /license.txt */
/**
* HotPotatoes administration.
* @package chamilo.exercise
* @author Istvan Mandak
* @version $Id: adminhp.php 20089 2009-04-24 21:12:54Z cvargas1 $
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('exercise.lib.php');
/**
* Code
*/
include 'exercise.class.php';
include 'question.class.php';
include 'answer.class.php';
include 'exercise.lib.php';
// name of the language file that needs to be included
$language_file='exercice';
include('../inc/global.inc.php');
$this_section=SECTION_COURSES;
if(isset($_REQUEST["cancel"]))
{
if($_REQUEST["cancel"]==get_lang('Cancel'))
{
header("Location: exercice.php");
}
if (isset($_REQUEST["cancel"])) {
if ($_REQUEST["cancel"]==get_lang('Cancel')) {
header("Location: exercice.php");
}
}
//$is_courseAdmin = $_SESSION['is_courseAdmin'];
@ -66,20 +61,19 @@ $TBL_REPONSES = Database::get_course_table(TABLE_QUIZ_ANSWER);
$TBL_DOCUMENT = Database::get_course_table(TABLE_DOCUMENT);
$dbTable = $TBL_DOCUMENT;
if(!$is_allowedToEdit)
{
api_not_allowed(true);
if (!$is_allowedToEdit) {
api_not_allowed(true);
}
if (isset($_SESSION['gradebook'])){
$gradebook= $_SESSION['gradebook'];
if (isset($_SESSION['gradebook'])) {
$gradebook= $_SESSION['gradebook'];
}
if (!empty($gradebook) && $gradebook=='view') {
$interbreadcrumb[]= array (
'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
'name' => get_lang('ToolGradebook')
);
$interbreadcrumb[]= array (
'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
'name' => get_lang('ToolGradebook')
);
}
$interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices'));
@ -98,14 +92,12 @@ require_once(api_get_path(SYS_CODE_PATH).'/exercice/hotpotatoes.lib.php');
</h4>
<?php
if(isset($newName))
{
if($newName!="")
{
//alter database record for that test
SetComment($hotpotatoesName,$newName);
echo "<script language='Javascript' type='text/javascript'> window.location='exercice.php'; </script>";
}
if (isset($newName)) {
if ($newName!="") {
//alter database record for that test
SetComment($hotpotatoesName,$newName);
echo "<script language='Javascript' type='text/javascript'> window.location='exercice.php'; </script>";
}
}
echo "<form action=\"".api_get_self()."\" method='post' name='form1'>";
@ -115,10 +107,12 @@ echo "<input type=\"text\" name=\"newName\" value=\"";
$lstrComment = "";
$lstrComment = GetComment($hotpotatoesName);
if($lstrComment=="")
$lstrComment = GetQuizName($hotpotatoesName,$documentPath);
if($lstrComment=="")
$lstrComment = basename($hotpotatoesName,$documentPath);
if ($lstrComment=="") {
$lstrComment = GetQuizName($hotpotatoesName,$documentPath);
}
if ($lstrComment=="") {
$lstrComment = basename($hotpotatoesName,$documentPath);
}
echo $lstrComment;
echo "\" size=40>&nbsp;";

@ -8,7 +8,9 @@
* @author Wolfgang Schneider, code/html cleanup
* @author Julio Montoya <gugli100@gmail.com>, lots of cleanup + several improvements
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = array('exercice','tracking');

@ -1,6 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise class: This class allows to instantiate an object of type Exercise
* @package chamilo.exercise
@ -8,7 +7,9 @@
* @author Julio Montoya Cleaning exercises
* @version $Id: exercise.class.php 22046 2009-07-14 01:45:19Z ivantcholakov $
*/
/**
* Code
*/
define('ALL_ON_ONE_PAGE', 1);
define('ONE_PER_PAGE', 2);
//0=>Feedback , 1=>DirectFeedback, 2=>NoFeedback

@ -1,16 +1,17 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise library
* @todo convert this lib into a static class
* Exercise library
* @todo convert this lib into a static class
*
* shows a question and its answers
* @package chamilo.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 22247 2009-07-20 15:57:25Z ivantcholakov $
* shows a question and its answers
* @package chamilo.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 22247 2009-07-20 15:57:25Z ivantcholakov $
*/
/**
* Code
*/
// The initialization class for the online editor is needed here.
require_once dirname(__FILE__).'/../inc/lib/fckeditor/fckeditor.php';
@ -1187,7 +1188,7 @@ function show_score($score, $weight, $show_percentage = true, $use_platform_sett
/**
* Converts a numeric value in a percentage example 0.66666 to 66.67 %
* @param $value
* @return unknown_type
* @return float Converted number
*/
function convert_to_percentage($value) {
$return = '-';
@ -1427,10 +1428,10 @@ function get_best_attempt_by_user($user_id, $exercise_id, $course_code, $session
/**
* Get average score (NO Exercises in LPs )
* @param int exercise id
* @param int exercise id
* @param string course code
* @param int session id
* @return
* @param int session id
* @return float Average score
*/
function get_average_score($exercise_id, $course_code, $session_id) {
$user_results = get_all_exercise_results($exercise_id, $course_code, $session_id);
@ -1450,10 +1451,10 @@ function get_average_score($exercise_id, $course_code, $session_id) {
/**
* Get average score by score (NO Exercises in LPs )
* @param int exercise id
* @param int exercise id
* @param string course code
* @param int session id
* @return
* @param int session id
* @return float Average score
*/
function get_average_score_by_course($course_code, $session_id) {
$user_results = get_all_exercise_results_by_course($course_code, $session_id, false);
@ -1478,7 +1479,7 @@ function get_average_score_by_course($course_code, $session_id) {
* @param int exercise id
* @param string course code
* @param int session id
* @return
* @return float Best average score
*/
function get_best_average_score_by_exercise($exercise_id, $course_code, $session_id, $user_count) {
$user_results = get_best_exercise_results_by_user($exercise_id, $course_code, $session_id);

@ -1,14 +1,15 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise administration
* This script allows to manage an exercise. It is included from the script admin.php
* @package chamilo.exercise
* @author Olivier Brouckaert
* @version $Id$
* Exercise administration
* This script allows to manage an exercise. It is included from
* the script admin.php
* @package chamilo.exercise
* @author Olivier Brouckaert
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file='exercice';

@ -1,6 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise list: This script shows the list of exercises for administrators and students.
* @package chamilo.exercise
@ -8,8 +7,12 @@
* @author Denes Nagy, HotPotatoes integration
* @author Wolfgang Schneider, code/html cleanup
*/
// name of the language file that needs to be included
/**
* Code
*/
/**
* name of the language file that needs to be included
*/
$language_file='exercice';
require_once '../inc/global.inc.php';
@ -18,7 +21,9 @@ api_protect_course_script(true);
$show=(isset($_GET['show']) && $_GET['show'] == 'result')?'result':'test'; // moved down to fix bug: http://www.dokeos.com/forum/viewtopic.php?p=18609#18609
/* Libraries */
/**
* Libraries
*/
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
//include(api_get_path(LIBRARY_PATH).'mail.lib.inc.php');

@ -10,7 +10,9 @@
* @todo remove the debug code and use the general debug library
* @todo small letters for table variables
* */
/**
* Code
*/
// name of the language file that needs to be included
$language_file = array('exercice');

@ -19,7 +19,9 @@
* @author Olivier Brouckaert
* @author Julio Montoya multiple fill in blank option added (2008) and Cleaning exercises (2010), Adding hotspot delineation support (2011)
*/
/**
* Code
*/
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';

@ -4,6 +4,9 @@
* @package chamilo.exercise
* @author Julio Montoya <gugli100@gmail.com>
*/
/**
* Code
*/
$language_file=array('exercice');
require_once '../inc/global.inc.php';
api_protect_course_script(false);

@ -1,12 +1,13 @@
<?php // $Id: $
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @package dokeos.exercise
* @package chamilo.exercise
* @author claro team <cvs@claroline.net>
*/
/**
* Code
*/
require '../../inc/global.inc.php';

@ -1,18 +1,16 @@
<?php // $Id: $
if ( count( get_included_files() ) == 1 ) die( '---' );
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2007 Dokeos
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @author Claro Team <cvs@claroline.net>
* @author Amand Tihon <amand@alrj.org>
* @author Sebastien Piraux <pir@cerdecam.be>
* @author Yannick Warnier <yannick.warnier@dokeos.com>
*
* @author Yannick Warnier <yannick.warnier@beeznest.com>
* @package chamilo.exercise.qti
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
include dirname(__FILE__) . '/qti_classes.php';
/*--------------------------------------------------------
Classes
@ -30,6 +28,7 @@ include dirname(__FILE__) . '/qti_classes.php';
* - anonymous_attempts
*
* @author Amand Tihon <amand@alrj.org>
* @package chamilo.exercise.qti
*/
class ImsSection
{
@ -176,6 +175,7 @@ class ImsSection
* Every start_*() and corresponding end_*(), as well as export_*() methods return a string.
*
* @warning Attached files are NOT exported.
* @package chamilo.exercise.qti
* @author Amand Tihon <amand@alrj.org>
*/
class ImsItem

@ -1,14 +1,14 @@
<?php // $Id: $
if ( count( get_included_files() ) == 1 ) die( '---' );
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2007 Dokeos
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @author Claro Team <cvs@claroline.net>
* @author Yannick Warnier <yannick.warnier@dokeos.com> - updated ImsAnswerHotspot to match QTI norms
* @package chamilo.exercise
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
// answer types
define('UNIQUE_ANSWER', 1);
define('MCUA', 1);
@ -41,7 +41,10 @@ require_once(api_get_path(SYS_CODE_PATH).'/exercice/fill_blanks.class.php');
//include_once $path . '/../../lib/answer_truefalse.class.php';
//include_once $path . '/../../lib/answer_fib.class.php';
//include_once $path . '/../../lib/answer_matching.class.php';
/**
*
* @package chamilo.exercise
*/
class Ims2Question extends Question
{
/**
@ -87,7 +90,10 @@ class Ims2Question extends Question
return true;
}
}
/**
* Class
* @package chamilo.exercise
*/
class ImsAnswerMultipleChoice extends Answer
{
/**
@ -160,6 +166,10 @@ class ImsAnswerMultipleChoice extends Answer
}
}
/**
* Class
* @package chamilo.exercise
*/
class ImsAnswerFillInBlanks extends Answer
{
/**
@ -288,6 +298,10 @@ class ImsAnswerFillInBlanks extends Answer
}
}
/**
* Class
* @package chamilo.exercise
*/
class ImsAnswerMatching extends Answer
{
/**
@ -377,6 +391,10 @@ class ImsAnswerMatching extends Answer
}
/**
* Class
* @package chamilo.exercise
*/
class ImsAnswerHotspot extends Answer
{
/**
@ -467,6 +485,10 @@ class ImsAnswerHotspot extends Answer
}
}
/**
* Class
* @package chamilo.exercise
*/
class ImsAnswerFree extends Answer
{
/**

@ -1,20 +1,18 @@
<?php // $Id: $
if ( count( get_included_files() ) == 1 ) die( '---' );
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2007 Dokeos
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @author Claro Team <cvs@claroline.net>
* @author Yannick Warnier <yannick.warnier@dokeos.com>
* @author Yannick Warnier <yannick.warnier@beeznest.com>
* @package chamilo.exercise
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
require dirname(__FILE__) . '/qti2_classes.php';
/*--------------------------------------------------------
Classes
--------------------------------------------------------*/
/**
* Classes
*/
// answer types
define(UNIQUE_ANSWER, 1);
define(MULTIPLE_ANSWER, 2);
@ -30,7 +28,8 @@ define(HOT_SPOT_ORDER, 7);
*
* Every start_*() and corresponding end_*(), as well as export_*() methods return a string.
*
* @warning Attached files are NOT exported.
* @note Attached files are NOT exported.
* @package chamilo.exercise
*/
class ImsAssessmentItem
{
@ -158,6 +157,7 @@ class ImsAssessmentItem
* - anonymous_attempts
*
* @author Amand Tihon <amand@alrj.org>
* @package chamilo.exercise
*/
class ImsSection
{
@ -304,6 +304,7 @@ class ImsSection
*
* @warning Attached files are NOT exported.
* @author Amand Tihon <amand@alrj.org>
* @package chamilo.exercise
*/
class ImsItem
{

@ -1,14 +1,14 @@
<?php // $Id: scorm_classes.php,v 1.2 2006/07/06 18:50:49 moosh Exp $
if ( count( get_included_files() ) == 1 ) die( '---' );
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2007 Dokeos
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @author Claro Team <cvs@claroline.net>
* @author Yannick Warnier <yannick.warnier@dokeos.com>
* @author Yannick Warnier <yannick.warnier@beeznest.com>
* @package chamilo.exercise.scorm
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
require_once(api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/question.class.php');
require_once(api_get_path(SYS_CODE_PATH).'exercice/answer.class.php');
@ -46,6 +46,7 @@ define('MULTIPLE_ANSWER_COMBINATION', 9);
* part (the process).
* The two bits are separate to allow for a one-big-javascript and a one-big-html
* files to be built. Each export function thus returns an array of HTML+JS
* @package chamilo.exercise.scorm
*/
class ScormQuestion extends Question
{
@ -168,6 +169,7 @@ class ScormQuestion extends Question
/**
* This class handles the export to SCORM of a multiple choice question
* (be it single answer or multiple answers)
* @package chamilo.exercise.scorm
*/
class ScormAnswerMultipleChoice extends Answer
{
@ -278,6 +280,7 @@ class ScormAnswerMultipleChoice extends Answer
/**
* This class handles the SCORM export of true/false questions
* @package chamilo.exercise.scorm
*/
class ScormAnswerTrueFalse extends Answer
{
@ -335,6 +338,7 @@ class ScormAnswerTrueFalse extends Answer
/**
* This class handles the SCORM export of fill-in-the-blanks questions
* @package chamilo.exercise.scorm
*/
class ScormAnswerFillInBlanks extends Answer
{
@ -407,6 +411,7 @@ class ScormAnswerFillInBlanks extends Answer
/**
* This class handles the SCORM export of matching questions
* @package chamilo.exercise.scorm
*/
class ScormAnswerMatching extends Answer
{
@ -515,6 +520,7 @@ class ScormAnswerMatching extends Answer
/**
* This class handles the SCORM export of free-answer questions
* @package chamilo.exercise.scorm
*/
class ScormAnswerFree extends Answer
{
@ -551,6 +557,7 @@ class ScormAnswerFree extends Answer
}
/**
* This class handles the SCORM export of hotpot questions
* @package chamilo.exercise.scorm
*/
class ScormAnswerHotspot extends Answer
{

@ -1,14 +1,12 @@
<?php // $Id: $
if ( count( get_included_files() ) == 1 ) die( '---' );
/* For licensing terms, see /license.txt */
/**
* @copyright (c) 2007 Dokeos
* @copyright (c) 2001-2006 Universite catholique de Louvain (UCL)
*
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
*
* @author Claro Team <cvs@claroline.net>
* @author Yannick Warnier <yannick.warnier@dokeos.com>
* @package chamilo.exercise.scorm
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
require dirname(__FILE__) . '/scorm_classes.php';

@ -1,13 +1,15 @@
<?php
/* For licensing terms, see /license.txt */
// Note by Ivan Tcholakov, 14-JUL-2009: I can't see where this file is used. Is it obsolete?
/**
* Feedback
* @package dokeos.exercise
* @package chamilo.exercise
* @author
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');

@ -1,13 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Code for HotPotatoes integration.
* @package chamilo.exercise
* @author Istvan Mandak (original author)
*/
/**
* Code
*/
// Name of the language file that needs to be included.
$language_file ='exercice';

@ -1,11 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Hotspot languae conversion
* @package chamilo.exercise
*/
/**
* Code
*/
session_cache_limiter('none');
$language_file = 'hotspot';

@ -2,10 +2,13 @@
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the HotSpot .swf
* @package dokeos.exercise
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
session_cache_limiter("none");
include('exercise.class.php');
include('question.class.php');

@ -2,11 +2,13 @@
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the HotSpot .swf
* @package dokeos.exercise
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');

@ -1,12 +1,15 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script allows to manage answers. It is included from the script admin.php
* @package chamilo.exercise
* @author Toon Keppens
*/
// ALLOWED_TO_INCLUDE is defined in admin.php
* This script allows to manage answers. It is included from the
* script admin.php
* @package chamilo.exercise
* @author Toon Keppens
*/
/**
* Code
* ALLOWED_TO_INCLUDE is defined in admin.php
*/
if (!defined('ALLOWED_TO_INCLUDE')) {
exit();
}

@ -1,11 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the HotSpot .swf
* @package chamilo.exercise
* @author Toon Keppens, Julio Montoya adding hotspot "medical" support
*/
* This file generates the ActionScript variables code used by the
* HotSpot .swf
* @package chamilo.exercise
* @author Toon Keppens, Julio Montoya adding hotspot "medical" support
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');

@ -1,14 +1,14 @@
<?php //$id:$
/* For licensing terms, see /license.txt */
//error_log(__FILE__);
/**
* Hotspot language conversion
* @package chamilo.exercise
* @author
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include_once('../inc/global.inc.php');
$hotspot_lang_file = api_get_path(SYS_LANG_PATH);

@ -1,13 +1,14 @@
<?php //$id:$
/* For licensing terms, see /license.txt */
//error_log(__FILE__);
/**
*
* @package dokeos.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');

@ -1,14 +1,14 @@
<?php //$id:$
/* For licensing terms, see /dokeos_license.txt */
//error_log(__FILE__);
/**
* This file saves every click in the hotspot tool into track_e_hotspots
* @package dokeos.exercise
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');

@ -1,18 +1,18 @@
<?php //$id:$
/* For licensing terms, see /dokeos_license.txt */
//error_log(__FILE__);
/**
* This file saves every click in the hotspot tool into track_e_hotspots
* @package dokeos.exercise
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
/**
* Code
*/
include 'exercise.class.php';
include 'question.class.php';
include 'answer.class.php';
include '../inc/global.inc.php';
$courseCode = $_GET['coursecode'];
@ -21,8 +21,7 @@ $coordinates = $_GET['coord'];
$objExcercise = $_SESSION['objExercise'];
$hotspotId = $_GET['hotspotId'];
$exerciseId = $objExcercise->selectId();
if ($_GET['answerId'] == "0") // click is NOT on a hotspot
{
if ($_GET['answerId'] == "0") { // click is NOT on a hotspot
$hit = 0;
$answerId = $hotspotId;
@ -32,9 +31,7 @@ if ($_GET['answerId'] == "0") // click is NOT on a hotspot
// Save clicking order
//$answerOrderId = count($_SESSION['exerciseResult'][$questionId]['order'])+1;
//$_SESSION['exerciseResult'][$questionId]['order'][$answerOrderId] = $answerId;
}
else // user clicked ON a hotspot
{
} else { // user clicked ON a hotspot
$hit = 1;
$answerId = $hotspotId;

@ -1,19 +1,17 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Free answer marking script
* This script allows a course tutor to mark a student's free answer.
* @package dokeos.exercise
* @package chamilo.exercise
* @author Yannick Warnier <yannick.warnier@dokeos.com>
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*
* @todo respect coding guidelines
*/
/*
INIT SECTION
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file='exercice';

@ -1,13 +1,14 @@
<?php // $Id: document.php 16494 2008-10-10 22:07:36Z yannoo $
/* For licensing terms, see /chamilo_license.txt */
/**
* File containing the MultipleAnswer class.
* @package dokeos.exercise
* @package chamilo.exercise
* @author Eric Marguin
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
if(!class_exists('MultipleAnswerCombinationTrueFalse')):
/**

@ -6,7 +6,9 @@
* @author Ronny Velasquez
* @version $Id: qti2.php 2010-03-12 12:14:25Z $
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = 'exercice';

@ -1,13 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
/**
* File containing the Question class.
* @package chamilo.exercise
* @author Olivier Brouckaert
* @author Julio Montoya <gugli100@gmail.com> lot of bug fixes
*/
/**
* Code
*/
if(!class_exists('Question')):
// answer types

@ -1,6 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Statement (?) administration
* This script allows to manage the statements of questions.
@ -9,8 +8,9 @@
* @author Olivier Brouckaert
* @version $Id: question_admin.inc.php 22126 2009-07-15 22:38:39Z juliomontoya $
*/
/* INIT SECTION */
/**
* Code
*/
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
// ALLOWED_TO_INCLUDE is defined in admin.php

@ -1,6 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise
* @package chamilo.exercise
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file='exercice';

@ -1,13 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Saving the scores.
* @package chamilo.exercise
* @author
* @version $Id: savescores.php 15602 2008-06-18 08:52:24Z pcool $
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = 'learnpath';

@ -1,14 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Code library for HotPotatoes integration.
* @package chamilo.exercise
* @author Istvan Mandak
*/
/* Included libraries */
/**
* Included libraries
*/
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
$time = time();
@ -16,7 +15,9 @@ require_once api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php';
header('Content-Type: text/html; charset='.api_get_system_encoding());
// Initialization
/**
* Initialization
*/
$doc_url = str_replace(array('../', '\\', '\\0', '..'), array('', '', '', ''), urldecode($_GET['file']));
$cid = api_get_course_id();
$document_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
@ -26,7 +27,9 @@ $learnpath_id = $_REQUEST['learnpath_id'];
$learnpath_item_id = $_REQUEST['learnpath_item_id'];
$time = $_REQUEST['time'];
// Read content
/**
* Read content
*/
$full_file_path = $document_path.$doc_url;
my_delete($full_file_path.$_user['user_id'].'.t.html');
$content = ReadFileCont($full_file_path.$_user['user_id'].'.t.html');

@ -2,9 +2,12 @@
/* For licensing terms, see /license.txt */
/**
* Code library for HotPotatoes integration.
* @package dokeos.exercise
* @package chamilo.exercise
* @author Istvan Mandak
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file='exercice';

@ -6,7 +6,9 @@
* Encoding fixes Julio Montoya
* @package chamilo.exercise
*/
// Language files that should be included
/**
* Language files that should be included
*/
$language_file[] = 'learnpath';
$language_file[] = 'exercice';
// setting the help

Loading…
Cancel
Save