|
@@ -214,9 +214,7 @@ class iassign {
|
|
$this->bottonPost = 0;
|
|
$this->bottonPost = 0;
|
|
$this->view_iassign = optional_param('action', false, PARAM_BOOL);
|
|
$this->view_iassign = optional_param('action', false, PARAM_BOOL);
|
|
$this->activity = new activity(optional_param('iassign_current', NULL, PARAM_TEXT)); // this is the activity inside iAssign block
|
|
$this->activity = new activity(optional_param('iassign_current', NULL, PARAM_TEXT)); // this is the activity inside iAssign block
|
|
-
|
|
|
|
- $this->view();
|
|
|
|
- } // function __construct($iassign, $cm, $course)
|
|
|
|
|
|
+ } // function __construct($iassign, $cm, $course)
|
|
|
|
|
|
|
|
|
|
/// Show iAssign by using the security filter (temporary data on '*_iassign_security')
|
|
/// Show iAssign by using the security filter (temporary data on '*_iassign_security')
|
|
@@ -442,7 +440,7 @@ class iassign {
|
|
$json_obj->submissions[] = $csvfields;
|
|
$json_obj->submissions[] = $csvfields;
|
|
|
|
|
|
$exercise_dir = [];
|
|
$exercise_dir = [];
|
|
- $exercises_list = [];
|
|
|
|
|
|
+ $exercises_list = [];
|
|
foreach ($list as $item) {
|
|
foreach ($list as $item) {
|
|
|
|
|
|
if (!in_array($item->iassign_statementid, $exercise_dir)) {
|
|
if (!in_array($item->iassign_statementid, $exercise_dir)) {
|
|
@@ -476,9 +474,9 @@ class iassign {
|
|
mkdir($iassignfilespath, 0777, true);
|
|
mkdir($iassignfilespath, 0777, true);
|
|
}
|
|
}
|
|
|
|
|
|
- $diretorio = $CFG->dataroot . DIRECTORY_SEPARATOR . 'temp'
|
|
|
|
|
|
+ $diretorio = $CFG->dataroot . DIRECTORY_SEPARATOR . 'temp'
|
|
. DIRECTORY_SEPARATOR . 'iassign_files' . DIRECTORY_SEPARATOR;
|
|
. DIRECTORY_SEPARATOR . 'iassign_files' . DIRECTORY_SEPARATOR;
|
|
-
|
|
|
|
|
|
+
|
|
if (!file_exists($diretorio)) {
|
|
if (!file_exists($diretorio)) {
|
|
echo 'Não foi possível criar o diretório para preparar o arquivo com as submissões. Possivelmente o caminho está bloqueado para escrita.';
|
|
echo 'Não foi possível criar o diretório para preparar o arquivo com as submissões. Possivelmente o caminho está bloqueado para escrita.';
|
|
exit;
|
|
exit;
|
|
@@ -507,7 +505,7 @@ class iassign {
|
|
}
|
|
}
|
|
|
|
|
|
foreach ($students_list as $student) {
|
|
foreach ($students_list as $student) {
|
|
- $individual_dir =
|
|
|
|
|
|
+ $individual_dir =
|
|
$dir_ex . DIRECTORY_SEPARATOR .
|
|
$dir_ex . DIRECTORY_SEPARATOR .
|
|
iassign_utils::format_filename($student->firstname . ' ' . $student->lastname);
|
|
iassign_utils::format_filename($student->firstname . ' ' . $student->lastname);
|
|
|
|
|
|
@@ -644,7 +642,7 @@ class iassign {
|
|
|
|
|
|
$atual_statement = $DB->get_record("iassign_statement", array("id" => $atual_submission->iassign_statementid));
|
|
$atual_statement = $DB->get_record("iassign_statement", array("id" => $atual_submission->iassign_statementid));
|
|
|
|
|
|
- $all_submissions = $DB->get_records('iassign_allsubmissions',
|
|
|
|
|
|
+ $all_submissions = $DB->get_records('iassign_allsubmissions',
|
|
array('iassign_statementid' => $atual_submission->iassign_statementid, 'userid' => $atual_submission->userid));
|
|
array('iassign_statementid' => $atual_submission->iassign_statementid, 'userid' => $atual_submission->userid));
|
|
|
|
|
|
$user = $DB->get_record('user', array('id' => $atual_submission->userid));
|
|
$user = $DB->get_record('user', array('id' => $atual_submission->userid));
|
|
@@ -720,7 +718,7 @@ class iassign {
|
|
$author = $DB->get_record("user", array('id' => $USER->id));
|
|
$author = $DB->get_record("user", array('id' => $USER->id));
|
|
$activity_source->author_modified_name = $author->firstname . ' ' . $author->lastname;
|
|
$activity_source->author_modified_name = $author->firstname . ' ' . $author->lastname;
|
|
$activity_source->author_modified = $activity_source->author_modified_name;
|
|
$activity_source->author_modified = $activity_source->author_modified_name;
|
|
-
|
|
|
|
|
|
+
|
|
if ($id_ = $DB->insert_record("iassign_statement", $activity_source)) {
|
|
if ($id_ = $DB->insert_record("iassign_statement", $activity_source)) {
|
|
$fs = get_file_storage();
|
|
$fs = get_file_storage();
|
|
// Duplicate activity file
|
|
// Duplicate activity file
|
|
@@ -728,7 +726,7 @@ class iassign {
|
|
|
|
|
|
print 'Arquivos a serem copiados: ';
|
|
print 'Arquivos a serem copiados: ';
|
|
print_r($files_ids);
|
|
print_r($files_ids);
|
|
-
|
|
|
|
|
|
+
|
|
foreach ($files_ids as $fileid) {
|
|
foreach ($files_ids as $fileid) {
|
|
$source_file = $fs->get_file_by_id($fileid->id);
|
|
$source_file = $fs->get_file_by_id($fileid->id);
|
|
|
|
|
|
@@ -765,7 +763,7 @@ class iassign {
|
|
var checkboxes = document.getElementsByName("statements[]");
|
|
var checkboxes = document.getElementsByName("statements[]");
|
|
for (var i = 0; i < checkboxes.length; i++)
|
|
for (var i = 0; i < checkboxes.length; i++)
|
|
if (checkboxes[i].checked) return true;
|
|
if (checkboxes[i].checked) return true;
|
|
-
|
|
|
|
|
|
+
|
|
document.getElementById("msg-error").classList.remove("d-none");
|
|
document.getElementById("msg-error").classList.remove("d-none");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -941,8 +939,8 @@ class iassign {
|
|
$iassign_ilm = $DB->get_record("iassign_ilm", array("id" => $exercise->iassign_ilmid));
|
|
$iassign_ilm = $DB->get_record("iassign_ilm", array("id" => $exercise->iassign_ilmid));
|
|
|
|
|
|
print '
|
|
print '
|
|
- <a href="#item-'.$exercise->id.'" class="list-group-item list-group-item-action h4" style="margin-top: 1rem;" data-toggle="collapse" onclick=\'$(".fa-caret-right, .fa-caret-down", this).toggleClass("fa-caret-right").toggleClass("fa-caret-down");\' > <i class="fa fa-caret-right"></i> '
|
|
|
|
- . $exercise->name
|
|
|
|
|
|
+ <a href="#item-'.$exercise->id.'" class="list-group-item list-group-item-action h4" style="margin-top: 1rem;" data-toggle="collapse" onclick=\'$(".fa-caret-right, .fa-caret-down", this).toggleClass("fa-caret-right").toggleClass("fa-caret-down");\' > <i class="fa fa-caret-right"></i> '
|
|
|
|
+ . $exercise->name
|
|
. ' - ' . $iassign_ilm->name
|
|
. ' - ' . $iassign_ilm->name
|
|
. '<i class="fa fa-times" onclick="event.stopPropagation(); delete_submission(\'exercise\', '
|
|
. '<i class="fa fa-times" onclick="event.stopPropagation(); delete_submission(\'exercise\', '
|
|
. $exercise->id .', this)" style="color:#C62828; cursor: pointer; font-size: 1.5rem; float: right; margin-left: .5rem;" aria-hidden="true"></i>'
|
|
. $exercise->id .', this)" style="color:#C62828; cursor: pointer; font-size: 1.5rem; float: right; margin-left: .5rem;" aria-hidden="true"></i>'
|
|
@@ -967,7 +965,7 @@ class iassign {
|
|
}
|
|
}
|
|
|
|
|
|
print '<a href="#item-'.$exercise->id.'-'.$student->userid.'" class="list-group-item list-group-item-action" data-toggle="collapse" onclick=\'$(".fa-caret-right, .fa-caret-down", this).toggleClass("fa-caret-right").toggleClass("fa-caret-down");\'>
|
|
print '<a href="#item-'.$exercise->id.'-'.$student->userid.'" class="list-group-item list-group-item-action" data-toggle="collapse" onclick=\'$(".fa-caret-right, .fa-caret-down", this).toggleClass("fa-caret-right").toggleClass("fa-caret-down");\'>
|
|
- <i class="fa fa-caret-right"></i> ' . $student->firstname . ' ' . $student->lastname
|
|
|
|
|
|
+ <i class="fa fa-caret-right"></i> ' . $student->firstname . ' ' . $student->lastname
|
|
. '<i class="fa fa-times" onclick="event.stopPropagation(); delete_submission(\'student\', '
|
|
. '<i class="fa fa-times" onclick="event.stopPropagation(); delete_submission(\'student\', '
|
|
. $student->userid .', this, '.$exercise->id.')" style="color:#C62828; cursor: pointer; font-size: 1.5rem; float: right; margin-left: .5rem;" aria-hidden="true"></i>'
|
|
. $student->userid .', this, '.$exercise->id.')" style="color:#C62828; cursor: pointer; font-size: 1.5rem; float: right; margin-left: .5rem;" aria-hidden="true"></i>'
|
|
. '<i onclick="event.stopPropagation(); download_submission(\'student\', '.$student->userid.', '.$exercise->id.')" class="fa fa-download" style="float: right; color: #1fa67a; font-size: 1.3rem; cursor: pointer; margin-left: 1rem; margin-top: .1rem;" aria-hidden="true"></i> '
|
|
. '<i onclick="event.stopPropagation(); download_submission(\'student\', '.$student->userid.', '.$exercise->id.')" class="fa fa-download" style="float: right; color: #1fa67a; font-size: 1.3rem; cursor: pointer; margin-left: 1rem; margin-top: .1rem;" aria-hidden="true"></i> '
|
|
@@ -994,7 +992,7 @@ class iassign {
|
|
print '<td>
|
|
print '<td>
|
|
<i onclick="open_submission('.$individual->id.')" class="fa fa-external-link" style="color:#1177d1; cursor: pointer; font-size: 1.2rem; margin-right: .5rem;" aria-hidden="true"></i>
|
|
<i onclick="open_submission('.$individual->id.')" class="fa fa-external-link" style="color:#1177d1; cursor: pointer; font-size: 1.2rem; margin-right: .5rem;" aria-hidden="true"></i>
|
|
|
|
|
|
- <i onclick="download_submission(\'individual\', '.$individual->id.')" class="fa fa-download" style="color: #1fa67a; font-size: 1.2rem; cursor: pointer; margin-right: .5rem;" aria-hidden="true"></i>
|
|
|
|
|
|
+ <i onclick="download_submission(\'individual\', '.$individual->id.')" class="fa fa-download" style="color: #1fa67a; font-size: 1.2rem; cursor: pointer; margin-right: .5rem;" aria-hidden="true"></i>
|
|
|
|
|
|
<i class="fa fa-times" onclick="delete_submission(\'individual\', '.$individual->id.', this)" style="color:#C62828; cursor: pointer; font-size: 1.5rem; " aria-hidden="true"></i></td>';
|
|
<i class="fa fa-times" onclick="delete_submission(\'individual\', '.$individual->id.', this)" style="color:#C62828; cursor: pointer; font-size: 1.5rem; " aria-hidden="true"></i></td>';
|
|
print " </tr>\n";
|
|
print " </tr>\n";
|
|
@@ -1683,10 +1681,10 @@ var exercises = [ '; // '
|
|
$iassign = $DB->get_record('iassign', array('id' => $this->activity->get_activity()->iassignid));
|
|
$iassign = $DB->get_record('iassign', array('id' => $this->activity->get_activity()->iassignid));
|
|
$text .= "<a href=\"" . new moodle_url('/mod/iassign/view.php', array('id' => $this->cm->id)) . "\">" . $iassign->name . "</a> ≫ \n";
|
|
$text .= "<a href=\"" . new moodle_url('/mod/iassign/view.php', array('id' => $this->cm->id)) . "\">" . $iassign->name . "</a> ≫ \n";
|
|
|
|
|
|
- $url_submissao = new moodle_url('/mod/iassign/view.php',
|
|
|
|
|
|
+ $url_submissao = new moodle_url('/mod/iassign/view.php',
|
|
array(
|
|
array(
|
|
- 'id' => $this->cm->id,
|
|
|
|
- 'action' => 'viewsubmission',
|
|
|
|
|
|
+ 'id' => $this->cm->id,
|
|
|
|
+ 'action' => 'viewsubmission',
|
|
'iassign_current' => $this->activity->get_activity()->id,
|
|
'iassign_current' => $this->activity->get_activity()->id,
|
|
'userid_iassign' => $USER->id));
|
|
'userid_iassign' => $USER->id));
|
|
|
|
|
|
@@ -1716,13 +1714,13 @@ var exercises = [ '; // '
|
|
foreach ($teachers as $teacher) {
|
|
foreach ($teachers as $teacher) {
|
|
if ($teacher->id != $USER->id) {
|
|
if ($teacher->id != $USER->id) {
|
|
email_to_user(
|
|
email_to_user(
|
|
- $teacher,
|
|
|
|
|
|
+ $teacher,
|
|
$USER->firstname . " " . $USER->lastname . " (via " . $SITE->shortname . ")",
|
|
$USER->firstname . " " . $USER->lastname . " (via " . $SITE->shortname . ")",
|
|
- $subject,
|
|
|
|
- "",
|
|
|
|
- $text,
|
|
|
|
- '',
|
|
|
|
- '',
|
|
|
|
|
|
+ $subject,
|
|
|
|
+ "",
|
|
|
|
+ $text,
|
|
|
|
+ '',
|
|
|
|
+ '',
|
|
false,
|
|
false,
|
|
$userfrom->email,
|
|
$userfrom->email,
|
|
'Não responda a esta mensagem' //TODO: internacionalizar
|
|
'Não responda a esta mensagem' //TODO: internacionalizar
|
|
@@ -2849,7 +2847,7 @@ var exercises = [ '; // '
|
|
$this->activity->view_dates();
|
|
$this->activity->view_dates();
|
|
$USER->iassignEdit = $this->bottonPost;
|
|
$USER->iassignEdit = $this->bottonPost;
|
|
$this->activity->show_info_iassign();
|
|
$this->activity->show_info_iassign();
|
|
-
|
|
|
|
|
|
+
|
|
if ($iassign_submission) {
|
|
if ($iassign_submission) {
|
|
//xxx $param_aux = "action=get_answer&iassign_submission_current=" . $iassign_submission->id . "&id=" . $id . "&iassign_current=" . $this->activity->get_activity()->id . "&write_solution=" . $this->write_solution . "&userid_iassign=" . $USER->id;
|
|
//xxx $param_aux = "action=get_answer&iassign_submission_current=" . $iassign_submission->id . "&id=" . $id . "&iassign_current=" . $this->activity->get_activity()->id . "&write_solution=" . $this->write_solution . "&userid_iassign=" . $USER->id;
|
|
$param_aux = "action=get_answer&iassign_submission_current=" . $iassign_submission->id . "&id=" . $id . "&iassign_current=" . $this->activity->get_activity()->id . "&userid_iassign=" . $USER->id;
|
|
$param_aux = "action=get_answer&iassign_submission_current=" . $iassign_submission->id . "&id=" . $id . "&iassign_current=" . $this->activity->get_activity()->id . "&userid_iassign=" . $USER->id;
|
|
@@ -3195,7 +3193,7 @@ var exercises = [ '; // '
|
|
|
|
|
|
print '<table width=100% border=0 valign="top">' . "\n";
|
|
print '<table width=100% border=0 valign="top">' . "\n";
|
|
print '<tr><td width=60% valign="top">' . "\n";
|
|
print '<tr><td width=60% valign="top">' . "\n";
|
|
-
|
|
|
|
|
|
+
|
|
$flag_dependency = true;
|
|
$flag_dependency = true;
|
|
|
|
|
|
if ($iassign_statement_activity_item->type_iassign == 3) {
|
|
if ($iassign_statement_activity_item->type_iassign == 3) {
|
|
@@ -3321,7 +3319,7 @@ var exercises = [ '; // '
|
|
print '</tr></table>' . "\n";
|
|
print '</tr></table>' . "\n";
|
|
|
|
|
|
// Presents the iLM
|
|
// Presents the iLM
|
|
-
|
|
|
|
|
|
+
|
|
print '<table width=100% border=0 valign="top">' . "\n";
|
|
print '<table width=100% border=0 valign="top">' . "\n";
|
|
print '<td width=80% align="left">';
|
|
print '<td width=80% align="left">';
|
|
print '<strong>' . $last_iassign . ' ' . get_string('repeat_msg', 'iassign') . '</strong></td>' . "\n"; // If you want to do this activity from the beginning again, use the \"Redo button\".
|
|
print '<strong>' . $last_iassign . ' ' . get_string('repeat_msg', 'iassign') . '</strong></td>' . "\n"; // If you want to do this activity from the beginning again, use the \"Redo button\".
|
|
@@ -3641,10 +3639,10 @@ var exercises = [ '; // '
|
|
print '<tr><th class="header c1">' . get_string('students', 'iassign') . '</th>' . "\n";
|
|
print '<tr><th class="header c1">' . get_string('students', 'iassign') . '</th>' . "\n";
|
|
|
|
|
|
$width = 90/$num_exerc;
|
|
$width = 90/$num_exerc;
|
|
-
|
|
|
|
|
|
+
|
|
for ($j=1; $j<$num_exerc; $j++) { // all exercises on this block
|
|
for ($j=1; $j<$num_exerc; $j++) { // all exercises on this block
|
|
$sum_iassign_correct[$j] = 0;
|
|
$sum_iassign_correct[$j] = 0;
|
|
-
|
|
|
|
|
|
+
|
|
print '<th class="header c1" scope="col" style="width:'.$width.'%; text-align: center;">' . $num[$j]->id . '</th>' . "\n"; // <th class="header c1" scope="col">
|
|
print '<th class="header c1" scope="col" style="width:'.$width.'%; text-align: center;">' . $num[$j]->id . '</th>' . "\n"; // <th class="header c1" scope="col">
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3788,9 +3786,9 @@ var exercises = [ '; // '
|
|
print $feedback . ' (' . $tentativas . ')<br>' . $comment . ' (' . $sum_comment . ') ' . "\n";
|
|
print $feedback . ' (' . $tentativas . ')<br>' . $comment . ' (' . $sum_comment . ') ' . "\n";
|
|
|
|
|
|
} // if ($student_submissions)
|
|
} // if ($student_submissions)
|
|
- else { // if ($student_submissions)
|
|
|
|
|
|
+ else { // if ($student_submissions)
|
|
// Student does not have any submission
|
|
// Student does not have any submission
|
|
-
|
|
|
|
|
|
+
|
|
// informations to browse previous activities
|
|
// informations to browse previous activities
|
|
if ($j - 1 < 1 || $j == $i) $iassign_previous = "-1";
|
|
if ($j - 1 < 1 || $j == $i) $iassign_previous = "-1";
|
|
else $iassign_previous = $num[$j - 1]->iassignid;
|
|
else $iassign_previous = $num[$j - 1]->iassignid;
|
|
@@ -4424,9 +4422,9 @@ var exercises = [ '; // '
|
|
. $user->firstname . ' ' . $user->lastname . ' </td>'.
|
|
. $user->firstname . ' ' . $user->lastname . ' </td>'.
|
|
'<td class="align-middle"> <a href="'.$submission_url.'#comments"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a></td>'
|
|
'<td class="align-middle"> <a href="'.$submission_url.'#comments"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a></td>'
|
|
.'</tr>';
|
|
.'</tr>';
|
|
-
|
|
|
|
|
|
+
|
|
$total_include++;
|
|
$total_include++;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
print '</td></tr></table>';
|
|
print '</td></tr></table>';
|
|
@@ -4438,7 +4436,7 @@ var exercises = [ '; // '
|
|
print '<h6 class="ml-5">'.get_string('empty_new_messages_block', 'iassign').'</h6>';
|
|
print '<h6 class="ml-5">'.get_string('empty_new_messages_block', 'iassign').'</h6>';
|
|
print '<hr class="my-4">';
|
|
print '<hr class="my-4">';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if ($messages && $total_include == count($messages)) {
|
|
if ($messages && $total_include == count($messages)) {
|
|
print $OUTPUT->footer();
|
|
print $OUTPUT->footer();
|
|
return;
|
|
return;
|
|
@@ -4451,7 +4449,7 @@ var exercises = [ '; // '
|
|
foreach ($messages as $item)
|
|
foreach ($messages as $item)
|
|
if (!in_array($item->iasid, $iassign_ids) && $item->iasid != $actual_block)
|
|
if (!in_array($item->iasid, $iassign_ids) && $item->iasid != $actual_block)
|
|
array_push($iassign_ids, $item->iasid);
|
|
array_push($iassign_ids, $item->iasid);
|
|
-
|
|
|
|
|
|
+
|
|
foreach ($iassign_ids as $id_iassign) {
|
|
foreach ($iassign_ids as $id_iassign) {
|
|
$printed = false;
|
|
$printed = false;
|
|
|
|
|
|
@@ -4516,7 +4514,7 @@ var exercises = [ '; // '
|
|
|
|
|
|
function view_notifications () {
|
|
function view_notifications () {
|
|
global $OUTPUT, $USER;
|
|
global $OUTPUT, $USER;
|
|
-
|
|
|
|
|
|
+
|
|
print $OUTPUT->header();
|
|
print $OUTPUT->header();
|
|
|
|
|
|
$this->print_main_menu();
|
|
$this->print_main_menu();
|
|
@@ -4551,7 +4549,7 @@ var exercises = [ '; // '
|
|
$student_url = "view.php?id=$id&userid_iassign=$USER->id&action=view&iassign_current=$item->stid#comments";
|
|
$student_url = "view.php?id=$id&userid_iassign=$USER->id&action=view&iassign_current=$item->stid#comments";
|
|
|
|
|
|
$link_student = "<a href='$student_url'>" . $item->stname . "</a>";
|
|
$link_student = "<a href='$student_url'>" . $item->stname . "</a>";
|
|
-
|
|
|
|
|
|
+
|
|
$label = $item->total > 1 ? get_string('comment_unread', 'iassign') : get_string('comment_unread_one', 'iassign');
|
|
$label = $item->total > 1 ? get_string('comment_unread', 'iassign') : get_string('comment_unread_one', 'iassign');
|
|
|
|
|
|
print '<tr><td style="white-space: nowrap; width: 1%; padding-right: 2rem;" class="align-middle">' . $link_student . '</td><td class="align-middle"> <a href="'.$student_url.'"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a></td></tr>';
|
|
print '<tr><td style="white-space: nowrap; width: 1%; padding-right: 2rem;" class="align-middle">' . $link_student . '</td><td class="align-middle"> <a href="'.$student_url.'"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a></td></tr>';
|
|
@@ -4565,7 +4563,7 @@ var exercises = [ '; // '
|
|
print '<h6 class="ml-5">'.get_string('empty_new_messages_block', 'iassign').'</h6>';
|
|
print '<h6 class="ml-5">'.get_string('empty_new_messages_block', 'iassign').'</h6>';
|
|
print '<hr class="my-4">';
|
|
print '<hr class="my-4">';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if ($messages && $total_include == count($messages)) {
|
|
if ($messages && $total_include == count($messages)) {
|
|
print $OUTPUT->footer();
|
|
print $OUTPUT->footer();
|
|
return;
|
|
return;
|
|
@@ -4573,7 +4571,7 @@ var exercises = [ '; // '
|
|
|
|
|
|
|
|
|
|
print '<h4 class="mt-4 mb-3 ml-2"><i class="fa fa-comments-o" aria-hidden="true"></i> '.get_string('new_messages_other_blocks', 'iassign').'</h4>';
|
|
print '<h4 class="mt-4 mb-3 ml-2"><i class="fa fa-comments-o" aria-hidden="true"></i> '.get_string('new_messages_other_blocks', 'iassign').'</h4>';
|
|
-
|
|
|
|
|
|
+
|
|
// 2º. listar as mensagens recebidas nos demais blocos do curso:
|
|
// 2º. listar as mensagens recebidas nos demais blocos do curso:
|
|
$iassign_ids = array();
|
|
$iassign_ids = array();
|
|
if ($messages)
|
|
if ($messages)
|
|
@@ -4592,11 +4590,11 @@ var exercises = [ '; // '
|
|
|
|
|
|
print '<table class="table table-hover ml-5 w-75" style="border-bottom: 1px solid #dee2e6;">';
|
|
print '<table class="table table-hover ml-5 w-75" style="border-bottom: 1px solid #dee2e6;">';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
$student_url = "view.php?id=$id&userid_iassign=$USER->id&action=view&iassign_current=$item->stid#comments";
|
|
$student_url = "view.php?id=$id&userid_iassign=$USER->id&action=view&iassign_current=$item->stid#comments";
|
|
|
|
|
|
$link_student = "<a href='$student_url'>" . $item->stname . "</a>";
|
|
$link_student = "<a href='$student_url'>" . $item->stname . "</a>";
|
|
-
|
|
|
|
|
|
+
|
|
$label = $item->total > 1 ? get_string('comment_unread', 'iassign') : get_string('comment_unread_one', 'iassign');
|
|
$label = $item->total > 1 ? get_string('comment_unread', 'iassign') : get_string('comment_unread_one', 'iassign');
|
|
|
|
|
|
print '<tr><td style="white-space: nowrap; width: 1%; padding-right: 2rem;" class="align-middle">' . $link_student . '</td><td class="align-middle"> <a href="'.$student_url.'"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a> </td></tr>';
|
|
print '<tr><td style="white-space: nowrap; width: 1%; padding-right: 2rem;" class="align-middle">' . $link_student . '</td><td class="align-middle"> <a href="'.$student_url.'"><span class="badge bg-danger" style="color:white; font-size: .9em;"><i class="fa fa-envelope" aria-hidden="true"></i> ' . $label . ' <span class="badge rounded-pill bg-light text-dark" style="font-size: .8em;">'.$item->total.'</span> </span></a> </td></tr>';
|
|
@@ -4616,7 +4614,7 @@ var exercises = [ '; // '
|
|
$id = $this->cm->id;
|
|
$id = $this->cm->id;
|
|
|
|
|
|
$actual_action = optional_param('action', '', PARAM_TEXT);
|
|
$actual_action = optional_param('action', '', PARAM_TEXT);
|
|
-
|
|
|
|
|
|
+
|
|
$url_help = new moodle_url('/mod/iassign/settings_ilm.php', array('action' => 'list', 'ilm_id' => 1));
|
|
$url_help = new moodle_url('/mod/iassign/settings_ilm.php', array('action' => 'list', 'ilm_id' => 1));
|
|
$url_report = new moodle_url('/mod/iassign/view.php', array('action' => 'report', 'id' => $id, 'iassignid' => $this->iassign->id));
|
|
$url_report = new moodle_url('/mod/iassign/view.php', array('action' => 'report', 'id' => $id, 'iassignid' => $this->iassign->id));
|
|
$url_add = new moodle_url('/mod/iassign/view.php', array('id' => $id, 'action' => 'add', 'iassignid' => $this->iassign->id));
|
|
$url_add = new moodle_url('/mod/iassign/view.php', array('id' => $id, 'action' => 'add', 'iassignid' => $this->iassign->id));
|
|
@@ -4654,9 +4652,9 @@ var exercises = [ '; // '
|
|
print '<a href="' . $url_stats . '" class="btn btn-outline-primary ' . ($actual_action == 'stats_student' ? 'active' : '') . '"><i class="fa fa-list" aria-hidden="true"></i> ' . get_string('results', 'iassign') . '</a>';
|
|
print '<a href="' . $url_stats . '" class="btn btn-outline-primary ' . ($actual_action == 'stats_student' ? 'active' : '') . '"><i class="fa fa-list" aria-hidden="true"></i> ' . get_string('results', 'iassign') . '</a>';
|
|
|
|
|
|
print '<a href="' . $url_auto_evaluate . '" class="btn btn-outline-primary ' . ($actual_action == 'auto_evaluate' ? 'active' : '') . '"><i class="fa fa-check-square-o" aria-hidden="true"></i> ' . get_string('auto_evaluate_name_config', 'iassign') . '</a>';
|
|
print '<a href="' . $url_auto_evaluate . '" class="btn btn-outline-primary ' . ($actual_action == 'auto_evaluate' ? 'active' : '') . '"><i class="fa fa-check-square-o" aria-hidden="true"></i> ' . get_string('auto_evaluate_name_config', 'iassign') . '</a>';
|
|
-
|
|
|
|
|
|
+
|
|
} // if (has_capability('mod/iassign:viewiassignall', $this->context, $USER->id))
|
|
} // if (has_capability('mod/iassign:viewiassignall', $this->context, $USER->id))
|
|
-
|
|
|
|
|
|
+
|
|
$notifications = $this->get_total_notifications();
|
|
$notifications = $this->get_total_notifications();
|
|
|
|
|
|
print '<a href="' . $url_notifications . '" class="btn btn-outline-primary ' . ($actual_action == 'notifications' ? 'active' : '') . '">' . "\n"; // '
|
|
print '<a href="' . $url_notifications . '" class="btn btn-outline-primary ' . ($actual_action == 'notifications' ? 'active' : '') . '">' . "\n"; // '
|
|
@@ -4664,7 +4662,7 @@ var exercises = [ '; // '
|
|
|
|
|
|
if ($notifications > 0)
|
|
if ($notifications > 0)
|
|
print ' <span class="badge bg-danger rounded-pill" style="color: white; font-size: .9rem;">'.$notifications.'</span>';
|
|
print ' <span class="badge bg-danger rounded-pill" style="color: white; font-size: .9rem;">'.$notifications.'</span>';
|
|
-
|
|
|
|
|
|
+
|
|
print '</a></div><div class="btn-group">';
|
|
print '</a></div><div class="btn-group">';
|
|
|
|
|
|
if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
@@ -5871,7 +5869,7 @@ class activity {
|
|
$output .= $this->toggle_columns_script();
|
|
$output .= $this->toggle_columns_script();
|
|
|
|
|
|
$output .= '<p><strong>' . get_string('proposition', 'iassign') . ':</strong></p> <div class="proposition">' . $this->activity->proposition . '</div>' . "\n";
|
|
$output .= '<p><strong>' . get_string('proposition', 'iassign') . ':</strong></p> <div class="proposition">' . $this->activity->proposition . '</div>' . "\n";
|
|
-
|
|
|
|
|
|
+
|
|
print $OUTPUT->box($output);
|
|
print $OUTPUT->box($output);
|
|
} // function show_info_iassign()
|
|
} // function show_info_iassign()
|
|
|
|
|