diff --git a/main/auth/course_description.php b/main/auth/course_description.php
new file mode 100644
index 0000000000..f1354d474a
--- /dev/null
+++ b/main/auth/course_description.php
@@ -0,0 +1,51 @@
+id] = $description;
+ }
+
+ // function that displays the details of the course description in html
+ $course_description_html = CourseManager::get_details_course_description_html($descriptions, $charset, false);
+ return $course_description_html;
+ }
+
+ echo show_course_description();
+
+?>
\ No newline at end of file
diff --git a/main/auth/courses.php b/main/auth/courses.php
index 3cbf37ed19..7ab4f0e473 100755
--- a/main/auth/courses.php
+++ b/main/auth/courses.php
@@ -22,6 +22,21 @@ $cidReset = true; // Flag forcing the 'current course' reset
// including the global file
include('../inc/global.inc.php');
+if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
+ // additional html (javascript and style css)
+ $htmlHeadXtra[] = '';
+
+ $htmlHeadXtra[] = '';
+
+ $htmlHeadXtra[] = '';
+ $htmlHeadXtra[] = '';
+ $htmlHeadXtra[] = '';
+
+ $htmlHeadXtra[] = '';
+}
+
// section for the tabs
$this_section=SECTION_COURSES;
@@ -483,6 +498,15 @@ function display_subscribe_to_courses($courses)
foreach ($courses as $key=>$course) {
// displaying the course title, visual code and teacher/teaching staff
echo "\t
\n";
+
+ if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
+ // block course description
+ echo "\t\t| ";
+ $icon_title = get_lang('CourseDetails') . ' - ' . $course['title'];
+ echo "".Display::return_icon('synthese_view.gif', $icon_title)."";
+ echo "\t\t | ";
+ }
+
echo "\t\t\n";
echo ''; // display an internal anchor.
echo "".$course['title']." ";
diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php
index 54db8d0174..e0e6e4c8e0 100755
--- a/main/inc/lib/course.lib.php
+++ b/main/inc/lib/course.lib.php
@@ -2028,5 +2028,51 @@ class CourseManager {
$rs = Database::query($sql, __FILE__, __LINE__);
return Database::result($rs, 0, 'code');
}
+ /**
+ * Get the database name of a course by the code
+ * @param string The course code
+ * @return string The database name
+ */
+ public static function get_name_database_course($course_code) {
+ $table_course = Database::get_main_table(TABLE_MAIN_COURSE);
+ $sql = 'SELECT db_name FROM '.$table_course.' WHERE code="'.Database::escape_string($course_code).'"';
+ $rs = Database::query($sql,__FILE__,__LINE__);
+ return Database::result($rs, 0, 'db_name');
+ }
+ /**
+ * Lists details of the course description
+ * @param array The course description
+ * @param string The encoding
+ * @param bool If true is displayed if false is hidden
+ * @return string The course description in html
+ */
+ public static function get_details_course_description_html($descriptions, $charset, $action_show = true) {
+ if (isset($descriptions) && count($descriptions) > 0) {
+ $data = '';
+ foreach ($descriptions as $id => $description) {
+ $data .= '';
+ $data .= '';
+ }
+ } else {
+ $data .= ''.get_lang('ThisCourseDescriptionIsEmpty').'';
+ }
+
+ return $data;
+
+ }
} //end class CourseManager
diff --git a/main/inc/lib/javascript/greybox/AJS.js b/main/inc/lib/javascript/greybox/AJS.js
new file mode 100755
index 0000000000..1793160c4e
--- /dev/null
+++ b/main/inc/lib/javascript/greybox/AJS.js
@@ -0,0 +1,514 @@
+AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){
+var t;
+if(document.documentElement&&document.documentElement.scrollTop){
+t=document.documentElement.scrollTop;
+}else{
+if(document.body){
+t=document.body.scrollTop;
+}
+}
+return t;
+},addClass:function(){
+var _2=AJS.forceArray(arguments);
+var _3=_2.pop();
+var _4=function(o){
+if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){
+o.className+=(o.className?" ":"")+_3;
+}
+};
+AJS.map(_2,function(_6){
+_4(_6);
+});
+},setStyle:function(){
+var _7=AJS.forceArray(arguments);
+var _8=_7.pop();
+var _9=_7.pop();
+AJS.map(_7,function(_a){
+_a.style[_9]=AJS.getCssDim(_8);
+});
+},extend:function(_b){
+var _c=new this("no_init");
+for(k in _b){
+var _d=_c[k];
+var _e=_b[k];
+if(_d&&_d!=_e&&typeof _e=="function"){
+_e=this._parentize(_e,_d);
+}
+_c[k]=_e;
+}
+return new AJS.Class(_c);
+},log:function(o){
+if(window.console){
+console.log(o);
+}else{
+var div=AJS.$("ajs_logger");
+if(!div){
+div=AJS.DIV({id:"ajs_logger","style":"color: green; position: absolute; left: 0"});
+div.style.top=AJS.getScrollTop()+"px";
+AJS.ACN(AJS.getBody(),div);
+}
+AJS.setHTML(div,""+o);
+}
+},setHeight:function(){
+var _11=AJS.forceArray(arguments);
+_11.splice(_11.length-1,0,"height");
+AJS.setStyle.apply(null,_11);
+},_getRealScope:function(fn,_13){
+_13=AJS.$A(_13);
+var _14=fn._cscope||window;
+return function(){
+var _15=AJS.$FA(arguments).concat(_13);
+return fn.apply(_14,_15);
+};
+},documentInsert:function(elm){
+if(typeof (elm)=="string"){
+elm=AJS.HTML2DOM(elm);
+}
+document.write("");
+AJS.swapDOM(AJS.$("dummy_holder"),elm);
+},getWindowSize:function(doc){
+doc=doc||document;
+var _18,_19;
+if(self.innerHeight){
+_18=self.innerWidth;
+_19=self.innerHeight;
+}else{
+if(doc.documentElement&&doc.documentElement.clientHeight){
+_18=doc.documentElement.clientWidth;
+_19=doc.documentElement.clientHeight;
+}else{
+if(doc.body){
+_18=doc.body.clientWidth;
+_19=doc.body.clientHeight;
+}
+}
+}
+return {"w":_18,"h":_19};
+},flattenList:function(_1a){
+var r=[];
+var _1c=function(r,l){
+AJS.map(l,function(o){
+if(o==null){
+}else{
+if(AJS.isArray(o)){
+_1c(r,o);
+}else{
+r.push(o);
+}
+}
+});
+};
+_1c(r,_1a);
+return r;
+},isFunction:function(obj){
+return (typeof obj=="function");
+},setEventKey:function(e){
+e.key=e.keyCode?e.keyCode:e.charCode;
+if(window.event){
+e.ctrl=window.event.ctrlKey;
+e.shift=window.event.shiftKey;
+}else{
+e.ctrl=e.ctrlKey;
+e.shift=e.shiftKey;
+}
+switch(e.key){
+case 63232:
+e.key=38;
+break;
+case 63233:
+e.key=40;
+break;
+case 63235:
+e.key=39;
+break;
+case 63234:
+e.key=37;
+break;
+}
+},removeElement:function(){
+var _22=AJS.forceArray(arguments);
+AJS.map(_22,function(elm){
+AJS.swapDOM(elm,null);
+});
+},_unloadListeners:function(){
+if(AJS.listeners){
+AJS.map(AJS.listeners,function(elm,_25,fn){
+AJS.REV(elm,_25,fn);
+});
+}
+AJS.listeners=[];
+},join:function(_27,_28){
+try{
+return _28.join(_27);
+}
+catch(e){
+var r=_28[0]||"";
+AJS.map(_28,function(elm){
+r+=_27+elm;
+},1);
+return r+"";
+}
+},getIndex:function(elm,_2c,_2d){
+for(var i=0;i<_2c.length;i++){
+if(_2d&&_2d(_2c[i])||elm==_2c[i]){
+return i;
+}
+}
+return -1;
+},isIn:function(elm,_30){
+var i=AJS.getIndex(elm,_30);
+if(i!=-1){
+return true;
+}else{
+return false;
+}
+},isArray:function(obj){
+return obj instanceof Array;
+},setLeft:function(){
+var _33=AJS.forceArray(arguments);
+_33.splice(_33.length-1,0,"left");
+AJS.setStyle.apply(null,_33);
+},appendChildNodes:function(elm){
+if(arguments.length>=2){
+AJS.map(arguments,function(n){
+if(AJS.isString(n)){
+n=AJS.TN(n);
+}
+if(AJS.isDefined(n)){
+elm.appendChild(n);
+}
+},1);
+}
+return elm;
+},getElementsByTagAndClassName:function(_36,_37,_38,_39){
+var _3a=[];
+if(!AJS.isDefined(_38)){
+_38=document;
+}
+if(!AJS.isDefined(_36)){
+_36="*";
+}
+var els=_38.getElementsByTagName(_36);
+var _3c=els.length;
+var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");
+for(i=0,j=0;i<_3c;i++){
+if(_3d.test(els[i].className)||_37==null){
+_3a[j]=els[i];
+j++;
+}
+}
+if(_39){
+return _3a[0];
+}else{
+return _3a;
+}
+},isOpera:function(){
+return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
+},isString:function(obj){
+return (typeof obj=="string");
+},hideElement:function(elm){
+var _40=AJS.forceArray(arguments);
+AJS.map(_40,function(elm){
+elm.style.display="none";
+});
+},setOpacity:function(elm,p){
+elm.style.opacity=p;
+elm.style.filter="alpha(opacity="+p*100+")";
+},insertBefore:function(elm,_45){
+_45.parentNode.insertBefore(elm,_45);
+return elm;
+},setWidth:function(){
+var _46=AJS.forceArray(arguments);
+_46.splice(_46.length-1,0,"width");
+AJS.setStyle.apply(null,_46);
+},createArray:function(v){
+if(AJS.isArray(v)&&!AJS.isString(v)){
+return v;
+}else{
+if(!v){
+return [];
+}else{
+return [v];
+}
+}
+},isDict:function(o){
+var _49=String(o);
+return _49.indexOf(" Object")!=-1;
+},isMozilla:function(){
+return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
+},removeEventListener:function(elm,_4b,fn,_4d){
+var _4e="ajsl_"+_4b+fn;
+if(!_4d){
+_4d=false;
+}
+fn=elm[_4e]||fn;
+if(elm["on"+_4b]==fn){
+elm["on"+_4b]=elm[_4e+"old"];
+}
+if(elm.removeEventListener){
+elm.removeEventListener(_4b,fn,_4d);
+if(AJS.isOpera()){
+elm.removeEventListener(_4b,fn,!_4d);
+}
+}else{
+if(elm.detachEvent){
+elm.detachEvent("on"+_4b,fn);
+}
+}
+},callLater:function(fn,_50){
+var _51=function(){
+fn();
+};
+window.setTimeout(_51,_50);
+},setTop:function(){
+var _52=AJS.forceArray(arguments);
+_52.splice(_52.length-1,0,"top");
+AJS.setStyle.apply(null,_52);
+},_createDomShortcuts:function(){
+var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];
+var _54=function(elm){
+AJS[elm.toUpperCase()]=function(){
+return AJS.createDOM.apply(null,[elm,arguments]);
+};
+};
+AJS.map(_53,_54);
+AJS.TN=function(_56){
+return document.createTextNode(_56);
+};
+},addCallback:function(fn){
+this.callbacks.unshift(fn);
+},bindMethods:function(_58){
+for(var k in _58){
+var _5a=_58[k];
+if(typeof (_5a)=="function"){
+_58[k]=AJS.$b(_5a,_58);
+}
+}
+},partial:function(fn){
+var _5c=AJS.$FA(arguments);
+_5c.shift();
+return function(){
+_5c=_5c.concat(AJS.$FA(arguments));
+return fn.apply(window,_5c);
+};
+},isNumber:function(obj){
+return (typeof obj=="number");
+},getCssDim:function(dim){
+if(AJS.isString(dim)){
+return dim;
+}else{
+return dim+"px";
+}
+},isIe:function(){
+return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
+},removeClass:function(){
+var _5f=AJS.forceArray(arguments);
+var cls=_5f.pop();
+var _61=function(o){
+o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");
+};
+AJS.map(_5f,function(elm){
+_61(elm);
+});
+},setHTML:function(elm,_65){
+elm.innerHTML=_65;
+return elm;
+},map:function(_66,fn,_68,_69){
+var i=0,l=_66.length;
+if(_68){
+i=_68;
+}
+if(_69){
+l=_69;
+}
+for(i;ifl){
+fl=_33;
+}
+AJS.setTop(this.g_window,fl);
+}
+this._setHeaderPos();
+},onHide:function(){
+AJS.removeElement(this.header);
+AJS.removeClass(this.g_window,"GB_Gallery");
+},onShow:function(){
+if(this.use_fx){
+AJS.fx.fadeIn(this.header,{to:1});
+}else{
+AJS.setOpacity(this.header,1);
+}
+}});
+AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");
+GB_showFullScreenSet=function(set,_36,_37){
+var _38={type:"page",fullscreen:true,center_win:false};
+var _39=new GB_Sets(_38,set);
+_39.addCallback(_37);
+_39.showSet(_36-1);
+return false;
+};
+GB_showImageSet=function(set,_3b,_3c){
+var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};
+var _3e=new GB_Sets(_3d,set);
+_3e.addCallback(_3c);
+_3e.showSet(_3b-1);
+return false;
+};
+GB_Sets=GB_Gallery.extend({init:function(_3f,set){
+this.parent(_3f);
+if(!this.img_next){
+this.img_next=this.root_dir+"next.gif";
+}
+if(!this.img_prev){
+this.img_prev=this.root_dir+"prev.gif";
+}
+this.current_set=set;
+},showSet:function(_41){
+this.current_index=_41;
+var _42=this.current_set[this.current_index];
+this.show(_42.url);
+this._setCaption(_42.caption);
+this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});
+this.btn_next=AJS.IMG({"class":"right",src:this.img_next});
+AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));
+AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));
+GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});
+AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);
+this.updateStatus();
+},updateStatus:function(){
+AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);
+if(this.current_index==0){
+AJS.addClass(this.btn_prev,"disabled");
+}else{
+AJS.removeClass(this.btn_prev,"disabled");
+}
+if(this.current_index==this.current_set.length-1){
+AJS.addClass(this.btn_next,"disabled");
+}else{
+AJS.removeClass(this.btn_next,"disabled");
+}
+},_setCaption:function(_43){
+AJS.setHTML(AJS.$("GB_caption"),_43);
+},updateFrame:function(){
+var _44=this.current_set[this.current_index];
+this._setCaption(_44.caption);
+this.url=_44.url;
+this.startLoading();
+},switchPrev:function(){
+if(this.current_index!=0){
+this.current_index--;
+this.updateFrame();
+this.updateStatus();
+}
+},switchNext:function(){
+if(this.current_index!=this.current_set.length-1){
+this.current_index++;
+this.updateFrame();
+this.updateStatus();
+}
+}});
+AJS.AEV(window,"load",function(){
+AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif");
+});
+GB_show=function(_45,url,_47,_48,_49){
+var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};
+var win=new GB_Window(_4a);
+return win.show(url);
+};
+GB_showCenter=function(_4c,url,_4e,_4f,_50){
+var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};
+var win=new GB_Window(_51);
+return win.show(url);
+};
+GB_showFullScreen=function(_53,url,_55){
+var _56={caption:_53,fullscreen:true,callback_fn:_55};
+var win=new GB_Window(_56);
+return win.show(url);
+};
+GB_Window=GreyBox.extend({init:function(_58){
+this.parent({});
+this.img_header=this.root_dir+"header_bg.gif";
+this.img_close=this.root_dir+"w_close.gif";
+this.show_close_img=true;
+AJS.update(this,_58);
+this.addCallback(this.callback_fn);
+},initHook:function(){
+AJS.addClass(this.g_window,"GB_Window");
+this.header=AJS.TABLE({"class":"header"});
+this.header.style.backgroundImage="url("+this.img_header+")";
+var _59=AJS.TD({"class":"caption"},this.caption);
+var _5a=AJS.TD({"class":"close"});
+if(this.show_close_img){
+var _5b=AJS.IMG({"src":this.img_close});
+var _5c=AJS.SPAN("");
+var btn=AJS.DIV(_5b,_5c);
+/*
+AJS.AEV([_5b,_5c],"mouseover",function(){
+AJS.addClass(_5c,"on");
+});
+AJS.AEV([_5b,_5c],"mouseout",function(){
+AJS.removeClass(_5c,"on");
+});
+*/
+AJS.AEV([_5b,_5c],"mousedown",function(){
+AJS.addClass(_5c,"click");
+});
+AJS.AEV([_5b,_5c],"mouseup",function(){
+AJS.removeClass(_5c,"click");
+});
+AJS.AEV([_5b,_5c],"click",GB_hide);
+AJS.ACN(_5a,btn);
+}
+tbody_header=AJS.TBODY();
+AJS.ACN(tbody_header,AJS.TR(_59,_5a));
+AJS.ACN(this.header,tbody_header);
+AJS.ACN(this.top_cnt,this.header);
+if(this.fullscreen){
+AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));
+}
+},setFrameSize:function(){
+if(this.fullscreen){
+var _5e=AJS.getWindowSize();
+overlay_h=_5e.h;
+this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);
+this.height=Math.round(overlay_h-(overlay_h/100)*10);
+}
+AJS.setWidth(this.header,this.width+6);
+AJS.setWidth(this.iframe,this.width);
+AJS.setHeight(this.iframe,this.height);
+},setWindowPosition:function(){
+var _5f=AJS.getWindowSize();
+AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);
+if(!this.center_win){
+AJS.setTop(this.g_window,AJS.getScrollTop());
+}else{
+var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();
+if(fl<0){
+fl=0;
+}
+AJS.setTop(this.g_window,fl);
+}
+}});
+AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");
+
+
+script_loaded=true;
\ No newline at end of file
diff --git a/main/inc/lib/javascript/greybox/gb_styles.css b/main/inc/lib/javascript/greybox/gb_styles.css
new file mode 100755
index 0000000000..166ec6c3a8
--- /dev/null
+++ b/main/inc/lib/javascript/greybox/gb_styles.css
@@ -0,0 +1,148 @@
+/* Last-Modified: 28/06/06 00:08:22 */
+#GB_overlay {
+ background-color: #FFF;
+ position: absolute;
+ margin: auto;
+ top: 0;
+ left: 0;
+ z-index: 100;
+}
+
+#GB_window {
+ left: 0;
+ top: 0;
+ font-size: 1px;
+ position: absolute;
+ overflow: visible;
+ z-index: 150;
+}
+
+#GB_window .content {
+ width: auto;
+ margin: 0;
+ padding: 0;
+}
+
+#GB_frame {
+ border: 0;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+ white-space: nowrap;
+}
+
+
+.GB_Gallery {
+ margin: 0 22px 0 22px;
+}
+
+.GB_Gallery .content {
+ background-color: #fff;
+ border: 3px solid #ddd;
+}
+
+.GB_header {
+ top: 10px;
+ left: 0;
+ margin: 0;
+ z-index: 500;
+ position: absolute;
+ border-bottom: 2px solid #555;
+ border-top: 2px solid #555;
+}
+
+.GB_header .inner {
+ background-color: #333;
+ font-family: Arial, Verdana, sans-serif;
+ padding: 2px 20px 2px 20px;
+}
+
+.GB_header table {
+ margin: 0;
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.GB_header .caption {
+ text-align: left;
+ color: #eee;
+ white-space: nowrap;
+ font-size: 20px;
+}
+
+.GB_header .close {
+ text-align: right;
+}
+
+.GB_header .close img {
+ z-index: 500;
+ cursor: pointer;
+}
+
+.GB_header .middle {
+ white-space: nowrap;
+ padding-left: 80px;
+}
+
+
+#GB_middle {
+ color: #eee;
+}
+
+#GB_middle img {
+ cursor: pointer;
+ vertical-align: middle;
+}
+
+#GB_middle .disabled {
+ cursor: default;
+}
+
+#GB_middle .left {
+ padding-right: 10px;
+}
+
+#GB_middle .right {
+ padding-left: 10px;
+}
+
+
+.GB_Window .content {
+ background-color: #fff;
+ border: 3px solid #ccc;
+ border-top: none;
+}
+
+.GB_Window .header {
+ border-bottom: 1px solid #aaa;
+ border-top: 1px solid #999;
+ border-left: 3px solid #ccc;
+ border-right: 3px solid #ccc;
+ margin: 0;
+
+ height: 22px;
+ font-size: 12px;
+ padding: 3px 0;
+ color: #333;
+}
+
+.GB_Window .caption {
+ font-size: 12px;
+ text-align: left;
+ font-weight: bold;
+ white-space: nowrap;
+ padding-right: 20px;
+}
+
+.GB_Window .close { text-align: right; }
+.GB_Window .close span {
+ font-size: 12px;
+ cursor: pointer;
+}
+.GB_Window .close img {
+ cursor: pointer;
+ padding: 0 3px 0 0;
+}
+
+.GB_Window .on { border-bottom: 1px solid #333; }
+.GB_Window .click { border-bottom: 1px solid red; }
diff --git a/main/inc/lib/javascript/greybox/header_bg.gif b/main/inc/lib/javascript/greybox/header_bg.gif
new file mode 100755
index 0000000000..3913cfdfd7
Binary files /dev/null and b/main/inc/lib/javascript/greybox/header_bg.gif differ
diff --git a/main/inc/lib/javascript/greybox/indicator.gif b/main/inc/lib/javascript/greybox/indicator.gif
new file mode 100644
index 0000000000..e1c6848556
Binary files /dev/null and b/main/inc/lib/javascript/greybox/indicator.gif differ
diff --git a/main/inc/lib/javascript/greybox/loader_frame.html b/main/inc/lib/javascript/greybox/loader_frame.html
new file mode 100755
index 0000000000..30dcb26784
--- /dev/null
+++ b/main/inc/lib/javascript/greybox/loader_frame.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
diff --git a/main/inc/lib/javascript/greybox/next.gif b/main/inc/lib/javascript/greybox/next.gif
new file mode 100755
index 0000000000..c0f8908fbc
Binary files /dev/null and b/main/inc/lib/javascript/greybox/next.gif differ
diff --git a/main/inc/lib/javascript/greybox/prev.gif b/main/inc/lib/javascript/greybox/prev.gif
new file mode 100755
index 0000000000..d20e095c22
Binary files /dev/null and b/main/inc/lib/javascript/greybox/prev.gif differ
diff --git a/main/inc/lib/javascript/greybox/w_close.gif b/main/inc/lib/javascript/greybox/w_close.gif
new file mode 100644
index 0000000000..816a8dcbce
Binary files /dev/null and b/main/inc/lib/javascript/greybox/w_close.gif differ
diff --git a/main/install/dokeos_main.sql b/main/install/dokeos_main.sql
index 5cef4f9221..c8ad7d388c 100755
--- a/main/install/dokeos_main.sql
+++ b/main/install/dokeos_main.sql
@@ -728,6 +728,7 @@ VALUES
('search_enabled',NULL,'radio','Tools','false','EnableSearchTitle','EnableSearchComment',NULL,NULL,1),
('search_prefilter_prefix',NULL, NULL,'Search','','SearchPrefilterPrefix','SearchPrefilterPrefixComment',NULL,NULL,0),
('search_show_unlinked_results',NULL,'radio','Search','true','SearchShowUnlinkedResultsTitle','SearchShowUnlinkedResultsComment',NULL,NULL,1),
+('show_courses_descriptions_in_catalog', NULL, 'radio', 'Course', 'true', 'ShowCoursesDescriptionsInCatalogTitle', 'ShowCoursesDescriptionsInCatalogComment', NULL, NULL, 1),
('dokeos_database_version', NULL, 'textfield', NULL,'1.8.6.1.8225','DokeosDatabaseVersion','',NULL,NULL,0);
UNLOCK TABLES;
/*!40000 ALTER TABLE settings_current ENABLE KEYS */;
@@ -905,7 +906,9 @@ VALUES
('search_enabled', 'true', 'Yes'),
('search_enabled', 'false', 'No'),
('search_show_unlinked_results', 'true', 'SearchShowUnlinkedResults'),
-('search_show_unlinked_results', 'false', 'SearchHideUnlinkedResults');
+('search_show_unlinked_results', 'false', 'SearchHideUnlinkedResults'),
+('show_courses_descriptions_in_catalog', 'true', 'Yes'),
+('show_courses_descriptions_in_catalog', 'false', 'No');
UNLOCK TABLES;
diff --git a/main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql b/main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql
index a412483216..5473357060 100755
--- a/main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql
+++ b/main/install/migrate-db-1.8.6.1-1.8.6.2-pre.sql
@@ -18,6 +18,10 @@ ALTER TABLE session_rel_course_rel_user ADD COLUMN visibility int NOT NULL defau
CREATE TABLE session_category (id int(11) NOT NULL auto_increment, name varchar(100) default NULL, date_start date default NULL, date_end date default NULL, PRIMARY KEY (id));
ALTER TABLE session ADD COLUMN session_category_id INT NOT NULL;
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable) VALUES ('show_courses_descriptions_in_catalog', NULL, 'radio', 'Course', 'true', 'ShowCoursesDescriptionsInCatalogTitle', 'ShowCoursesDescriptionsInCatalogComment', NULL, NULL, 1, 1);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('show_courses_descriptions_in_catalog', 'true', 'Yes');
+INSERT INTO settings_options (variable, value, display_text) VALUES ('show_courses_descriptions_in_catalog', 'false', 'No');
+
-- xxSTATSxx
|