From 052f429e3e5f7bbec582cc69964870a93faab10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Rodr=C3=ADguez=20del=20Pino?= Date: Sat, 13 Jan 2024 13:52:18 +0000 Subject: [PATCH] Replaces 'gradenoun' str by 'grade' for backward compatibility. --- forms/grade_form.php | 4 ++-- forms/gradesubmission.php | 2 +- forms/submissionview.php | 2 +- index.php | 2 +- lib.php | 6 +++--- views/submissionslist.php | 8 ++++---- vpl.class.php | 4 ++-- vpl_submission.class.php | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/forms/grade_form.php b/forms/grade_form.php index 656edb37..4b9e32a5 100644 --- a/forms/grade_form.php +++ b/forms/grade_form.php @@ -75,7 +75,7 @@ protected function definition() { // Type value => introduce value. $grade = $vpl->get_grade(); if ($grade != 0) { - $this->addHTML( s( get_string('gradenoun') . ' ' ) ); + $this->addHTML( s( get_string('grade') . ' ' ) ); if ($grade > 0) { $this->addText( 'grade', '', 6 ); $reduction = 0; @@ -97,7 +97,7 @@ protected function definition() { $this->addHTML( '  ' ); } $class = " class='btn btn-secondary'"; - $this->addSubmitButton( 'save', get_string('gradenoun') ); + $this->addSubmitButton( 'save', get_string('grade') ); if ($inpopup) { $this->addSubmitButton( 'savenext', get_string( 'gradeandnext', VPL ) ); } diff --git a/forms/gradesubmission.php b/forms/gradesubmission.php index 9f3c559e..55a008d4 100644 --- a/forms/gradesubmission.php +++ b/forms/gradesubmission.php @@ -35,7 +35,7 @@ function vpl_grade_header($vpl, $inpopup) { if ($inpopup) { $vpl->print_header_simple(); } else { - $vpl->print_header( get_string('gradenoun') ); + $vpl->print_header( get_string('grade') ); $vpl->print_view_tabs( basename( __FILE__ ) ); } } diff --git a/forms/submissionview.php b/forms/submissionview.php index 4a0d44d9..cc21c925 100644 --- a/forms/submissionview.php +++ b/forms/submissionview.php @@ -110,7 +110,7 @@ if ($vpl->get_visiblegrade() || $vpl->has_capability( VPL_GRADE_CAPABILITY )) { if ($submission->is_graded()) { - echo '

' . get_string('gradenoun') . '

'; + echo '

' . get_string('grade') . '

'; $submission->print_grade( true ); \mod_vpl\event\submission_grade_viewed::log($submission); } diff --git a/index.php b/index.php index 8465f417..a6041543 100644 --- a/index.php +++ b/index.php @@ -294,7 +294,7 @@ function get_select_detailedmore($urlbase, $value = '0') { $table->align[] = 'right'; } if ($student && ! $nograde) { - $table->head[] = get_string('gradenoun'); + $table->head[] = get_string('grade'); $table->align[] = 'left'; } if ($detailedmore) { diff --git a/lib.php b/lib.php index 4c55b099..e57d8b16 100644 --- a/lib.php +++ b/lib.php @@ -438,7 +438,7 @@ function vpl_user_outline($course, $user, $mod, $instance) { $info = get_string( 'submission', VPL, count( $subs ) ); } if ($subinstance->dategraded) { - $info .= '
' . get_string('gradenoun') . ': ' . $submission->get_grade_core(); + $info .= '
' . get_string('grade') . ': ' . $submission->get_grade_core(); } $url = vpl_mod_href( 'forms/submissionview.php', 'id', $vpl->get_course_module()->id, 'userid', $user->id ); $return->info = '' . $info . ''; @@ -683,7 +683,7 @@ function vpl_extend_navigation(navigation_node $vplnode, $course, $module, $cm) if (! $example) { if ($grader && $USER->id != $userid) { $url = new moodle_url( '/mod/vpl/forms/gradesubmission.php', $parm); - $node = vpl_navi_node_create($vplnode, 'gradenoun', $url, navigation_node::TYPE_SETTING, 'core'); + $node = vpl_navi_node_create($vplnode, 'grade', $url, navigation_node::TYPE_SETTING, 'core'); $vplnode->add_node( $node ); } $url = new moodle_url( '/mod/vpl/forms/submissionview.php', $parm ); @@ -791,7 +791,7 @@ function vpl_extend_settings_navigation(settings_navigation $settings, navigatio $testact->add_node( $node, $keybefore ); if ( $userid != $USER->id ) { // Auto grading has sense? $url = new moodle_url( '/mod/vpl/forms/gradesubmission.php', $parms ); - $node = vpl_navi_node_create($testact, 'gradenoun', $url, navigation_node::TYPE_SETTING, 'core'); + $node = vpl_navi_node_create($testact, 'grade', $url, navigation_node::TYPE_SETTING, 'core'); $testact->add_node( $node, $keybefore ); } $url = new moodle_url( '/mod/vpl/views/previoussubmissionslist.php', $parms ); diff --git a/views/submissionslist.php b/views/submissionslist.php index 77e689f6..cd76ab17 100644 --- a/views/submissionslist.php +++ b/views/submissionslist.php @@ -367,7 +367,7 @@ function vpl_get_action_link($str, $link, $comp = 'mod_vpl') { ]; // Load strings. $strsubtime = get_string( 'submittedon', VPL ) . vpl_submissionlist_arrow( $baseurl, 'datesubmitted', $sort, $sortdir ); -$strgrade = get_string('gradenoun') . vpl_submissionlist_arrow( $baseurl, 'gradesortable', $sort, $sortdir ); +$strgrade = get_string('grade') . vpl_submissionlist_arrow( $baseurl, 'gradesortable', $sort, $sortdir ); $strgrader = get_string( 'grader', VPL ) . vpl_submissionlist_arrow( $baseurl, 'grader', $sort, $sortdir ); $strgradedon = get_string( 'gradedon', VPL ) . vpl_submissionlist_arrow( $baseurl, 'dategraded', $sort, $sortdir ); $strcomments = get_string( 'gradercomments', VPL ); @@ -473,7 +473,7 @@ function vpl_get_action_link($str, $link, $comp = 'mod_vpl') { $action = new popup_action( 'click', $hrefgrade, 'gradesub' . $user->id, $options ); $grade = $OUTPUT->action_link( $hrefgrade, $text, $action ); $link = new moodle_url('/mod/vpl/forms/gradesubmission.php', $linkparms); - $actions->add( vpl_get_action_link('gradenoun', $link, 'core') ); + $actions->add( vpl_get_action_link('grade', $link, 'core') ); // Add new next user. if ($lastid) { $nextids[$lastid] = $user->id; @@ -521,7 +521,7 @@ function vpl_get_action_link($str, $link, $comp = 'mod_vpl') { $grader = ' '; $gradedon = ' '; $link = new moodle_url('/mod/vpl/forms/gradesubmission.php', $linkparms); - $actions->add(vpl_get_action_link('gradenoun', $link, 'core')); + $actions->add(vpl_get_action_link('grade', $link, 'core')); // Add new next user. if ($lastid) { $nextids[$lastid] = $user->id; @@ -577,7 +577,7 @@ function vpl_get_action_link($str, $link, $comp = 'mod_vpl') { $namehead = get_string( 'firstname' ) . ' / ' . get_string( 'lastname' ); } $tablegraders = new html_table(); - $tablegraders->head = ['#', $namehead, get_string('gradenoun')]; + $tablegraders->head = ['#', $namehead, get_string('grade')]; $tablegraders->align = ['right', 'left', 'center']; $tablegraders->wrap = ['nowrap', 'nowrap', 'nowrap']; $tablegraders->data = []; diff --git a/vpl.class.php b/vpl.class.php index 23b172f6..fa097971 100644 --- a/vpl.class.php +++ b/vpl.class.php @@ -1684,8 +1684,8 @@ public function print_view_tabs($path) { || $subinstance->grader == $USER->id || $subinstance->grader == 0)) { $href = vpl_mod_href( 'forms/gradesubmission.php', 'id', $cmid, 'userid', $userid ); - $text = get_string('gradenoun'); - $tabs[] = vpl_create_tabobject( 'gradesubmission.php', $href, 'gradenoun', 'core' ); + $text = get_string('grade'); + $tabs[] = vpl_create_tabobject( 'gradesubmission.php', $href, 'grade', 'core' ); } if ($subinstance && ($grader || $similarity)) { $href = vpl_mod_href( 'views/previoussubmissionslist.php', 'id', $cmid, 'userid', $userid ); diff --git a/vpl_submission.class.php b/vpl_submission.class.php index b3ccc2ce..9047da09 100644 --- a/vpl_submission.class.php +++ b/vpl_submission.class.php @@ -751,7 +751,7 @@ public function print_grade($detailed = false, $return = false) { $a->gradername = fullname( $grader ); $ret .= get_string( 'gradedonby', VPL, $a ) . '
'; if ($this->vpl->get_grade() != 0) { - $ret .= $this->vpl->str_restriction('gradenoun', $this->get_grade_core(), false, 'core') . '
'; + $ret .= $this->vpl->str_restriction('grade', $this->get_grade_core(), false, 'core') . '
'; if ($detailed) { $ret .= $this->get_detailed_grade(); }