Beispiel #1
0
                    $tool_content .= "<td class='text-center'>" . icon('fa-save', $dload_msg, $download_url) . "</td>";
                }
            }
            $tool_content .= "</tr>";
        }
    }
    $tool_content .= "</table>\n            </div>\n        </div>\n    </div>";
    if ($can_upload && !$is_in_tinymce) {
        $tool_content .= "<br><div class='text-right'>{$langMaxFileSize} " . ini_get('upload_max_filesize') . "</div>";
    }
}
if (defined('SAVED_COURSE_CODE')) {
    $course_code = SAVED_COURSE_CODE;
    $course_id = SAVED_COURSE_ID;
}
add_units_navigation(TRUE);
draw($tool_content, $menuTypeID, null, $head_content);
function select_proper_filters($requestDocsFilter)
{
    $filter = '';
    $compatiblePlugin = true;
    switch ($requestDocsFilter) {
        case 'image':
            $ors = '';
            foreach (MultimediaHelper::getSupportedImages() as $imgfmt) {
                $ors .= " OR format LIKE '{$imgfmt}'";
            }
            $filter = "AND (format LIKE '.dir' {$ors})";
            break;
        case 'eclmedia':
            $ors = '';
Beispiel #2
0
 * Contact address: GUnet Asynchronous eLearning Group,
 *                  Network Operations Center, University of Athens,
 *                  Panepistimiopolis Ilissia, 15784, Athens, Greece
 *                  e-mail: info@openeclass.org
 * ======================================================================== */

$require_current_course = true;
$require_login = true;
$require_help = true;
$helpTopic = 'For';
require_once '../../include/baseTheme.php';
require_once 'include/log.php';
require_once 'modules/group/group_functions.php';
require_once 'modules/search/indexer.class.php';

if (!add_units_navigation(true)) {
    $navigation[] = array('url' => "index.php?course=$course_code", 'name' => $langForums);
}

require_once 'modules/forum/config.php';
require_once 'modules/forum/functions.php';

if ($is_editor) {
    load_js('tools.js');
}
$toolName = $langForums;

$paging = true;
$next = 0;
if (isset($_GET['forum'])) {
    $forum_id = intval($_GET['forum']);
  - re-use a module of the same course
  - remove modules from learning path (it doesn't delete it ! )
  - change locking , visibility, order
  - access to config page of modules in this learning path

  @Comments:
  ==============================================================================
 */
$require_current_course = TRUE;
require_once '../../include/baseTheme.php';
require_once 'include/lib/learnPathLib.inc.php';
require_once 'include/lib/fileDisplayLib.inc.php';
require_once 'include/log.php';
$body_action = '';
$dialogBox = '';
if (!add_units_navigation()) {
    $pageName = $langAdm;
    $navigation[] = array("url" => "index.php?course={$course_code}", "name" => $langLearningPaths);
}
// $_SESSION
if (isset($_GET['path_id']) && $_GET['path_id'] > 0) {
    $_SESSION['path_id'] = intval($_GET['path_id']);
}
// get user out of here if he is not allowed to edit
if (!$is_editor) {
    if (isset($_SESSION['path_id'])) {
        header("Location: ./learningPath.php?course={$course_code}&path_id=" . $_SESSION['path_id']);
    } else {
        header("Location: ./index.php?course={$course_code}");
    }
    exit;
Beispiel #4
0
        $navigation[] = array('url' => "learningPathAdmin.php?course=$course_code&amp;path_id=" . (int) $_SESSION['path_id'],
            'name' => $langAdm);
    }
}

if (isset($_GET['path_id']) && $_GET['path_id'] != '') {
    $_SESSION['path_id'] = intval($_GET['path_id']);
}
// module_id
if (isset($_GET['module_id']) && $_GET['module_id'] != '') {
    $_SESSION['lp_module_id'] = intval($_GET['module_id']);
}


$lp = Database::get()->querySingle("SELECT name, visible FROM lp_learnPath WHERE learnPath_id = ?d AND `course_id` = ?d", $_SESSION['path_id'], $course_id);
if (!add_units_navigation() && !$is_editor) {
    $navigation[] = array("url" => "learningPath.php?course=$course_code&amp;path_id=" . (int) $_SESSION['path_id'], "name" => $lp->name);
}

if (!$is_editor && $lp->visible == 0) {
    // if the learning path is invisible, don't allow users in it
    header("Location: ./index.php?course=$course_code");
    exit();
}

check_LPM_validity($is_editor, $course_code);

// main page
// FIRST WE SEE IF USER MUST SKIP THE PRESENTATION PAGE OR NOT
// triggers are : if there is no introdution text or no user module progression statistics yet and user is not admin,
// then there is nothing to show and we must enter in the module without displaying this page.
Beispiel #5
0
$helpTopic = 'Usage';
$require_login = true;
require_once '../../include/baseTheme.php';
require_once "statistics_tools_bar.php";

load_js('tools.js');
load_js('bootstrap-datetimepicker');

$head_content .= "<script type='text/javascript'>
        $(function() {
            $('#user_date_start, #user_date_end').datetimepicker({
                format: 'dd-mm-yyyy hh:ii',
                pickerPosition: 'bottom-left',
                language: '".$language."',
                autoclose: true    
            });            
        });
    </script>";

statistics_tools($course_code, "index");

$pageName = $langUsage;

$made_chart = true;
ob_start();
require_once "results.php";
require_once "form.php";

add_units_navigation(true);
draw($tool_content, 2, null, $head_content);
Beispiel #6
0
    }
    if ($last_post_in_thread == $this_post_time) {
        $topic_time_fixed = $last_post_in_thread;
        $sql = "UPDATE forum_topic\n\t\t\tSET topic_time = '{$topic_time_fixed}'\n\t\t\tWHERE id = {$topic}";
    }
    $tool_content .= "<div class='alert alert-success'>{$langDeletedMessage}</div>";
}
if ($paging and $total > $posts_per_page) {
    $times = 0;
    for ($x = 0; $x < $total; $x += $posts_per_page) {
        $times++;
    }
    $pages = $times;
}
$topic_subject = Database::get()->querySingle("SELECT title FROM forum_topic WHERE id = ?d", $topic)->title;
if (!add_units_navigation(TRUE)) {
    $navigation[] = array('url' => "index.php?course={$course_code}", 'name' => $langForums);
    $navigation[] = array('url' => "viewforum.php?course={$course_code}&amp;forum={$forum}", 'name' => q($forum_name));
}
$pageName = q($topic_subject);
if (isset($_SESSION['message'])) {
    $tool_content .= $_SESSION['message'];
    unset($_SESSION['message']);
}
if ($topic_locked == 1) {
    $tool_content .= "<div class='alert alert-warning'>{$langErrorTopicLocked}</div>";
} else {
    $tool_content .= action_bar(array(array('title' => $langReply, 'url' => "reply.php?course={$course_code}&amp;topic={$topic}&amp;forum={$forum}", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success'), array('title' => $langBack, 'url' => "viewforum.php?course={$course_code}&forum={$forum}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
}
if ($paging and $total > $posts_per_page) {
    $times = 1;
Beispiel #7
0
       GROUP BY LPM.`module_id`
       ORDER BY LPM.`rank`";

$fetchedList = Database::get()->queryArray($sql, $_SESSION['path_id'], $course_id);

$tool_content .= action_bar(array(
            array('title' => $langBack,
                'url' => "index.php?course=$course_code",
                'icon' => 'fa-reply',
                'level' => 'primary-label'
            )
        ));

if (count($fetchedList) == 0) {
    $tool_content .= "<div class='alert alert-warning'>$langNoModule</div>";
    add_units_navigation();
    draw($tool_content, 2);
    exit();
}

$extendedList = array();
$modar = array();
foreach ($fetchedList as $module) {
    $modar['learnPath_module_id'] = $module->learnPath_module_id;
    $modar['parent'] = $module->parent;
    $modar['lock'] = $module->lock;
    $modar['module_id'] = $module->module_id;
    $modar['contentType'] = $module->contentType;
    $modar['name'] = $module->name;
    $modar['lesson_status'] = $module->lesson_status;
    $modar['raw'] = $module->raw;