Merge branch 'MDL-66701_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Jun Pataleta 2019-11-07 15:41:45 +08:00
commit cf29a4857a
6 changed files with 26 additions and 4 deletions

View file

@ -74,10 +74,13 @@ $string['target:coursegradetopass'] = 'Students at risk of not achieving the min
$string['target:coursegradetopass_help'] = 'This target describes whether the student is at risk of not achieving the minimum grade to pass the course.';
$string['target:noaccesssincecoursestart'] = 'Students who have not accessed the course yet';
$string['target:noaccesssincecoursestart_help'] = 'This target describes students who never accessed a course they are enrolled in.';
$string['target:noaccesssincecoursestartinfo'] = 'The following students are enroled in a course which has started, but they have never accessed the course.';
$string['target:norecentaccesses'] = 'Students who have not accessed the course recently';
$string['target:norecentaccesses_help'] = 'This target identifies students who have not accessed a course they are enrolled in within the set analysis interval (by default the past month).';
$string['target:norecentaccessesinfo'] = 'The following students have not accessed a course they are enrolled in within the set analysis interval (by default the past month).';
$string['target:noteachingactivity'] = 'Courses at risk of not starting';
$string['target:noteachingactivity_help'] = 'This target describes whether courses due to start in the coming week will have teaching activity.';
$string['target:noteachingactivityinfo'] = 'The following courses due to start in the upcoming days are at risk of not starting because they don\'t have teachers or students enroled';
$string['targetlabelstudentcompletionno'] = 'Student who is likely to meet the course completion conditions';
$string['targetlabelstudentcompletionyes'] = 'Student at risk of not meeting the course completion conditions';
$string['targetlabelstudentcompetenciesno'] = 'Student who is likely to achieve the competencies assigned to a course';

View file

@ -127,3 +127,4 @@ $string['privacy:privatefilespath'] = 'Private files';
$string['privacy:sessionpath'] = 'Session data';
$string['target:upcomingactivitiesdue'] = 'Upcoming activities due';
$string['target:upcomingactivitiesdue_help'] = 'This target generates reminders for upcoming activities due.';
$string['target:upcomingactivitiesdueinfo'] = 'This is the manager\'s view for all upcoming "activities due" insights. These students have received these insights directly.';

View file

@ -89,7 +89,14 @@ class insight implements \renderable, \templatable {
$data->modelid = $this->model->get_id();
$data->contextid = $this->context->id;
$data->predictionid = $predictiondata->id;
$data->insightname = format_string($target->get_name());
$targetname = $target->get_name();
$data->insightname = format_string($targetname);
$targetinfostr = $targetname->get_identifier() . 'info';
if (get_string_manager()->string_exists($targetinfostr, $targetname->get_component())) {
$data->insightdescription = get_string($targetinfostr, $targetname->get_component());
}
$data->showpredictionheading = true;
if (!$target->is_linear()) {

View file

@ -92,7 +92,14 @@ class insights_list implements \renderable, \templatable {
$data = new \stdClass();
$data->modelid = $this->model->get_id();
$data->contextid = $this->context->id;
$data->insightname = format_string($target->get_name());
$targetname = $target->get_name();
$data->insightname = format_string($targetname);
$targetinfostr = $targetname->get_identifier() . 'info';
if (get_string_manager()->string_exists($targetinfostr, $targetname->get_component())) {
$data->insightdescription = get_string($targetinfostr, $targetname->get_component());
}
$data->showpredictionheading = true;
if (!$target->is_linear()) {

View file

@ -90,6 +90,8 @@
<h2 class="mb-2">{{insightname}}</h2>
{{{insightdescription}}}
{{> report_insights/bulk_actions }}
<table class="generaltable insights-list mt-3">

View file

@ -106,7 +106,9 @@
<div class="insight-container" data-context-id="{{contextid}}" data-model-id="{{modelid}}">
<h2 class="mb-2">{{{insightname}}}</h2>
<h2 class="mb-2">{{insightname}}</h2>
{{{insightdescription}}}
{{^noinsights}}
{{#nostaticmodelnotification}}
@ -168,4 +170,4 @@
</div>
{{/noinsights}}
</div>
</div>