Commit a2faf100 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan

moving view strings from mahara to view language file

parent 6601edaa
......@@ -45,6 +45,7 @@ $string['Failed'] = 'Failed';
$string['loading'] = 'Loading ...';
$string['showtags'] = 'Show my tags';
$string['errorprocessingform'] = 'There was an error with submitting this form. Please check the marked fields and try again.';
$string['description'] = 'Description';
$string['no'] = 'No';
$string['yes'] = 'Yes';
......@@ -70,7 +71,7 @@ $string['select'] = 'Select';
$string['tags'] = 'Tags';
$string['tagsdesc'] = 'Enter comma separated tags for this item.';
$string['tagsdescprofile'] = 'Enter comma separated tags for this item. Artefacts tagged with \'profile\' are displayed in the sidebar';
$string['tagsdescprofile'] = 'Enter comma separated tags for this item. Items tagged with \'profile\' are displayed in the sidebar.';
$string['selfsearch'] = 'Search My Portfolio';
$string['ssopeers'] = 'SSO Peers';
......@@ -91,6 +92,7 @@ $string['logout'] = 'Logout';
$string['pendingfriend'] = 'pending friend';
$string['pendingfriends'] = 'pending friends';
$string['profile'] = 'profile';
$string['views'] = 'Views';
// auth
$string['accessforbiddentoadminsection'] = 'You are forbidden from accessing the administration section';
......@@ -203,6 +205,9 @@ $string['firstname'] = 'First name';
$string['firstnamedescription'] = ' ';
$string['lastname'] = 'Last name';
$string['lastnamedescription'] = ' ';
$string['studentid'] = 'ID number';
$string['displayname'] = 'Display name';
$string['fullname'] = 'Full name';
$string['registerstep1description'] = 'Welcome! To use this site you must first register. You must also agree to the <a href="terms.php">terms and conditions</a>. The data we collect here will be stored according to our <a href="privacy.php">privacy statement</a>.';
$string['registerstep3fieldsoptional'] = '<h3>Choose an Optional Profile Image</h3><p>You have now successfully registered with ' . get_config('sitename') . '! You may now choose an optional profile icon to be displayed as your avatar.</p>';
$string['registerstep3fieldsmandatory'] = '<h3>Fill Out Mandatory Profile Fields</h3><p>The following fields are required. You must fill them out before your registration is complete.</p>';
......@@ -322,8 +327,10 @@ $string['unknownerror'] = 'An unknown error occurred (0x20f91a0)';
// menu
$string['home'] = 'Home';
$string['myportfolio'] = 'My Portfolio';
$string['myviews'] = ' My Views';
$string['settings'] = 'Settings';
$string['myfriends'] = 'My Friends';
$string['groups'] = 'Groups';
$string['mygroups'] = 'My Groups';
$string['findgroups'] = 'Find Groups';
$string['youareloggedinas'] = 'You are logged in as %s';
......@@ -358,43 +365,6 @@ $string['optionalinstitutionid'] = 'Institution ID (optional)';
$string['institutionmemberconfirmsubject'] = 'Institution membership confirmation';
$string['institutionmemberconfirmmessage'] = 'You have been added as a member of %s.';
// my views
$string['accessstartdate'] = 'Access start date';
$string['accessstopdate'] = 'Access end date';
$string['artefacts'] = 'Artefacts';
$string['createnewview'] = 'Create New View';
$string['deleteviewfailed'] = 'Delete view failed';
$string['deleteviewquestion'] = 'Do you really want to delete this view?';
$string['description'] = 'Description';
$string['editaccess'] = 'Edit Access';
$string['editview'] = 'Edit View';
$string['editviewinformation'] = 'Edit View Information';
$string['myviews'] = 'My Views';
$string['notownerofview'] = 'You are not the owner of this view';
$string['reallyaddaccesstoemptyview'] = 'Your view contains no artefacts. Do you really want to give these users access to the view?';
$string['saveaccess'] = 'Save Access';
$string['submitview'] = 'Submit View';
$string['submitviewfailed'] = 'Submit view failed';
$string['submitviewquestion'] = 'If you submit this view for assessment, you will not be able to edit the view or any of its associated artefacts until your tutor has finished marking the view. Are you sure you want to submit this view now?';
$string['viewdeleted'] = 'View deleted';
$string['views'] = 'Views';
$string['viewsubmitted'] = 'View submitted';
$string['viewsubmittedto'] = 'This view has been submitted to %s';
// access levels
$string['public'] = 'Public';
$string['loggedin'] = 'Logged In Users';
$string['friends'] = 'Friends';
$string['groups'] = 'Groups';
$string['users'] = 'Users';
// view user
$string['fullname'] = 'Full name';
$string['displayname'] = 'Display name';
$string['studentid'] = 'ID number';
$string['inviteusertojoingroup'] = 'Invite this user to join a group';
$string['addusertogroup'] = 'Add this user to a group';
$string['emailname'] = 'Mahara System'; // robot!
$string['config'] = 'Config';
......@@ -432,6 +402,7 @@ $string['result'] = 'result';
$string['results'] = 'results';
$string['Results'] = 'Results';
$string['noresultsfound'] = 'No results found';
$string['users'] = 'Users';
// artefact
$string['artefact'] = 'artefact';
......@@ -442,48 +413,6 @@ $string['artefactnotrendered'] = 'Artefact not rendered';
$string['belongingto'] = 'Belonging to';
$string['allusers'] = 'All users';
// view view
$string['addedtowatchlist'] = 'This view has been added to your watchlist';
$string['removedfromwatchlist'] = 'This view has been removed from your watchlist';
$string['addfeedbackfailed'] = 'Add feedback failed';
$string['addtowatchlist'] = 'Add view to watchlist';
$string['removefromwatchlist'] = 'Remove view from watchlist';
$string['alreadyinwatchlist'] = 'This view is already in your watchlist';
$string['attachedfileaddedtofolder'] = "The attached file %s has been added to your '%s' folder.";
$string['attachfile'] = "Attach file";
$string['complaint'] = 'Complaint';
$string['date'] = 'Date';
$string['feedback'] = 'Feedback';
$string['feedbackattachdirname'] = 'assessmentfiles';
$string['feedbackattachdirdesc'] = 'Files attached to view assessments';
$string['feedbackattachmessage'] = 'The attached file has been added to your %s folder';
$string['feedbackmadeprivate'] = 'Feedback changed to private';
$string['feedbackonthisartefactwillbeprivate'] = 'Feedback on this artefact will only be visible to the owner.';
$string['feedbackonviewbytutorofgroup'] = 'Feedback on %s by %s of %s';
$string['feedbacksubmitted'] = 'Feedback submitted';
$string['makepublic'] = 'Make public';
$string['nopublicfeedback'] = 'No public feedback';
$string['notifysiteadministrator'] = 'Notify site administrator';
$string['placefeedback'] = 'Place feedback';
$string['print'] = 'Print';
$string['private'] = 'Private';
$string['makeprivate'] = 'Change to Private';
$string['reportobjectionablematerial'] = 'Report objectionable material';
$string['reportsent'] = 'Your report has been sent';
$string['updatewatchlistfailed'] = 'Update of watchlist failed';
$string['view'] = 'view';
$string['View'] = 'View';
$string['watchlistupdated'] = 'Your watchlist has been updated';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['all'] = 'All';
$string['friend'] = 'Friend';
$string['profileicon'] = 'Profile Icon';
// general views stuff
$string['allviews'] = 'All views';
// Upload manager
$string['quarantinedirname'] = 'quarantine';
$string['clammovedfile'] = 'The file has been moved to a quarantine directory.';
......
......@@ -27,12 +27,11 @@
defined('INTERNAL') || die();
$string['createview'] = 'Create View';
$string['editview'] = 'Edit Details for View "%s"';
$string['editviewdetails'] = 'Edit Details for View "%s"';
$string['editaccessforview'] = 'Edit View Access for View "%s"';
$string['editblocksforview'] = 'Edit Blocks for View "%s"';
$string['next'] = 'Next';
$string['back'] = 'Back';
$string['createview'] = 'Create View';
$string['title'] = 'View Title';
$string['description'] = 'View Description';
$string['startdate'] = 'Access Start Date/Time';
......@@ -41,6 +40,108 @@ $string['startdatemustbebeforestopdate'] = 'The start date must be before the st
$string['ownerformat'] = 'Name display format';
$string['ownerformatdescription'] = 'How do you want people who look at your view to see your name?';
// my views
$string['accessstartdate'] = 'Access start date';
$string['accessstopdate'] = 'Access end date';
$string['artefacts'] = 'Artefacts';
$string['deleteviewfailed'] = 'Delete view failed';
$string['deleteviewquestion'] = 'Do you really want to delete this view?';
$string['editaccess'] = 'Edit Access';
$string['editview'] = 'Edit View';
$string['editviewinformation'] = 'Edit View Details';
$string['myviews'] = 'My Views';
$string['notownerofview'] = 'You are not the owner of this view';
$string['reallyaddaccesstoemptyview'] = 'Your view contains no artefacts. Do you really want to give these users access to the view?';
$string['saveaccess'] = 'Save Access';
$string['submitview'] = 'Submit View';
$string['submitviewfailed'] = 'Submit view failed';
$string['submitviewquestion'] = 'If you submit this view for assessment, you will not be able to edit the view or any of its associated artefacts until your tutor has finished marking the view. Are you sure you want to submit this view now?';
$string['viewdeleted'] = 'View deleted';
$string['views'] = 'Views';
$string['viewsubmitted'] = 'View submitted';
$string['viewsubmittedto'] = 'This view has been submitted to %s';
// my views 2
$string['editviewnameanddescription'] = 'Edit view details';
$string['editviewaccess'] = 'Edit view access';
$string['deletethisview'] = 'Delete this view';
$string['submitviewforassessment'] = 'Submit view for assessment';
$string['accessfromdate'] = 'Nobody can see this view before %s';
$string['accessuntildate'] = 'Nobody can see this view after %s';
$string['accessbetweendates'] = 'Nobody can see this view before %s or after %s';
$string['artefactsinthisview'] = 'Artefacts in this view';
$string['whocanseethisview'] = 'Who can see this view';
$string['view'] = 'view';
$string['views'] = 'views';
$string['viewsubmittedtogroup'] = 'This view has been submitted to <a href="' . get_config('wwwroot') . 'group/view.php?id=%s">%s</a>';
$string['nobodycanseethisview'] = 'Nobody can see this view';
// access levels
$string['Public'] = 'Public';
$string['loggedinusers'] = 'Logged In Users';
$string['Friends'] = 'Friends';
$string['Groups'] = 'Groups';
$string['Users'] = 'Users';
$string['friends'] = 'friends';
$string['group'] = 'group';
$string['tutors'] = 'tutors';
$string['loggedin'] = 'logged in users';
$string['public'] = 'public';
// view user
$string['inviteusertojoingroup'] = 'Invite this user to join a group';
$string['addusertogroup'] = 'Add this user to a group';
// view view
$string['addedtowatchlist'] = 'This view has been added to your watchlist';
$string['removedfromwatchlist'] = 'This view has been removed from your watchlist';
$string['addfeedbackfailed'] = 'Add feedback failed';
$string['addtowatchlist'] = 'Add view to watchlist';
$string['removefromwatchlist'] = 'Remove view from watchlist';
$string['alreadyinwatchlist'] = 'This view is already in your watchlist';
$string['attachedfileaddedtofolder'] = "The attached file %s has been added to your '%s' folder.";
$string['attachfile'] = "Attach file";
$string['complaint'] = 'Complaint';
$string['date'] = 'Date';
$string['feedback'] = 'Feedback';
$string['feedbackattachdirname'] = 'assessmentfiles';
$string['feedbackattachdirdesc'] = 'Files attached to view assessments';
$string['feedbackattachmessage'] = 'The attached file has been added to your %s folder';
$string['feedbackmadeprivate'] = 'Feedback changed to private';
$string['feedbackonthisartefactwillbeprivate'] = 'Feedback on this artefact will only be visible to the owner.';
$string['feedbackonviewbytutorofgroup'] = 'Feedback on %s by %s of %s';
$string['feedbacksubmitted'] = 'Feedback submitted';
$string['makepublic'] = 'Make public';
$string['nopublicfeedback'] = 'No public feedback';
$string['notifysiteadministrator'] = 'Notify site administrator';
$string['placefeedback'] = 'Place feedback';
$string['print'] = 'Print';
$string['private'] = 'Private';
$string['makeprivate'] = 'Change to Private';
$string['reportobjectionablematerial'] = 'Report objectionable material';
$string['reportsent'] = 'Your report has been sent';
$string['updatewatchlistfailed'] = 'Update of watchlist failed';
$string['View'] = 'View';
$string['watchlistupdated'] = 'Your watchlist has been updated';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['all'] = 'All';
$string['friend'] = 'Friend';
$string['profileicon'] = 'Profile Icon';
// general views stuff
$string['allviews'] = 'All views';
$string['submitviewconfirm'] = 'If you submit \'%s\' to \'%s\' for assessment, you will not be able to edit the view or any of its associated artefacts until your tutor has finished marking the view. Are you sure you want to submit this view now?';
$string['viewsubmitted'] = 'View submitted';
$string['submitviewtogroup'] = 'Submit \'%s\' to \'%s\' for assessment';
$string['cantsubmitviewtogroup'] = 'You cannot submit this view to this group for assessment';
$string['cantdeleteview'] = 'You cannot delete this view';
$string['deletespecifiedview'] = 'Delete view \'%s\'';
$string['deleteviewconfirm'] = 'Do you really want to delete this view? It cannot be undone.';
$string['editaccesspagedescription'] = '<p>You can control who can see your view, and when they can do so. By default, only you can see your views.</p>
<p>You can grant access to your view to your friends, all logged in users, or only to the certain users and groups you choose.</p>
<p>All dates are optional. If you wish, you can use them to restrict the time in which people can see your view.</p>';
......@@ -106,6 +207,7 @@ $string['backtoyourview'] = 'Back to your view';
$string['by'] = 'by';
$string['in'] = 'in';
$string['noblocks'] = 'Sorry, no blocks in this category :(';
$string['Preview'] = 'Preview';
$string['50,50'] = $string['33,33,33'] = $string['25,25,25,25'] = 'Equal widths';
$string['67,33'] = 'Larger left column';
......@@ -127,4 +229,6 @@ $string['Browse'] = 'Browse';
$string['Search'] = 'Search';
$string['noartefactstochoosefrom'] = 'Sorry, no artefacts to choose from';
$string['access'] = 'Access';
?>
......@@ -41,16 +41,16 @@ function pieform_element_viewacl(Pieform $form, $element) {
// Look for the presets and split them into two groups
$presets = array();
if (get_config('allowpublicviews') == '1') {
$presets = array('public', 'loggedin', 'friends');
$presets = array('Public', 'loggedinusers', 'Friends');
}
else {
$presets = array('loggedin', 'friends');
$presets = array('loggedinusers', 'Friends');
}
if ($value) {
foreach ($value as $key => &$item) {
if (is_array($item)) {
if (in_array($item['type'], $presets)) {
$item['name'] = get_string($item['type']);
$item['name'] = get_string($item['type'], 'view');
$item['preset'] = true;
}
else {
......@@ -70,7 +70,7 @@ function pieform_element_viewacl(Pieform $form, $element) {
'id' => $preset,
'start' => null,
'end' => null,
'name' => get_string($preset),
'name' => get_string($preset, 'view'),
'preset' => true
);
}
......
......@@ -13,7 +13,7 @@
<div id="publicfeedback">
<table id="feedbacktable">
<thead>
<tr><th colspan=5>{str tag=feedback}</th></tr>
<tr><th colspan=5>{str tag=feedback section=view}</th></tr>
</thead>
</table>
</div>
......
......@@ -5,7 +5,7 @@
<div class="blocktype">
{* The width and height are required so that the javascript that places the clones knows how
big it should make itself. Talk to Nigel before changing this *}
<img src="{$blocktype.thumbnail_path | escape}" alt="{str tag='preview'}" width="70" height="58">
<img src="{$blocktype.thumbnail_path | escape}" alt="{str tag='Preview' section='view'}" width="70" height="58">
<h3>{$blocktype.title | escape}</h3>
<p>{$blocktype.description | escape}</p>
<input type="{if $javascript}hidden{else}radio{/if}" class="blocktype-radio" name="blocktype" value="{$blocktype.name | escape}">
......
......@@ -2,11 +2,11 @@
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<h2>{str tag='myviews'}</h2>
<h2>{str tag='myviews' section='view'}</h2>
<div id="views">
<div style="text-align:right;">
<form action="{$WWWROOT}view/edit.php" method="GET">
<input class="button" type="submit" value="{str tag="createnewview"}" id="createnew">
<input class="button" type="submit" value="{str tag="createview" section="view"}" id="createnew">
{contextualhelp plugintype='core' pluginname='views' section='createviewbutton'}
</form>
</div>
......
......@@ -23,7 +23,7 @@
<div id="publicfeedback">
<table id="feedbacktable">
<thead>
<tr><th colspan=5>{str tag=feedback}</th></tr>
<tr><th colspan=5>{str tag=feedback section=view}</th></tr>
</thead>
</table>
</div>
......
......@@ -49,12 +49,12 @@ else {
}
if (!insert_record($table, $data, 'id', true)) {
json_reply('local', get_string('addfeedbackfailed'));
json_reply('local', get_string('addfeedbackfailed', 'view'));
}
require_once('activity.php');
activity_occurred('feedback', $data);
json_reply(false,get_string('feedbacksubmitted'));
json_reply(false,get_string('feedbacksubmitted', 'view'));
?>
......@@ -90,17 +90,19 @@ if ($submittedgroup
// The user is a tutor of the group that this view has
// been submitted to, and is entitled to upload an additional
// file when submitting feedback.
$tutorfilefeedbackformrow = "TR(null, TH(null, LABEL(null, '" . get_string('attachfile') . "'))),"
$tutorfilefeedbackformrow = "TR(null, TH(null, LABEL(null, '" . get_string('attachfile', 'view') . "'))),"
. "TR(null, TD(null, INPUT({'type':'file', 'name':'attachment'}))),";
}
$getstring = quotestrings(array('mahara' => array(
'message', 'makepublic', 'placefeedback', 'cancel', 'complaint',
'cancel', 'message',
),
'view' => array('print', 'makepublic', 'placefeedback', 'complaint',
'feedbackonthisartefactwillbeprivate', 'notifysiteadministrator',
'nopublicfeedback', 'reportobjectionablematerial', 'print',
)));
'nopublicfeedback', 'reportobjectionablematerial')
));
$getstring['feedbackattachmessage'] = "'(" . get_string('feedbackattachmessage', 'mahara', get_string('feedbackattachdirname')) . ")'";
$getstring['feedbackattachmessage'] = "'(" . get_string('feedbackattachmessage', 'view', get_string('feedbackattachdirname', 'view')) . ")'";
// Safari doesn't seem to like these inputs to be called 'public', so call them 'ispublic' instead.
$feedbackisprivate = !$artefact->public_feedback_allowed();
......@@ -276,7 +278,7 @@ $smarty = smarty(
array('tablerenderer'),
array('<link rel="stylesheet" type="text/css" href="' . get_config('wwwroot') . 'theme/views.css">'),
array(
'mahara' => array(
'view' => array(
'public',
'private',
'makeprivate',
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2007 Catalyst IT Ltd (http://www.catalyst.net.nz)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage core
* @author Clare Lenihan <clare@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
define('INTERNAL', 1);
define('MENUITEM', 'myportfolio/views');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require_once('view.php');
$viewid = param_integer('id');
$view = get_record('view', 'id', $viewid, 'owner', $USER->get('id'));
if (!$view) {
throw new AccessDeniedException(get_string('cantdeleteview', 'view'));
}
define('TITLE', get_string('deletespecifiedview', 'view', $view->title));
$form = pieform(array(
'name' => 'deleteview',
'autofocus' => false,
'method' => 'post',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'title' => get_string('deleteviewconfirm', 'view'),
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'view/temp.php'
)
),
));
$smarty = smarty();
$smarty->assign('heading', TITLE);
$smarty->assign('form', $form);
$smarty->display('view/delete.tpl');
function deleteview_submit(Pieform $form, $values) {
global $SESSION, $viewid;
$view = new View($viewid, null);
$view->delete();
handle_event('deleteview', $viewid);
$SESSION->add_ok_msg(get_string('viewdeleted', 'view'));
redirect('/view/temp.php');
}
?>
......@@ -59,8 +59,8 @@ if ($error = $um->preprocess_file()) {
$size = $um->file['size'];
safe_require('artefact', 'file');
$folderid = ArtefactTypeFolder::get_folder_id(get_string('feedbackattachdirname'),
get_string('feedbackattachdirdesc'),
$folderid = ArtefactTypeFolder::get_folder_id(get_string('feedbackattachdirname', 'view'),
get_string('feedbackattachdirdesc', 'view'),
null, $viewdata->owner);
// Create a new file object
......@@ -68,7 +68,7 @@ $data = (object) array('owner' => $viewdata->owner,
'parent' => $folderid,
'size' => $size,
'title' => $filename,
'description' => get_string('feedbackonviewbytutorofgroup', 'mahara',
'description' => get_string('feedbackonviewbytutorofgroup', 'view',
$viewdata->title, display_name($USER), $viewdata->name));
$f = ArtefactTypeFile::new_file($um->file['tmp_name'], $data);
$f->commit();
......
......@@ -32,14 +32,15 @@ define('SECTION_PLUGINNAME', 'view');
define('SECTION_PAGE', 'index');
require(dirname(dirname(__FILE__)) . '/init.php');
define('TITLE', get_string('myviews'));
define('TITLE', get_string('myviews', 'view'));
$wwwroot = get_config('wwwroot');
$getstring = quotestrings(array('mahara' => array(
'accessstartdate', 'accessstopdate', 'artefacts', 'delete', 'deleteviewquestion', 'description',
'editaccess', 'editview', 'editviewinformation', 'submitted', 'submitview', 'submitviewquestion'
)));
$getstring = quotestrings(array(
'mahara' => array('delete', 'description'),
'view' => array('accessstartdate', 'accessstopdate', 'artefacts',
'deleteviewquestion', 'editaccess', 'editview', 'editviewinformation',
'submitted', 'submitview', 'submitviewquestion')));
$editcontrolshelp = get_help_icon('core', 'views', null, null, null, 'vieweditcontrols');
......@@ -146,7 +147,7 @@ viewlist.updateOnLoad();
JAVASCRIPT;
$smarty = smarty(array('tablerenderer'), array(), array('viewsubmittedto' => 'mahara'));
$smarty = smarty(array('tablerenderer'), array(), array('viewsubmittedto' => 'view'));
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->display('view/index.tpl');
......
......@@ -39,6 +39,6 @@ $data->message = param_variable('message');
activity_occurred('objectionable', $data);
json_reply(false, get_string('reportsent'));
json_reply(false, get_string('reportsent', 'view'));
?>
......@@ -37,9 +37,9 @@ $data->id = param_integer('viewid');
$data->submittedto = param_integer('groupid');
if (!update_record('view',$data,'id')) {
json_reply('local', get_string('submitviewfailed'));
json_reply('local', get_string('submitviewfailed', 'view'));
}
json_reply(false,get_string('viewsubmitted'));
json_reply(false,get_string('viewsubmitted', 'view'));
?>
......@@ -38,15 +38,15 @@ $data->ctime = db_format_timestamp(time());
if (get_record('usr_watchlist_view', 'usr', $data->usr, 'view', $view)) {
if (!delete_records('usr_watchlist_view', 'usr', $data->usr, 'view', $view)) {
json_reply('local', get_string('updatewatchlistfailed'));
json_reply('local', get_string('updatewatchlistfailed', 'view'));
}
json_reply(false, get_string('removedfromwatchlist'));
json_reply(false, get_string('removedfromwatchlist', 'view'));
}
if (!insert_record('usr_watchlist_view', $data)) {
json_reply('local', get_string('updatewatchlistfailed'));
json_reply('local', get_string('updatewatchlistfailed', 'view'));
}
json_reply(false, get_string('addedtowatchlist'));
json_reply(false, get_string('addedtowatchlist', 'view'));
?>
......@@ -52,15 +52,16 @@ if ($submittedgroup
}
$viewbeingwatched = (int)record_exists('usr_watchlist_view', 'usr', $USER->get('id'), 'view', $viewid);
$getstring = quotestrings(array('mahara' => array(
'message', 'makepublic', 'placefeedback', 'cancel', 'complaint',
$getstring = quotestrings(array(
'mahara' => array('message', 'cancel'),
'view' => array('makepublic', 'placefeedback', 'complaint',
'feedbackonthisartefactwillbeprivate', 'notifysiteadministrator',
'nopublicfeedback', 'reportobjectionablematerial', 'print',
)));
'nopublicfeedback', 'reportobjectionablematerial', 'print')
));
$getstring['addtowatchlist'] = json_encode(get_string('addtowatchlist'));
$getstring['removefromwatchlist'] = json_encode(get_string('removefromwatchlist'));
$getstring['feedbackattachmessage'] = "'(" . get_string('feedbackattachmessage', 'mahara', get_string('feedbackattachdirname')) . ")'";
$getstring['addtowatchlist'] = json_encode(get_string('addtowatchlist', 'view'));
$getstring['removefromwatchlist'] = json_encode(get_string('removefromwatchlist', 'view'));
$getstring['feedbackattachmessage'] = "'(" . get_string('feedbackattachmessage', 'view', get_string('feedbackattachdirname', 'view')) . ")'";
// Safari doesn't seem to like these inputs to be called 'public', so call them 'ispublic' instead.
if (!empty($feedbackisprivate)) {
......@@ -240,7 +241,7 @@ $smarty = smarty(
array('tablerenderer'),