Maintenance Gitlab - Jeudi 09 Décembre 2021 à partir de 10h - Mises à jour de sécurité

Commit d2ee4c64 authored by Thomas Fradet's avatar Thomas Fradet
Browse files

path list edit front

parent 63625276
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
$string['titleaddname_plugin'] = 'Name'; $string['titleaddname_plugin'] = 'Name';
$string['titleadddesc_plugin'] = 'Description'; $string['titleadddesc_plugin'] = 'Description';
$string['titleaddimg_plugin'] = 'Course picture'; $string['titleaddimg_plugin'] = 'Course picture';
$string['titleaddelem_plugin'] = 'Course elements'; $string['titleaddelem_plugin'] = 'Path content';
$string['titleaddelemdesc_plugin'] = 'Drag and drop the elements of the course you want to add to this course'; $string['titleaddelemdesc_plugin'] = 'Select course ressources and activities in the left list and add it to your path in the right list by clicking in arrow icons.';
$string['heading_plugin'] = 'The path allow you to group some course resources in a particular sequence.'; $string['heading_plugin'] = 'You can create a Path to group activities and ressources appart from the other inside a learning path. ';
$string['add_path'] = 'Add a path'; $string['add_path'] = 'Add a path';
$string['any_carrer'] = 'No Path in this course'; $string['any_carrer'] = 'No Path in this course';
$string['list_title'] = 'Edit path list';
?> ?>
\ No newline at end of file
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
$string['titleaddname_plugin'] = 'Nom'; $string['titleaddname_plugin'] = 'Nom';
$string['titleadddesc_plugin'] = 'Description'; $string['titleadddesc_plugin'] = 'Description';
$string['titleaddimg_plugin'] = 'Image du parcours'; $string['titleaddimg_plugin'] = 'Image du parcours';
$string['titleaddelem_plugin'] = 'Elements du parcours'; $string['titleaddelem_plugin'] = 'Contenu du parcours';
$string['titleaddelemdesc_plugin'] = 'Glissez-déposez les élements du cours que vous souhaitez ajouter à ce parcours'; $string['titleaddelemdesc_plugin'] = 'Sélectionnez des activités et ressources du cours dans la liste de gauche et ajoutez-les au parcours dans la liste de droite en utilisant les flèches.';
$string['heading_plugin'] = 'Les parcours permettent de regrouper certaines ressources du cours dans un enchaînement particulier.'; $string['heading_plugin'] = 'Les parcours permettent de regrouper certaines ressources du cours dans un enchaînement particulier à part des autres.';
$string['add_path'] = 'Ajouter un parcours'; $string['add_path'] = 'Ajouter un parcours';
$string['any_carrer'] = 'Pas de parcours'; $string['any_carrer'] = 'Pas de parcours';
$string['list_title'] = 'Édition des parcours';
?> ?>
\ No newline at end of file
...@@ -17,36 +17,26 @@ public function get_content() ...@@ -17,36 +17,26 @@ public function get_content()
exit; exit;
} }
$content = "<h2>" . get_string('title_plugin', 'block_career') . "</h2>"; $content = "<h2>" . get_string('list_title', 'block_career') . "</h2>";
$content .= "<div class='alert alert-info'>" . get_string('heading_plugin', 'block_career') . "</div>"; $content .= "<div class='alert alert-info'>" . get_string('heading_plugin', 'block_career') . "</div>";
$request = $DB->get_records_sql('SELECT * FROM {block_career} WHERE course = ?', array($_GET["courseid"])); $request = $DB->get_records_sql('SELECT * FROM {block_career} WHERE course = ?', array($_GET["courseid"]));
// $image = ""; $content .= "<div class='list-group'>";
foreach ($request as $value) { foreach ($request as $value) {
// if (file_get_contents($value->image) != null) { $content .= "
// $image = "<img src='$value->image' class='img_moodle_course'/>"; <a class='list-group-item list-group-item-action' style='color: inherit;' href='$CFG->wwwroot/blocks/career/career_setting.php?courseid=" . $_GET["courseid"] . "&pathid=$value->id'>
// } <h2 class='' style='float: left;'>$value->name</h2>
<!--<a href='$CFG->wwwroot/blocks/career/career_setting.php?courseid=" . $_GET["courseid"] . "&pathid=$value->id' class='btn btn-primary btn-sm' style='float: right;'>Modifier</a>-->
$content .= "<div class='card card-block mb-3'> <div class='' style='clear: both;'>$value->description</div>
<div class='card-body'> </a>
<h2 class='card-title'>$value->name</h2> ";
<p class='card-text'>$value->description</p>
<a href='$CFG->wwwroot/blocks/career/career_setting.php?courseid=" . $_GET["courseid"] . "&pathid=$value->id' class='btn btn-primary btn-sm path-list-edit-link'>Modifier</a>
</div>
</div>";
// $content .= "<div class='card card_block'>
// <div class='row'>
// <div class='col-lg-1 col-md-1 padding_column align_center img_center' >$image</div>
// <div class='col-lg-10 col-md-10 padding_column'><h3>$value->name</h3>$value->description</div>
// <div class='col-lg-1 col-md-1 padding_column'><a style='color:black' href='$CFG->wwwroot/blocks/career/career_setting.php?course=" . $_GET["course"] . "&id=$value->id'><i class=\"fa fa-cog fa-2x\"></a></i></div>
// </div>
// </div>";
} }
$content .= "</div>";
if (empty($request)) { if (empty($request)) {
$content .= "<p>" . get_string('any_carrer', 'block_career') . "</p>"; $content .= "<p>" . get_string('any_carrer', 'block_career') . "</p>";
} }
......
...@@ -64,6 +64,7 @@ class view_career_setting extends moodleform ...@@ -64,6 +64,7 @@ class view_career_setting extends moodleform
// $content = "<h1>" . get_string('title_plugin', 'block_career') . "</h1>"; // $content = "<h1>" . get_string('title_plugin', 'block_career') . "</h1>";
$content = ""; $content = "";
$content .= "<h2>Édition du parcours</h2>";
$content .= "<div class='alert alert-info'>" . get_string('heading_plugin', 'block_career') . "</div>"; $content .= "<div class='alert alert-info'>" . get_string('heading_plugin', 'block_career') . "</div>";
$temp = $mform->toHtml(); $temp = $mform->toHtml();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment