shuffle($pages);
- echo wsDocument::isFarmUser() ? 'farm' : 'not farm' . "\n";
-
foreach ($pages as $page) {
foreach ($files as $file) {
//echo ($force ? '!' : '') . $page . "-" . implode(',' . $file) . "\n";
}
$allPages = range(1, $count);
- $coef =4;
+ $coef = 4;
$it = round($coef * max(4, min(12, ceil($count / 20))));
shuffle($allPages);
public static function matomo()
{
- require_once ROOT.'/vendor/autoload.php';
+ require_once ROOT . '/vendor/autoload.php';
set_time_limit(0);
$reporting6 = new \Cubist\Matomo\Reporting('https://stats6.fluidbook.com/', '16f4c1d77cdc4792b807718388db96a0');
for ($i = 2; $i <= 40000; $i++) {
foreach ($files as $file) {
echo '<h2>' . json_encode($file) . '</h2>';
- $path = $doc->getFile($page, $file[0], $file[1],85, $file[2], $file[3], $file[4], true);
+ $path = $doc->getFile($page, $file[0], $file[1], 85, $file[2], $file[3], $file[4], true);
echo '<p>' . $path . '</p>';
$path = str_replace('/data1/extranet/www/', 'https://workshop.fluidbook.com/', $path);
$path = str_replace('/home/extranet/www/', 'https://workshop.fluidbook.com/', $path);
}
foreach ($liste as $id => $book) {
+ $v2 = $book->version == 2;
+
$odd = cubeMath::isOdd($i) ? ' class="odd"' : '';
$res .= '<tr' . $odd . '>';
$res .= '<td>' . $book->book_id . '</td>';
}
$res .= '<td class="bouton"><a href="/' . $defaultPlayer . '/' . $book->book_id . '_' . $book->hash . '/" class="openContextMenu voir btbook" data-type="' . implode(',', $types) . '" rel="' . $context_view_id . '" rev="' . $book->book_id . '§' . $book->hash . '§' . TIME . '">' . $btVoir . '</a></td>';
- $res .= '<td class="bouton"><a class="popupFSBar edit btbook" rel="toolbar=yes" rev="editor_' . $book->book_id . '" href="' . SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash . '">' . $btEdit . '</a></td>';
+
+ $res .= '<td class="bouton">';
+ if ($v2) {
+ $res .= '<a class="popupFSBar edit btbook" rel="toolbar=yes" rev="editor_' . $book->book_id . '" href="' . SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash . '">' . $btEdit . '</a>';
+ }
+ $res .= '</td>';
} else {
$res .= '<td></td><td></td>';
}
$res .= '<td class="bouton"><a href="' . SITE_PATH . 'stats/' . $book->book_id . '_' . $book->hash . '" class="normallink stats btbook">' . $btStats . '</a></td>';
if ($report) {
$res .= '<td class="bouton"><a href="/yslReport/' . $book->book_id . '" class="download btbook"><div></div><span>' . __('feedback') . '</span></a></td>';
- } elseif ($book->version > 1) {
+ } elseif ($v2) {
+
if ($droits->admin) {
$res .= '<td class="bouton"><a href="#" rel="exportbook/' . $book->book_id . '" class="popup download btbook">' . $btDownload . '</a></td>';
} else {
} else {
$res .= '<td></td>';
}
- if (!$report && ($droits->creation && $book->status < 0)) {
+ if (!$report && ($droits->creation && $book->status < 0) && $v2) {
$res .= '<td class="bouton"><a href="#" rel="supprimeBook/' . $book->book_id . '" class="ajax suppr btbook" title="' . __('Êtes-vous certain de vouloir supprimer cette publication ?') . '">' . $btDel . '</a></td>';
} else {
$res .= '<td></td>';
global $packager;
cubePHP::neverStop();
- if ($version === 'html') {
+ if ($version === 'html' || $version === 'online') {
$packager = new wsPackagerHTML($book_id, null, true, $options);
} else if ($version === 'scorm') {
$packager = new wsPackagerSCORM($book_id, null, true, $options);