diff --git a/lang/en/rating.php b/lang/en/rating.php index 2fff2a35e3a..17065277a8f 100644 --- a/lang/en/rating.php +++ b/lang/en/rating.php @@ -24,6 +24,12 @@ */ $string['aggregatetype'] = 'Aggregate type'; +$string['aggregateavg'] = 'Average of ratings'; +$string['aggregatecount'] = 'Count of ratings'; +$string['aggregatemax'] = 'Maximum rating'; +$string['aggregatemin'] = 'Minimum rating'; +$string['aggregatenone'] = 'No ratings'; +$string['aggregatesum'] = 'Sum of ratings'; $string['aggregatetype_help'] = 'The aggregate type defines how ratings are combined to form the final grade in the gradebook. * Average of ratings - The mean of all ratings @@ -35,9 +41,10 @@ $string['aggregatetype_help'] = 'The aggregate type defines how ratings are comb If "No ratings" is selected, then the activity will not appear in the gradebook.'; $string['allowratings'] = 'Allow items to be rated?'; $string['capabilitychecknotavailable'] = 'Capability check not available until activity is saved'; +$string['couldnotdeleteratings'] = 'Sorry, that cannot be deleted as people have already rated it'; $string['norate'] = 'Rating of items not allowed!'; -$string['noviewanyrate'] = 'You can only look at results for posts that you made'; -$string['noviewrate'] = 'You do not have the capability to view post ratings'; +$string['noviewanyrate'] = 'You can only look at results for items that you made'; +$string['noviewrate'] = 'You do not have the capability to view item ratings'; $string['rate'] = 'Rate'; $string['ratepermissiondenied'] = 'You do not have permission to rate this item'; $string['rating'] = 'Rating'; diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 70fbf9a2bc9..879882b5bfb 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1402,19 +1402,19 @@ class core_renderer extends renderer_base { $aggregatelabel = ''; switch ($rating->settings->aggregationmethod) { case RATING_AGGREGATE_AVERAGE : - $aggregatelabel .= get_string("aggregateavg", "forum"); + $aggregatelabel .= get_string("aggregateavg", "rating"); break; case RATING_AGGREGATE_COUNT : - $aggregatelabel .= get_string("aggregatecount", "forum"); + $aggregatelabel .= get_string("aggregatecount", "rating"); break; case RATING_AGGREGATE_MAXIMUM : - $aggregatelabel .= get_string("aggregatemax", "forum"); + $aggregatelabel .= get_string("aggregatemax", "rating"); break; case RATING_AGGREGATE_MINIMUM : - $aggregatelabel .= get_string("aggregatemin", "forum"); + $aggregatelabel .= get_string("aggregatemin", "rating"); break; case RATING_AGGREGATE_SUM : - $aggregatelabel .= get_string("aggregatesum", "forum"); + $aggregatelabel .= get_string("aggregatesum", "rating"); break; } diff --git a/mod/data/lang/en/data.php b/mod/data/lang/en/data.php index c8d393da61b..9d8a4d95518 100755 --- a/mod/data/lang/en/data.php +++ b/mod/data/lang/en/data.php @@ -29,7 +29,6 @@ $string['addcomment'] = 'Add comment'; $string['addentries'] = 'Add entries'; $string['addtemplate'] = 'Add template'; $string['advancedsearch'] = 'Advanced search'; -$string['allowratings'] = 'Allow posts to be rated?'; $string['alttext'] = 'Alternative text'; $string['approve'] = 'Approve'; $string['approved'] = 'Approved'; @@ -55,7 +54,6 @@ $string['cancel'] = 'Cancel'; $string['cannotaccesspresentsother'] = 'You are not allowed to access presets from other users'; $string['cannotadd'] = 'Can not add entries!'; $string['cannotdeletepreset'] = 'Error deleting a preset!'; -$string['cannotrate'] = 'Rating of items not allowed!'; $string['cannotunziptopreset'] = 'Cannot unzip to the preset directory'; $string['columns'] = 'columns'; $string['comment'] = 'Comment'; @@ -159,7 +157,6 @@ $string['foundrecords'] = 'Found records: {$a->num}/{$a->max} ('; - echo ''; - echo ''; - } - }*/ global $OUTPUT; if( !empty($record->rating) ){ echo $OUTPUT->render($record->rating); diff --git a/mod/forum/lang/en/forum.php b/mod/forum/lang/en/forum.php index e3eab06ef79..8b6a0653a31 100644 --- a/mod/forum/lang/en/forum.php +++ b/mod/forum/lang/en/forum.php @@ -27,17 +27,8 @@ $string['addanewdiscussion'] = 'Add a new discussion topic'; $string['addanewquestion'] = 'Add a new question'; $string['addanewtopic'] = 'Add a new topic'; $string['advancedsearch'] = 'Advanced search'; -$string['aggregateavg'] = 'Average of ratings'; -$string['aggregatecount'] = 'Count of ratings'; -$string['aggregatecountformat'] = '{$a->count} (grade: {$a->grade})'; -$string['aggregatemax'] = 'Maximum rating'; -$string['aggregatemin'] = 'Minimum rating'; -$string['aggregatenone'] = 'No ratings'; -$string['aggregatesum'] = 'Sum of ratings'; -$string['ajaxrating'] = 'Enable AJAX rating'; $string['allforums'] = 'All forums'; $string['allowdiscussions'] = 'Can a {$a} post to this forum?'; -$string['allowratings'] = 'Allow posts to be rated?'; $string['allowsallsubscribe'] = 'This forum allows everyone to choose whether to subscribe or not'; $string['allowsdiscussions'] = 'This forum allows each person to start one discussion topic.'; $string['allsubscribe'] = 'Subscribe to all forums'; @@ -92,7 +83,6 @@ $string['completionpostshelp'] = 'requiring discussions or replies to complete'; $string['completionreplies'] = 'Student must post replies:'; $string['completionrepliesgroup'] = 'Require replies'; $string['completionreplieshelp'] = 'requiring replies to complete'; -$string['configajaxrating'] = 'AJAX rating is a forum rating usability improvement. If enabled, users can rate forum posts almost instantly without needing to scroll to the bottom of the page and click the \'Send in my latest ratings\' button. This setting also requires AJAX to be enabled for the site and in user profiles.'; $string['configcleanreadtime'] = 'The hour of the day to clean old posts from the \'read\' table.'; $string['configdisplaymode'] = 'The default display mode for discussions if one isn\'t set.'; $string['configenablerssfeeds'] = 'This switch will enable the possibility of RSS feeds for all forums. You will still need to turn feeds on manually in the settings for each forum.'; @@ -108,7 +98,6 @@ $string['configshortpost'] = 'Any post under this length (in characters not incl $string['configtrackreadposts'] = 'Set to \'yes\' if you want to track read/unread for each user.'; $string['configusermarksread'] = 'If \'yes\', the user must manually mark a post as read. If \'no\', when the post is viewed it is marked as read.'; $string['couldnotadd'] = 'Could not add your post due to an unknown error'; -$string['couldnotdeleteratings'] = 'Sorry, that cannot be deleted as people have already rated it'; $string['couldnotdeletereplies'] = 'Sorry, that cannot be deleted as people have already responded to it'; $string['couldnotupdate'] = 'Could not update your post due to an unknown error'; $string['delete'] = 'Delete'; @@ -208,7 +197,6 @@ $string['invalidforcesubscribe'] = 'Invalid force subscription mode'; $string['invalidforumid'] = 'Forum ID was incorrect'; $string['invalidparentpostid'] = 'Parent post ID was incorrect'; $string['invalidpostid'] = 'Invalid Post ID - {$a}'; -$string['invalidrate'] = 'Invalid rate ({$a})'; $string['lastpost'] = 'Last post'; $string['learningforums'] = 'Learning forums'; $string['logblocked'] = 'Log blocked emails'; @@ -251,7 +239,6 @@ $string['noattachments'] = 'There are no attachments to this post'; $string['nodiscussions'] = 'There are no discussion topics yet in this forum'; $string['nodiscussionsstartedby'] = 'No discussions started by this user'; $string['noguestpost'] = 'Sorry, guests are not allowed to post.'; -$string['noguestrate'] = 'Guests are not allowed to rate entries.'; $string['noguestsubscribe'] = 'Sorry, guests are not allowed to subscribe to receive forum postings by email.'; $string['noguesttracking'] = 'Sorry, guests are not allowed to set tracking options.'; $string['nomorepostscontaining'] = 'No more posts containing \'{$a}\' were found'; @@ -263,9 +250,6 @@ $string['nopostforum'] = 'Sorry, you are not allowed to post to this forum'; $string['noposts'] = 'No posts'; $string['nopostscontaining'] = 'No posts containing \'{$a}\' were found'; $string['noquestions'] = 'There are no questions yet in this forum'; -$string['norate'] = 'Rating of items not allowed!'; -$string['noratinggiven'] = 'No rating given'; -$string['noresult'] = 'No ratings for this post: {$a}'; $string['nosubscribers'] = 'There are no subscribers yet for this forum'; $string['notexists'] = 'Discussion no longer exists'; $string['nothingnew'] = 'Nothing new for {$a}'; @@ -273,9 +257,7 @@ $string['notingroup'] = 'Sorry, but you need to be part of a group to see this f $string['notinstalled'] = 'The forum module is not installed'; $string['notpartofdiscussion'] = 'This post is not part of a discussion!'; $string['notrackforum'] = 'Don\'t track unread posts'; -$string['noviewanyrate'] = 'You can only look at results for posts that you made'; $string['noviewdiscussionspermission'] = 'You do not have the permission to view discussions in this forum'; -$string['noviewrate'] = 'You do not have the capability to view post ratings'; $string['nowallsubscribed'] = 'All forums in {$a} are subscribed.'; $string['nowallunsubscribed'] = 'All forums in {$a} are not subscribed.'; $string['nownotsubscribed'] = '{$a->name} will NOT receive copies of \'{$a->forum}\' by email.'; @@ -317,15 +299,6 @@ $string['prunedpost'] = 'A new discussion has been created from that post'; $string['pruneheading'] = 'Split the discussion and move this post to a new discussion'; $string['qandaforum'] = 'Q and A forum'; $string['qandanotify'] = 'This is a Question and Answer forum. In order to see other responses to these Questions, you must first post your Answer'; -$string['rate'] = 'Rate'; -$string['rating'] = 'Rating'; -$string['ratingeveryone'] = 'Everyone can rate posts'; -$string['ratingno'] = 'No ratings'; -$string['ratingonlyteachers'] = 'Only {$a} can rate posts'; -$string['ratingpublic'] = '{$a} can see everyone\'s ratings'; -$string['ratingpublicnot'] = '{$a} can only see their own ratings'; -$string['ratings'] = 'Ratings'; -$string['ratingssaved'] = 'Ratings saved'; $string['re'] = 'Re:'; $string['readtherest'] = 'Read the rest of this topic'; $string['replies'] = 'Replies'; @@ -360,7 +333,6 @@ $string['searchuserid'] = 'The Moodle ID of the author'; $string['searchwhichforums'] = 'Choose which forums to search'; $string['searchwords'] = 'These words can appear anywhere in the post'; $string['seeallposts'] = 'See all posts made by this user'; -$string['sendinratings'] = 'Send in my latest ratings'; $string['shortpost'] = 'Short post'; $string['showsubscribers'] = 'Show/edit current subscribers'; $string['singleforum'] = 'A single simple discussion'; @@ -421,7 +393,6 @@ $string['usermarksread'] = 'Manual message read marking'; $string['viewalldiscussions'] = 'View all discussions'; $string['warnafter'] = 'Post threshold for warning'; $string['warnafter_help'] = 'Students can be warned as they approach the maximum number of posts allowed in a given period. This setting specifies after how many posts they are warned. Users with the capability mod/forum:postwithoutthrottling are exempt from post limits.'; -$string['youratedthis'] = 'You rated this'; $string['yournewquestion'] = 'Your new question'; $string['yournewtopic'] = 'Your new discussion topic'; $string['yourreply'] = 'Your reply'; diff --git a/mod/forum/post.php b/mod/forum/post.php index 51367bcaf38..1ec81d44bc8 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -306,7 +306,7 @@ if (!empty($forum)) { // User is starting a new discussion in a forum if (!empty($confirm) && confirm_sesskey()) { // User has confirmed the delete if ($post->totalscore) { - notice(get_string("couldnotdeleteratings", "forum"), + notice(get_string('couldnotdeleteratings', 'rating'), forum_go_back_to("discuss.php?d=$post->discussion")); } else if ($replycount && !has_capability('mod/forum:deleteanypost', $modcontext)) { diff --git a/mod/forum/settings.php b/mod/forum/settings.php index 092e349a5d5..5507ad2c4f8 100644 --- a/mod/forum/settings.php +++ b/mod/forum/settings.php @@ -90,9 +90,5 @@ if ($ADMIN->fulltree) { $settings->add(new admin_setting_configcheckbox('forum_logblocked', get_string('logblocked', 'forum'), get_string('configlogblocked', 'forum'), 1)); - - //no using the central ajax setting for ratings. MDL-21657 - //$settings->add(new admin_setting_configcheckbox('forum_ajaxrating', get_string('ajaxrating', 'forum'), - // get_string('configajaxrating', 'forum'), 0)); } diff --git a/mod/glossary/lang/en/glossary.php b/mod/glossary/lang/en/glossary.php index fbeefe32e46..b55c960f39e 100644 --- a/mod/glossary/lang/en/glossary.php +++ b/mod/glossary/lang/en/glossary.php @@ -39,7 +39,6 @@ $string['allowduplicatedentries'] = 'Duplicate entries allowed'; $string['allowduplicatedentries_help'] = 'If enabled, multiple entries can have the same concept name.'; $string['allowprintview'] = 'Allow print view'; $string['allowprintview_help'] = 'If enabled, students are provided with a link to a printer-friendly version of the glossary. The link is always available to teachers.'; -$string['allowratings'] = 'Allow entries to be rated?'; $string['answer'] = 'Answer'; $string['approve'] = 'Approve'; $string['areyousuredelete'] = 'Are you sure you want to delete this entry?'; @@ -190,7 +189,6 @@ $string['importedentries'] = 'Imported entries'; $string['importentries'] = 'Import entries'; $string['importentriesfromxml'] = 'Import entries from XML file'; $string['includegroupbreaks'] = 'Include group breaks'; -$string['invalidrate'] = 'Invalid glossary rate ({$a})'; $string['isglobal'] = 'Is this glossary global?'; $string['isglobal_help'] = 'A global glossary has entries which are linked to from throughout the site, rather than only in the course that the glossary is in. Only administrators can set a glossary as global.'; $string['letter'] = 'letter'; @@ -223,15 +221,6 @@ $string['popupformat'] = 'Popup format'; $string['printerfriendly'] = 'Printer-friendly version'; $string['printviewnotallowed'] = 'Print view isn\'t allowed'; $string['question'] = 'Question'; -$string['rate'] = 'Rate'; -$string['rating'] = 'Rating'; -$string['ratingeveryone'] = 'Everyone can rate entries'; -$string['ratingno'] = 'No ratings'; -$string['ratingonlyteachers'] = 'Only {$a} can rate entries'; -$string['ratingonlywithpermissions'] = 'Only people with permission to rate entries'; -$string['ratings'] = 'Ratings'; -$string['ratingssaved'] = 'Ratings saved'; -$string['ratingtime'] = 'Restrict ratings to entries with dates in this range:'; $string['rejectedentries'] = 'Rejected entries'; $string['rejectionrpt'] = 'Rejection Report'; $string['resetglossaries'] = 'Delete entries from'; @@ -243,7 +232,6 @@ $string['rsstype'] = 'RSS feed for this activity'; $string['rsstype_help'] = 'To enable the RSS feed for this activity, select either concepts with author or concepts without author to be included in the feed.'; $string['searchindefinition'] = 'Search full text'; $string['secondaryglossary'] = 'Secondary glossary'; -$string['sendinratings'] = 'Send in my latest ratings'; $string['showall'] = 'Show \'ALL\' link'; $string['showall_help'] = 'If enabled, participants can browse all entries at once.'; $string['showalphabet'] = 'Show alphabet'; diff --git a/rating/index.php b/rating/index.php index a06b9d86c67..eb02ea5263e 100644 --- a/rating/index.php +++ b/rating/index.php @@ -93,6 +93,7 @@ if (!$ratings) { echo "