Forráskód Böngészése

Removing descripion in the jqgrid list + removing target attribute

Julio Montoya 12 éve
szülő
commit
40ac7c5f12

+ 5 - 4
main/exercice/question.class.php

@@ -1983,7 +1983,8 @@ abstract class Question
     public static function getQuestionColumns()
     {
         // The order is important you need to check the the $column variable in the model.ajax.php file
-        $columns = array('id', get_lang('Name'), get_lang('Description'));
+        //$columns = array('id', get_lang('Name'), get_lang('Description'));
+        $columns = array('id', get_lang('Name'));
 
         // Column config.
         $columnModel = array(
@@ -1999,13 +2000,13 @@ abstract class Question
                 'width' => '200',
                 'align' => 'left'
             ),
-            array(
+            /* array(
                 'name'     => 'description',
                 'index'    => 'description',
                 'width'    => '100',
                 'align'    => 'left',
                 'sortable' => 'false'
-            )
+            )*/
         );
         $extraField = new \ExtraField('question');
         $rules = $extraField->getRules($columns, $columnModel);
@@ -2081,7 +2082,7 @@ abstract class Question
         return $questions;
     }
 
-    static function getMediaLabel($title)
+    public static function getMediaLabel($title)
     {
         return Display::label($title, 'warning');
     }

+ 4 - 3
src/ChamiloLMS/Controller/Admin/QuestionManager/QuestionManagerController.php

@@ -55,6 +55,7 @@ class QuestionManagerController
         // Creating a new form
         $form = new \FormValidator('edit_question', 'post', $url);
         $question->createForm($form);
+        $form->freeze();
         $question->createAnswersForm($form);
 
         $submitQuestion = $app['request']->get('submitQuestion');
@@ -166,10 +167,8 @@ class QuestionManagerController
         $token = null;
         $editUrl = $app['url_generator']->generate('admin_questions');
 
-        /* '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.
-            \Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. */
         $actionLinks = 'function action_formatter(cellvalue, options, rowObject) {
-            return \'<a target="_blank" href="'.$editUrl.'/\'+rowObject[0]+\'/edit">'.\Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.'\';
+            return \'<a href="'.$editUrl.'/\'+rowObject[0]+\'/edit">'.\Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.'\';
         }';
 
         $js = \Display::grid_js('questions', $url, $columns, $columnModel, $extraParams, array(), $actionLinks, true);
@@ -203,6 +202,8 @@ class QuestionManagerController
         $subtree = null;
 
         if (isset($categoryId)) {
+            //$repo->getChildrenQueryBuilder();
+
             // Insert node.
             /*
             $options = array(