Exemplo n.º 1
0
require_once dirname(__FILE__) . '/clusters.class.php';
require_once dirname(__FILE__) . '/../views/status_box.class.php';
ini_set('memory_limit', '256M');
require_login();
$id = required_param('id', PARAM_INT);
$time_limit = 600;
// 10 minutes
$vpl = new mod_vpl($id);
$vpl->prepare_page('similarity/listsimilarity.php', array('id' => $id));
$vpl->require_capability(VPL_SIMILARITY_CAPABILITY);
\mod_vpl\event\vpl_similarity_report_viewed::log($vpl);
//Print header
$PAGE->requires->css(new moodle_url('/mod/vpl/css/similarity.css'));
$vpl->print_header(get_string('listsimilarity', VPL));
$vpl->print_view_tabs(basename(__FILE__));
$form = new vpl_similarity_form('listsimilarity.php', $vpl);
if (!($fromform = $form->get_data())) {
    print_error('readingdata', VPL);
}
//Get filelist names to scan
$filesselected = array();
$filelist = $vpl->get_required_fgm()->getFileList();
$num = 0;
foreach ($filelist as $filename) {
    if (isset($fromform->{'file' . $num})) {
        $filesselected[$filename] = true;
    }
    $num++;
}
$usernumber = 0;
$nwm = 0;
Exemplo n.º 2
0
// 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 VPL for Moodle.  If not, see <http://www.gnu.org/licenses/>.
/**
 * Similarity form
 *
 * @package mod_vpl
 * @copyright 2012 Juan Carlos Rodríguez-del-Pino
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 * @author Juan Carlos Rodríguez-del-Pino <*****@*****.**>
 */
require_once dirname(__FILE__) . '/../../../config.php';
require_once dirname(__FILE__) . '/../locallib.php';
require_once dirname(__FILE__) . '/../vpl.class.php';
require_once dirname(__FILE__) . '/../vpl_submission.class.php';
require_once dirname(__FILE__) . '/watermark.php';
require_once $CFG->libdir . '/formslib.php';
require_once dirname(__FILE__) . '/similarity_form.class.php';
$id = required_param('id', PARAM_INT);
$vpl = new mod_vpl($id);
$vpl->prepare_page('similarity/similarity_form.php', array('id' => $id));
$vpl->require_capability(VPL_SIMILARITY_CAPABILITY);
\mod_vpl\event\vpl_similarity_form_viewed::log($vpl);
//Print header
$vpl->print_header(get_string('similarity', VPL));
$vpl->print_view_tabs(basename(__FILE__));
$form = new vpl_similarity_form('listsimilarity.php', $vpl);
$form->display();
$vpl->print_footer();