From 24e3c3c4685c2d79d1cff42038003a258dcd86b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?=
Date: Thu, 9 Apr 2015 12:09:44 +0200
Subject: [PATCH] Version 14.110.2
---
css/swad_desktop.css | 2 +-
css/swad_mobile.css | 2 +-
html/install/index.html | 122 +++++++++++++++++++++++++++++++++++++++-
swad_changelog.h | 9 ++-
swad_config.h | 3 +
swad_layout.c | 12 +++-
6 files changed, 145 insertions(+), 5 deletions(-)
diff --git a/css/swad_desktop.css b/css/swad_desktop.css
index 17fa41653..0f6a356e9 100644
--- a/css/swad_desktop.css
+++ b/css/swad_desktop.css
@@ -359,7 +359,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.TIT_TBL_10
{
- margin:10px;
+ margin:20px 10px 10px 10px;
color:#808080;
font-size:16pt;
font-weight:bold;
diff --git a/css/swad_mobile.css b/css/swad_mobile.css
index 2674cc43b..872b35b0e 100644
--- a/css/swad_mobile.css
+++ b/css/swad_mobile.css
@@ -323,7 +323,7 @@ form {margin:0; display:inline;}
}
.TIT_TBL_10
{
- margin:10px;
+ margin:20px 10px 10px 10px;
color:#808080;
font-size:20pt;
font-weight:bold;
diff --git a/html/install/index.html b/html/install/index.html
index 7a4158e7b..369b71d89 100644
--- a/html/install/index.html
+++ b/html/install/index.html
@@ -57,6 +57,7 @@
Creating SWAD directories and files
Installing SWAD icons
Installing DropzoneJS
+ Installing MathJax
Compiling and installing gSOAP, required to compile SWAD core
Compiling and installing SWAD core
Installing photo processing program fotomaton
@@ -453,6 +454,71 @@
+
+
+
+ SWAD needs pandoc
1.10 or later
+ and iconv
+ to convert from Markdown format to HTML format.
+
+
+
+
+ -
+ To install
pandoc
:
+
+
+ CentOS 6.5 |
+ Ubuntu 14.04 |
+
+
+
+
+ You probably need to install the latest epel-release rpm from
+ http://dl.fedoraproject.org/pub/epel/6/x86_64/:
+ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
+ rpm -Uvh epel-release*rpm
+
+ Then you can download pandoc rpm from http://pkgs.org/centos-6/epel-x86_64/pandoc-1.9.4.1-1.1.el6.x86_64.rpm.html:
+ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/pandoc-1.9.4.1-1.1.el6.x86_64.rpm
+ and install it:
+ yum install pandoc
+ Unfortunately this rpm is too old, but the following rmp for Fedora works in CentOS:
+ wget https://petersen.fedorapeople.org/pandoc-standalone/epel-5/x86_64/pandoc-1.12.4.2-1.x86_64.rpm
+
+
+
+ If you do not find a valid pandoc binary package, try to install the Haskell platform by following the instructions in
+ https://medium.com/@jtpaasch/install-haskell-on-centos-5be42b76c7a4:
+ yum install haskell-platform
+
+ Once Haskell is installed, follow the instructions in
+ http://johnmacfarlane.net/pandoc/installing.html#installing-from-source:
+ cabal update
+ cabal install pandoc pandoc-citeproc
+
+ This probably will fail due to an old version of the Glasgow Haskell Compiler (GHC).
+ Update it as indicated in
+ https://gist.github.com/grownseed/4fd2e91eca829cc039de:
+
+ wget https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-centos65.tar.bz2
+ tar xf ghc-7.8.4-x86_64-unknown-linux-centos65.tar.bz2
+ cd ghc-7.8.4
+ ./configure
+ make install
+
+ Then repeat:
+ cabal update
+ cabal install pandoc pandoc-citeproc
+
+ |
+
+ sudo apt-get install pandoc
+ |
+
+
+
+
@@ -481,6 +547,12 @@
sudo service apache2 restart
+ Optionally, if you want to rewrite some URIs,
+ activate the rewrite module:
+ sudo a2enmod rewrite
+ sudo service apache2 restart
+
+
Activate the secure server:
sudo a2enmod ssl
sudo service apache2 restart
@@ -614,7 +686,7 @@
- In the options for the directory /var/www/
,
+ Inside the options for the directory /var/www/
,
search the line:
Options Indexes FollowSymLinks
and replace it by:
@@ -622,6 +694,18 @@
Remove Indexes
to not list files in directories.
+
+ Optionally, if you want to rewrite some URIs,
+ inside the options for the directory /var/www/
,
+ add lines like the following before </Directory>
:
+ RewriteEngine On
+ RewriteRule /institution/([^/]+)/?$ /swad/index.html?InsCod=$1
+ RewriteRule /centre/([^/]+)/?$ /swad/index.html?CtrCod=$1
+ RewriteRule /degree/([^/]+)/?$ /swad/index.html?DegCod=$1
+ RewriteRule /course/([^/]+)/?$ /swad/index.html?CrsCod=$1
+ RewriteRule /user/([^/]+)/?$ /swad/?Usr=$1
+
+
@@ -1263,6 +1347,42 @@
+
+
+
+
+
+
+
+ MathJax is a Javascript library required to display math.
+ In SWAD, it is used in combination with Markdown and Pandoc.
+ To install it, follow the instructions in
+ http://docs.mathjax.org/en/latest/installation.html.
+ The directory downloaded and uncompressed must be located inside your main HTML directory
+ /var/www/html/swad/
:
+
+
+ CentOS 6.5 |
+ Ubuntu 14.04 |
+
+
+
+ mv your-downloaded-copy-of-mathjax /var/www/html/swad/MathJax
+ chown -R apache:apache /var/www/html/swad/MathJax
+ If in CentOS SELinux is activated,
+ it should be necessary to change the permissions of the directory dropzone and its contents:
+ ls -lZ /var/www/html/swad/
+ chcon -R -t httpd_sys_content_t /var/www/html/swad/MathJax
+ ls -lZ /var/www/html/swad/
+ |
+
+ sudo mv your-downloaded-copy-of-mathjax /var/www/html/swad/MathJax
+ sudo chown -R www-data:www-data /var/www/html/swad/MathJax
+ |
+
+
+
+
diff --git a/swad_changelog.h b/swad_changelog.h
index db9b50743..f3b629e0b 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -103,17 +103,24 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 14.110.1 (2015/04/08)"
+#define Log_PLATFORM_VERSION "SWAD 14.110.2 (2015/04/09)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
+ Version 14.110.2: Apr 09, 2015 Changes in CSS and scripts.
+ MathJax installed in local by default. (184555 lines)
+ 1 change in installation:
+It's necessary to install a copy of MathJax in the server at directory MathJax inside main html directory followin the instructions in http://docs.mathjax.org/en/latest/start.html
+
Version 14.110.1: Apr 08, 2015 Changes in CSS. (184539 lines)
Version 14.110: Apr 07, 2015 Testing rich text editor using Markdown, suggested by Pedro A. García Sánchez. (184508 lines)
Fixed bug in file browser, reported by Eva Martínez Ortigosa.
2 changes necessary in database:
ALTER TABLE crs_info_txt CHANGE COLUMN InfoTxt InfoTxtHTML LONGTEXT NOT NULL;
ALTER TABLE crs_info_txt ADD COLUMN InfoTxtMD LONGTEXT NOT NULL AFTER InfoTxtHTML;
+ 1 change in installation:
+It's necessary to install pandoc 1.10 or later.
Version 14.109.2: Apr 06, 2015 Changed text in file browser. (184347 lines)
Version 14.109.1: Apr 06, 2015 Changed text of button in course info. (184325 lines)
diff --git a/swad_config.h b/swad_config.h
index 9356e2c96..b8ce77004 100644
--- a/swad_config.h
+++ b/swad_config.h
@@ -428,6 +428,9 @@
/* HTML file weitten at foot of page */
#define Cfg_PATH_AND_FILE_REL_HTML_PRIVATE "./foot.html"
+/* Comment the following line if you do not want a local copy of MathJax */
+#define Cfg_MATHJAX_LOCAL
+
/*****************************************************************************/
/************************ Commands called by this CGI ************************/
/*****************************************************************************/
diff --git a/swad_layout.c b/swad_layout.c
index 03c8152ff..15979de14 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -446,10 +446,20 @@ static void Lay_WriteScripts (void)
Cfg_HTTPS_URL_SWAD_PUBLIC);
/***** Script for MathJax *****/
+#ifdef Cfg_MATHJAX_LOCAL
+ // Use the local copy of MathJax
fprintf (Gbl.F.Out,"\n",
+ Cfg_HTTPS_URL_SWAD_PUBLIC);
+#else
+ // Use the MathJax Content Delivery Network (CDN)
+ fprintf (Gbl.F.Out,"\n");
+#endif
+ /***** Scripts used only in main window *****/
if (Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW)
{
Lay_WriteScriptInit ();