|
@@ -1316,8 +1316,8 @@ class iassign {
|
|
|
|
|
|
|
|
|
|
|
|
- print '<strong>' . get_string('legend', 'iassign') . '</strong>';
|
|
|
- print ' ' . iassign_icons::insert('correct') . ' ' . get_string('correct', 'iassign');
|
|
|
+ print '<strong>' . get_string('legend', 'iassign') . '</strong> <br>';
|
|
|
+ print ' ' . iassign_icons::insert('correct') . ' ' . get_string('correct', 'iassign');
|
|
|
print ' ' . iassign_icons::insert('incorrect') . ' ' . get_string('incorrect', 'iassign');
|
|
|
print ' ' . iassign_icons::insert('post') . ' ' . get_string('post', 'iassign');
|
|
|
print ' ' . iassign_icons::insert('not_post') . ' ' . get_string('not_post', 'iassign');
|
|
@@ -1328,7 +1328,7 @@ class iassign {
|
|
|
print '</td>' . "\n";
|
|
|
if ($this->action != 'print') {
|
|
|
$link_print = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=print&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('print') . ' ' . get_string('print', 'iassign') . "</a>";
|
|
|
- $link_stats = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=stats&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('results') . ' ' . get_string('graphic', 'iassign') . "</a>";
|
|
|
+
|
|
|
$link_export = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=export_csv&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('export_ilm') . ' ' . get_string('export_csv', 'iassign') . "</a>";
|
|
|
$link_auto_evaluate = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=auto_evaluate&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('correct') . ' ' . get_string('auto_evaluate_reprocess', 'iassign') . "</a>";
|
|
|
print '<td width=15% align="right">' . $link_stats . '</td>' . "\n";
|
|
@@ -1338,12 +1338,6 @@ class iassign {
|
|
|
}
|
|
|
print '</tr></table>' . "\n";
|
|
|
}
|
|
|
- elseif (has_capability('mod/iassign:submitiassign', $this->context, $USER->id)) {
|
|
|
- $link_stats = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=stats_student&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('results') . ' ' . get_string('results', 'iassign') . "</a>";
|
|
|
- print '<td width=15% align="right">' . $link_stats . '</td>' . "\n";
|
|
|
- print '</tr></table>' . "\n";
|
|
|
- }
|
|
|
- else
|
|
|
print '</td></tr></table>' . "\n";
|
|
|
}
|
|
|
|
|
@@ -2803,36 +2797,32 @@ class iassign {
|
|
|
else if ($notice != '')
|
|
|
print($OUTPUT->notification(get_string($notice, 'iassign'), 'notifysuccess'));
|
|
|
|
|
|
- print $OUTPUT->box_start();
|
|
|
|
|
|
- print '<table width=100% border=0><tr>' . "\n";
|
|
|
+
|
|
|
$url_help = new moodle_url('/mod/iassign/settings_ilm.php', array('action' => 'list', 'ilm_id' => 1));
|
|
|
$action_help = new popup_action('click', $url_help, 'iplookup', array('title' => get_string('help_ilm', 'iassign'), 'width' => 1200, 'height' => 700));
|
|
|
|
|
|
- $link_help = $OUTPUT->action_link($url_help, iassign_icons::insert('help_ilm') . get_string('help_ilm', 'iassign'), $action_help);
|
|
|
- $link_add = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=add&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('add_iassign') . get_string('add_iassign', 'iassign') . "</a>";
|
|
|
- $link_report = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=report&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('view_report') . get_string('report', 'iassign') . "</a>";
|
|
|
+ $link_help = $OUTPUT->action_link($url_help, iassign_icons::insert('help_ilm') . ' ' . get_string('help_ilm', 'iassign'), $action_help);
|
|
|
+ $link_add = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=add&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('add_iassign') . ' ' . get_string('add_iassign', 'iassign') . "</a>";
|
|
|
+ $link_report = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=report&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('view_report') . ' ' . get_string('report', 'iassign') . "</a>";
|
|
|
|
|
|
|
|
|
if (has_capability('mod/iassign:viewiassignall', $this->context, $USER->id)) {
|
|
|
|
|
|
|
|
|
- print '<td width=10% align="left">' . "\n";
|
|
|
- print $link_help;
|
|
|
- print '</td>' . "\n";
|
|
|
- print '<td width=10% align="left">' . "\n";
|
|
|
- print $link_report;
|
|
|
- print '</td>' . "\n";
|
|
|
}
|
|
|
if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
|
- print '<td width=15% align="left">' . "\n";
|
|
|
- print $link_add;
|
|
|
- print "</td>\n";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ print '<div style="float: right;">';
|
|
|
if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
|
if ($iassign_list) {
|
|
|
- print '<td align="right">' . "\n";
|
|
|
-
|
|
|
|
|
|
|
|
|
if (!isset($USER->iassignEdit))
|
|
@@ -2850,15 +2840,22 @@ class iassign {
|
|
|
print "\n<form name='formEditPost' id='formEditPost' method='post' action='$editPost' enctype='multipart/form-data'>\n";
|
|
|
print " <input type=submit value='$bottonEdit_message'/>\n";
|
|
|
print "</form>\n";
|
|
|
- print "</td>\n";
|
|
|
+ print "<br><br>";
|
|
|
}
|
|
|
}
|
|
|
- print '</tr></table>' . "\n";
|
|
|
-
|
|
|
- if (has_capability('mod/iassign:submitiassign', $this->context, $USER->id))
|
|
|
- $this->view_legend_icons();
|
|
|
-
|
|
|
- print $OUTPUT->box_end();
|
|
|
+ if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
|
+ print $link_add . '<br><br>';
|
|
|
+ print $link_report . '<br><br>';
|
|
|
+ }
|
|
|
+ if (has_capability('mod/iassign:submitiassign', $this->context, $USER->id)) {
|
|
|
+ $link_stats = "<a href='" . $CFG->wwwroot . "/mod/iassign/view.php?id=" . $id . "&action=stats_student&iassignid=" . $this->iassign->id . "'>" . iassign_icons::insert('results') . ' ' . get_string('results', 'iassign') . "</a>";
|
|
|
+ print '<td width=15% align="right">' . $link_stats . '</td>' . "\n";
|
|
|
+ print '</tr></table>' . "\n";
|
|
|
+ }
|
|
|
+ if (has_capability('mod/iassign:editiassign', $this->context, $USER->id)) {
|
|
|
+ print '<br><br>'.$link_help . '<br><br>';
|
|
|
+ }
|
|
|
+ print '</div>';
|
|
|
|
|
|
$iassign_array_exercise = array();
|
|
|
$i_exercise = 0;
|
|
@@ -2895,15 +2892,15 @@ class iassign {
|
|
|
}
|
|
|
|
|
|
if ($iassign_array_exercise) {
|
|
|
- $title = get_string('exercise', 'iassign');
|
|
|
+ $title = get_string('exercise', 'iassign').(count($iassign_array_exercise)>1?'s':'');
|
|
|
$this->show_iassign($title, $iassign_array_exercise, $i_exercise);
|
|
|
}
|
|
|
if ($iassign_array_test) {
|
|
|
- $title = get_string('test', 'iassign');
|
|
|
+ $title = get_string('test', 'iassign').(count($iassign_array_test)>1?'s':'');
|
|
|
$this->show_iassign($title, $iassign_array_test, $i_test);
|
|
|
}
|
|
|
if ($iassign_array_example) {
|
|
|
- $title = get_string('example', 'iassign');
|
|
|
+ $title = get_string('example', 'iassign').(count($iassign_array_example)>1?'s':'');;
|
|
|
$this->show_iassign($title, $iassign_array_example, $i_example);
|
|
|
}
|
|
|
if ($iassign_array_general) {
|
|
@@ -2934,6 +2931,9 @@ class iassign {
|
|
|
print $OUTPUT->box_end();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (has_capability('mod/iassign:submitiassign', $this->context, $USER->id))
|
|
|
+ $this->view_legend_icons();
|
|
|
}
|
|
|
|
|
|
|