예제 #1
0
파일: index.php 프로젝트: nikosv/openeclass
$tool_content .= $displayHtml;

$naturalKeys = array('othernatural', 'maths', 'cis', 'phys', 'chem', 'environ', 'biology');
$naturalJSON = generateJSON($naturalKeys);
$agriKeys = array('otheragri', 'agrifor', 'animal', 'agribio', 'rural');
$agriJSON = generateJSON($agriKeys);
$engKeys = array('othereng', 'civil', 'eeeeie', 'mcec', 'mechan', 'chemic', 'mateng', 'medeng', 'enveng', 'architects', 'engecon');
$engJSON = generateJSON($engKeys);
$socKeys = array('othersoc', 'psych', 'edusoc', 'sociology', 'law', 'political', 'ecobi', 'ecogeosoc', 'mediacomm', 'infoscie', 'anthro');
$socJSON = generateJSON($socKeys);
$medKeys = array('othermed', 'basicmed', 'clinicalmed', 'healthsci', 'veterin', 'hcare', 'medbio', 'physedu', 'fnscie');
$medJSON = generateJSON($medKeys);
$humKeys = array('otherhum', 'hisarch', 'langlit', 'philosophy', 'arts', 'pedagogy');
$humJSON = generateJSON($humKeys);
$indepKeys = array('otherinddep', 'milit');
$indepJSON = generateJSON($indepKeys);

$instrFirst = $langCMeta['course_instructor_firstName'];
$instrLast = $langCMeta['course_instructor_lastName'];
$greek = $langCMeta['el'];
$english = $langCMeta['en'];
$instrPhoto = $langCMeta['course_instructor_photo'];
$instrCode = $langCMeta['course_instructor_registrationCode'];

load_js('select2');
$head_content .= <<<EOF
<link rel="stylesheet" type="text/css" href="{$urlAppend}modules/course_metadata/course_metadata.css">
<script type='text/javascript'>
/* <![CDATA[ */
        
    var subThematics = {
예제 #2
0
<?php

$path_to_16 = $argv[1];
$path_to_17 = $argv[2];
$grep = "grep -ri --exclude-dir=.git --exclude-dir=bin --exclude-dir=cache --exclude-dir=modules --exclude-dir=tests --exclude-dir=vendor --exclude=diff-hooks.php --exclude=diff-hooks.html";
exec("{$grep} 'hook h=' " . $path_to_16 . "/themes", $hookHIn16);
exec("{$grep} 'hook h=' " . $path_to_17 . "/themes", $hookHIn17);
exec("{$grep} 'Hook::exec' " . $path_to_16, $hookExecIn16);
exec("{$grep} 'Hook::exec' " . $path_to_17, $hookExecIn17);
$hooks16 = array_merge(getFormattedHookList($hookHIn16, $path_to_16), getFormattedHookList($hookExecIn16, $path_to_16));
$hooks17 = array_merge(getFormattedHookList($hookHIn17, $path_to_17), getFormattedHookList($hookExecIn17, $path_to_17));
ksort($hooks16);
ksort($hooks17);
generateJSON(array_intersect_key($hooks16, $hooks17), array_diff_key($hooks16, $hooks17), array_diff_key($hooks17, $hooks16), $hooks16, $hooks17);
function generateJSON($commonHooks, $hooksOnly16, $hooksOnly17, $hooks16, $hooks17)
{
    $a = file_put_contents('hooks.json', json_encode(['1.6' => $hooks16, '1.7' => $hooks17, 'common' => $commonHooks, '1.6-only' => $hooksOnly16, '1.7-only' => $hooksOnly17], JSON_PRETTY_PRINT));
    exit($a);
}
function generateHTML($commonHooks, $hooksOnly16, $hooksOnly17, $hooks16, $hooks17)
{
    $html = '
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>